Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added missing information on how to run ONOS using Bazel

...

To execute ONOS tests, simply run buck test command. Note that this will run all unit tests, integration tests as well as Checkstyle code validation. As with the build steps, Buck will only execute tests for modules impacted by code changes upstream along the dependency graph.

Building ONOS via Bazel (New)

Newer versions of ONOS are build using Bazel, note that it as far as 2020 this may only work in the ubuntu desktop versions.

Use wget to get the latest version of Bazel (you can use other versions of bazel and other informations at this link)

$ wget https://github.com/bazelbuild/bazelisk/releases/download/v1.4.0/bazelisk-linux-amd64

Install Bazel with the appropriate permissions

$ chmod +x bazelisk-linux-amd64
$ sudo mv bazelisk-linux-amd64 /usr/local/bin/bazel

Check if Bazel was installed by verifying its version
$ bazel version

Clone ONOS project using git in the home directory

$ git clone https://gerrit.onosproject.org/onos

Set ONOS root folder

$ export ONOS_ROOT=~/onos

$ source $ONOS_ROOT/tools/dev/bash_profile

Move to ONOS main folder using ONOS_ROOT

$ cd $ONOS_ROOT

Use Bazel to build ONOS

$ bazel build onos

Running ONOS Locally

ONOS has been architected to run in a distributed configuration where multiple instances cooperate as a single cluster. However, there are times during the development when using a single ONOS instance is perfectly sufficient. This includes development of southbound providers, CLI, REST API and GUI among others.

...

 Hopefully, you have found this screencast useful. Have a great day… and happy coding!

Building ONOS via Bazel (New)

Newer versions of ONOS are build using Bazel, note that it as far as 2020 this may only work in the ubuntu desktop versions.

Use wget to get the latest version of Bazel (you can use other versions of bazel and other informations at this link)

$ wget https://github.com/bazelbuild/bazelisk/releases/download/v1.4.0/bazelisk-linux-amd64

Install Bazel with the appropriate permissions

$ chmod +x bazelisk-linux-amd64
$ sudo mv bazelisk-linux-amd64 /usr/local/bin/bazel

Check if Bazel was installed by verifying its version
$ bazel version

Clone ONOS project using git in the home directory

$ git clone https://gerrit.onosproject.org/onos

Set ONOS root folder

$ export ONOS_ROOT=~/onos

$ source $ONOS_ROOT/tools/dev/bash_profile

Move to ONOS main folder using ONOS_ROOT

$ cd $ONOS_ROOT

Use Bazel to build ONOS

$ bazel build onos

You can use bazel the test ONOS installation using the following command

$ bazel query 'tests(//...)' | xargs bazel test

Now you can Run ONOS using the following command

$ bazel run onos-local -- clean debug