Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update karaf and maven version

...

  • Java 8 JDK (Oracle Java recommended; OpenJDK is not as thoroughly tested)
  • Apache Maven (3.3.0 and later)1
  • git
  • bash (for packaging & testing)
  • Apache Karaf ( 3.0.2 and later) 3

Finally, to take full advantage of the ONOS test suite and various developer conveniences, it is also recommended that developers have the following tools available on their machines:

...

Code Block
languagetext
$ cd Downloads
$ tar -zxvf apache-karaf-3.0.23.tar.gz -C ../Applications/
$ tar -zxvf apache-maven-3.23.21-bin.tar.gz -C ../Applications/

...

ONOS may be run on the build machine directly, or packaged and launched on remote machines or VMs. This section describes both launching ONOS on the build machine (locally), and packaging and deploying on a remote (target) machine. 

Initial configuration

Karaf must first be configured to load the ONOS-related modules. Karaf's configuration file $KARAF_ROOT/etc/org.apache.karaf.features.cfg . Edit the file:

Append the following to featuresRepositories:

Code Block
languagetext
mvn:org.onosproject/onos-features/1.1.0/xml/features

Note: Above is an example when using ONOS version 1.1.0. When using snapshot version, etc. replace them with the version you intend to use e.g., 1.1.0-SNAPSHOT, etc.

Append the following to featuresBoot:

Code Block
languagetext
onos-api,onos-core-trivial,onos-cli,onos-openflow,onos-app-fwd,onos-app-mobility,onos-gui

 The above loads the trivial (single-instance) ONOS core, forwarding, and Web GUI applications.

Running locally on build machine

Note
titleOut-Of-Date Content

Blackbird (1.1.0) requires extra config files to run locally. We wrote a script named 'onos-setup-karaf' to copy those config files to the correct location. However, this script is only in master branch for now. We will soon back port it to the 1.1 branch. Before that, you should use the method described in the section 'Running remotely with onos-package and onos-install' to run ONOS.

Running locally on build machine

First, we need to copy several config files to the local karaf directory. This can be easily done by running the following command:

Code Block
$ onos-setup-karaf clean <node-ip>

After running maven as described in Building ONOS and making the above changes, karaf can be used to start ONOS and attach to its CLI:

Code Block
languagetext
$ karaf clean
Welcome to Open Network Operating System (ONOS)!
     ____  _  ______  ____   
    / __ \/ |/ / __ \/ __/    
   / /_/ /    / /_/ /\ \       
   \____/_/|_/\____/___/      

                             
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown ONOS.

onos>

...

Tip

Launching karaf may bring up the default karaf prompt, without the 'ONOS' ASCII art. This is purely cosmetic, and shouldn't affect functionality.

If the branding is desired, one can move the branding bundle created during the build process to karaf's lib directory:

Code Block
languagetext
$ cp ${ONOS_ROOT}/tools/package/branding/target/onos-branding-1.12.0.jar ${KARAF_ROOT}/lib/

And relaunch karaf.

...

  1. Runonos-package to produce a self-contained tar archive:

    Code Block
    languagetext
    $ onos-package
    -rw-r--r-- 1 onosuser wheel 34187574 Nov 8 14:52 /tmp/onos-1.12.0.onosuser.tar.gz

    As seen above, the file has the naming convention "onos-1.12.0.<username>.tar.gz", and is created under the /tmp directory.

  2. Deploy the binary by pointing onos-install to the remote target to run ONOS on (192.168.56.20 in this example):

    Code Block
    languagetext
    $ onos-install 192.168.56.20
    onos start/running, process 9513
    Tip
    If ONOS has been previously installed on a remote machine, onos-install -f [target] will force a reinstall.

...