ONOS, Open Network Operating System, is a newly released open-source SDN controller that is focused on service provider use-cases. Similar to OpenDaylight, the platform is written in Java and uses Karaf/OSGi for functionality management. - SDNHub.org
The Open Network Operating System (ONOS) is a software defined networking (SDN) OS for service providers that has scalability, high availability, high performance and abstractions to make it easy to create apps and services. The platform is based on a solid architecture and has quickly matured to be feature rich and production ready. The community has grown to include over 50 partners and collaborators that contribute to all aspects of the project including interesting use cases such as CORD. - onosproject.org
I see there are a lot of tutorial build ONOS based debian os. And a little of them, make it above centos or RHEL. I just want to write my experience build onos from scratch above centos os. I try to build it based on CENTOS 7. Because I installed Centos 7 with minimal install, so to build up the ONOS. I need some software that supported, like: wget, github, nmap, and also download karaf and maven, because the platform is weitten in Java and the functinality management uses Karaf or you may fammiliar with OSGi (Open Service Gateway Initiative, refer this link to know more: http://www.javaworld.com/article/2077837/java-se/hello--osgi--part-1--bundles-for-beginners.html)
There are many tutorial ONOS installation, but they use ubuntu as Core OS. So, here, I want to try to build ONOS based on Centos 7. It's easy when you Install it from scratch. Below the installation flow, that I use to deploy ONOS om Centos 7:
- Install Environment Tools
In this step, we need successor tools to deploy ONOS, like wget and git (if you installed centos 7 with minimal install method)yum install -y wget net-tools yum install git -y
- Open port in firewalld for onos application:
on Centos 7, there is firewalld was installed, you should open the ports that ONOS use to communicate with external network, the ONOS ports are:
a. 8181 for web
b. 6633 for listener
c. 8081 for karaf consolesystemctl start firewalld firewall-cmd --zone=public --add-port=8181/tcp --permanent firewall-cmd --zone=public --add-port=6633/tcp --permanent firewall-cmd --zone=public --add-port=8101/tcp --permanent systemctl restart firewalld
After that verifying, make sure those ports are allowed/openedfirewall-cmd --zone=public --list-all
- Clone ONOS Project from git repository
cd ~/ git clone https://gerrit.onosproject.org/onos
Check the branch master to update repo gitcd onos git checkout master # checks out 'master' as the working branch git pull --rebase origin master # pulls the latest code from Gerrit, and rebases any local changes onto origin/master
- Download Apache Maven and Karaf
Create Folder Downloads and Application.cd ~ pwd #make sure pwd under root mkdir Downloads Applications
Download Apache Maven and Karafcd Downloads wget http://archive.apache.org/dist/karaf/3.0.5/apache-karaf-3.0.5.tar.gz #download karaf 3.0.5 wget http://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz #download maven 3.3.9
Unzip with Tar Apache Maven and Karaf to Application Foldertar -zxvf apache-karaf-3.0.5.tar.gz -C ../Applications/ #untar karaf to Applications/ tar -zxvf apache-maven-3.3.9-bin.tar.gz -C ../Applications/ #untar maven to Application/
Editing Karaf
add script "mvn:org.onosproject/onos-features/1.5.0-SNAPSHOT/xml/features" in org.apache.karaf.features.cfgcd ~/Applications/apache-karaf-3.0.5/etc/ vi org.apache.karaf.features.cfg
Change the ip "0.0.0.0" instances to "127.0.0.1" in org.apache.karaf.management.cfgvi org.apache.karaf.management.cfg
- Install JAVA 8
Download JAVA 8wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.rpm"
Install JAVA 8rpm -ivh jdk-8u45-linux-x64.rpm
- bashsrc setting
Adding ONOS parameter on JAVA environment to build up ONOS Modulecat >> ~/.bashrc << EOF export ONOS_ROOT=~/onos source $ONOS_ROOT/tools/dev/bash_profile export JAVA_HOME=/usr/java/jdk1.8.0_45/ export JRE_HOME=/usr/java/jdk1.8.0_45/jre/ export KARAF_ROOT=/root/Applications/apache-karaf-3.0.5 export M2_HOME=/root/Applications/apache-maven-3.3.9 export ONOS_USER=root export ONOS_GROUP=root export ONOS_IP=w.x.y.z #Your IP Interface to reach ONOS EOF source ~/.bashrc #need investigate
- Building ONOS
cd ~/onos mvn clean install
Packaging ONOS tar.gz or zip distributions after Build Completeop
- Starting onos
source tools/dev/bash_profile ok clean
Open web GUI
Username : karaf
Password : karaf
After login
Access The console (Karaf console)
ssh w.x.y.z@8101
Username : karaf
Password : karaf
Finally done, you can interop with your device, or test the functionality with mininet.
0 Comments
Post a Comment