Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Applications can be packaged into a single .oar (ONOS Application aRchive) file , for easy delivery of software to a running ONOS cluster. The .oar file is a ZIP file that contains all artifacts, such as feature definitions or OSGi bundles, which may otherwise not be available on Maven central. The following describes the structure of the .oar file:

...

The application package files can be produced using onos-maven-plugin quite easily. The pom.xml file needs to include onos-maven-plugin in its build section and if the pom.xml defines onos.app.name property, or if the module base directory contains app.xml file, the plugin will build the application .oar file and this file will be installed into M2 repository during Maven install phase. See the Maven example below.

...

  • onos.app.name - name of the application, should be specified in reverse DNS notation, e.g. org.onosproject.fwd
  • onos.app.origin - name of the originating entity or company, e.g. ON.Lab
  • onos.app.requires - comma-separated list of applications required by this app

Multi-bundle applications, or those that need to bring in other artifacts, or custom feature dependencies can be defined using the app.xml file, located in the module base directory. 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
  • apps - comma-separated list of applications required by this app
  • artifact - lists artifacts that are to be included in application package

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

Code Block
<?xml version="1.0" encoding="UTF-8"?>
<app name="org.onosproject.onepingsample" origin="ON.Lab" version="1.2.0${project.version}"
     featuresRepo="mvn:org.onosproject/oneping-app-features/1.2.0-SNAPSHOT${project.groupId}/${project.artifactId}/${project.version}/xml/features"
     features="oneping-app,onossample-app-tvue">
    <description>One-Ping-Only sample application!<description>${project.description}</description>
    <artifact>mvn:...</artifact>
</app>

The app.xml file can contain Maven properties such as ${project.groupId}, ${project.artifactId}, ${project.version}, ${project.description}, ${short.version}, which  which will result in substitution of the appropriate value from the Maven pom.xml file. It is highly recommended to use these in order to minimize the amount of maintenance required.

...

Orchestration systems and tools can use the REST API to interact with the application subsystem either directly, or using the onos-app shell utility, which uses the REST API and has the following usage:

...

  • org.onosproject.bgprouter - BGP router application, features
  • org.onosproject.config - Network configuration application
  • org.onosproject.demo - Flow throughput test application
  • org.onosproject.election - Master election test application
  • org.onosproject.fwd - Reactive forwarding application using flow subsystem
  • org.onosproject.intentperf - Intent performance test application
  • org.onosproject.metrics - Performance metrics collection
  • org.onosproject.mobility - Host mobility application
  • org.onosproject.null - Null southbound providers for testing
  • org.onosproject.optical - Packet/Optical use-case application
  • org.onosproject.proxyarp - Proxy ARP/NDP application
  • org.onosproject.sdnip - SDN/IP use-case application
  • ...