Have questions? Stuck? Please check our FAQ for some common questions and answers.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Work in progress!

Overview

The purpose of the application subsystem is to facilitate easy software delivery and management across all ONOS instances in a cluster. The subsystem uses ONOS eventually consistent map and the inter-node communication mechanism to fully replicate the inventory of applications across the entire ONOS cluster. To install and ignite software as sets of OSGi bundles, the subsystem relies on the underlying Apache Karaf feature mechanism.

All builtin sample and test applications provided by ONOS are now delivered using this mechanism and come pre-installed - although not activated - as part of the standard ONOS distribution. This includes any providers, such as OpenFlow providers. In this way, all optional software components can be installed into and withdrawn from ONOS without the need to rebuild, or even to reconfigure ONOS itself.

Application Definition

Applications can be uploaded or defined in ONOS using either a plain app.xml file or a package file (ZIP) containing an app.xml file, any OSGi bundles,  or feature definition file. The app.xml file specifies the following attributes:

  • name - application name, specified in reverse DNS notation
  • version - application version
  • origin - company or organization where application originated
  • description - short description of the application
  • features - list of Apache Karaf features that comprise the application
  • featuresRepo - optional URL of application feature definition artifact

The following is an example of of the ONOS OnePing sample application app.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<app name="org.onosproject.oneping" origin="ON.Lab" version="1.2.0"
     featuresRepo="mvn:org.onosproject/oneping-app-features/1.2.0-SNAPSHOT/xml/features"
     features="oneping-app,onos-app-tvue">
    <description>One-Ping-Only sample application!</description>
</app>

Application Package

If an application needs to deliver artifacts, such as feature definitions or OSGi bundles which are not available in a public object repository such as Maven central, it can be packaged into an application package file, which is a ZIP file that contains the above app.xml descriptor as well as any other artifacts organized using repository structure hierarchy. The following describes the structure of the application package file:

  • app.xml - application descriptor
  • m2/<groupId>/<artifactId>/<version>/<featuresRepo>
  • m2/<groupId>/<artifactId>/<version>/<artifact>
  • ...

Currently, application package files can be produced using maven-assembly-plugin, but in the near future onos-maven-plugin will offer capability to easily produce properly structured application package files.

CLI Commands

Administrators can interact with the inventory of applications using the following console commands:

  • apps - lists all installed applications
  • app install <mvn-url> ... - installs applications by downloading from the specified URLs (not implemented yet)
  • app activate <app-name> ... - activates all specified applications
  • app deactivate <app-name> ... - deactivates all specified applications
  • app uninstall <app-name> ... - uninstalls all specified applications 

REST API

Orchestration systems and tools can use the REST API to interact with the application subsystem using the following:

  • GET /onos/v1/applications - gets a list of all installed applications
  • GET /onos/v1/applications/<app-name> - gets the information about the named application
  • POST /onos/v1/applications - installs application using the posted app.xml or application package file (ZIP)
  • DELETE /onos/v1/applications/<app-name> - uninstalls the named application
  • POST /onos/v1/applications/<app-name>/active - activates the named application
  • DELETE /onos/v1/applications/<app-name>/active - deactivates the named application

Maven Example

 

Builtin Sample & Test Applications

 

 

  • No labels