This section covers the details involved in getting, installing, and running ONOS. Both single- and multi-instance cases are described.
...
We recommend the following for if a VM is used for running ONOS:
- Ubuntu Server 14.04 LTS 64-bit
- 2GB or more RAM
- 2 or more processors
In order to build and run ONOS the following are required:
- Java 8 JDK (Oracle Java recommended; OpenJDK is not as thoroughly tested)
- Apache Maven (3.*0 and later)
- git
- bash bash (for packaging & testing)
- Apache Karaf (3.0.2 and later)
Many of these have installers or packages, or, in the case of Karaf, simply be installed by extracting the tar archives to the desired install location.
Finally, to 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:
- IDE (IntelliJ, Eclipse, etc.)
- VirtualBox (or other VM hosting software)
Getting ONOS
The ONOS source can be checked out using git:
Code Block | ||
---|---|---|
| ||
$ git clone ssh://<user>@gerrit.onlab.us:29418/onos-next ~/onos |
...
Java and Maven
The ONOS install process relies on the environment variable JAVA_HOME being properly set. In other words, both mvn --version
and java -version
should report the same Java version:
Tip |
---|
The best way to prevent this version mismatch is to install Maven before Java 8. |
Upgrading to Java 8
For OS X, the latest Oracle Java 8 SDK can be downloaded from Oracle.
For Ubuntu, the following steps will upgrade the installation to Java 8:
Code Block | ||
---|---|---|
| ||
$ sudo add-apt-repository ppa:webupd8team/java -y
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer oracle-java8-set-default -y |
You will have to accept the Oracle binary license terms
Setting JAVA_HOME
If not set automatically during the Java 8 installation process, The JAVA_HOME environment variable should be set to the JRE installation location for Java 8. The process for verifying/setting the proper version varies with platform.
On OS X: The current JAVA_HOME may be verified with:
Code Block language text $ /usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
To set the version, either run or add the following to the shell profile:
Code Block language text $ export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
On Ubuntu: To verify the JAVA_HOME:
Code Block language text $ env | grep JAVA_HOME JAVA_HOME=/usr/lib/jvm/java-8-oracle
If JAVA_HOME is not set or incorrect, either run or add the following to the shell profile:
Code Block language text $ export JAVA_HOME=/usr/lib/jvm/java-8-oracle
Getting ONOS
The ONOS source can be checked out using git:
Code Block | ||
---|---|---|
| ||
$ git clone ssh://<user>@gerrit.onlab.us:29418/onos-next ~/onos |
This clones the repository to your home directory, under a directory named 'onos'.
Tip | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
If the above generates the following error:
make sure that a public key has been uploaded to the ONOS Gerrit by following the steps in the dropdown below.
|
Installing ONOS
Environment Setup
...