...
Info |
---|
This tutorial assumes that you have docker installed on your system. You can install it on Ubuntu systems by following the instructions outlined here: https://docs.docker.com/installation/ubuntulinux/#installation |
Download the ONOS Docker image
The ONOS docker image is built and published on docker hub (as an automated build). You can simply obtain it by running:
...
Code Block |
---|
$ sudo docker images REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE ... onosproject/onos latest a427c3589892 Less than a second ago 736.5 MB ... |
Run your docker image
Now that the image has been downloaded, let's start a few instances of ONOS.
...
Now you have three instance of ONOS running.
Cluster-ize your instances
Now you have three instances of ONOS. Each of these instances is running independently but we want them to run in a cluster. First we need to download a utility (called onos-form-cluster) that will make it easy for us to form the cluster:
...
And now we have a formed ONOS cluster. Pretty easy right?!
Activate Openflow
Now, the cluster only have essential apps running. To give it a try, activate openflow and the forwarding app:
...
Code Block |
---|
sudo mn --topo tree,2 --controller remote,ip=`docker-ip onos1` *** Creating network *** Adding controller *** Adding hosts: h1 h2 h3 h4 *** Adding switches: s1 s2 s3 *** Adding links: (s1, s2) (s1, s3) (s2, h1) (s2, h2) (s3, h3) (s3, h4) *** Configuring hosts h1 h2 h3 h4 *** Starting controller c0 *** Starting 3 switches s1 s2 s3 ... *** Starting CLI: mininet> pingall *** Ping: testing ping reachability h1 -> h2 h3 h4 h2 -> h1 h3 h4 h3 -> h1 h2 h4 h4 -> h1 h2 h3 *** Results: 0% dropped (12/12 received) mininet> |
Remarks
The ONOS cluster you just created is not running any specific application. To install an application you will need to use the onos-app utility as documented in Application Subsystem.
Building your own ONOS docker image
If you have modified the source code of ONOS, you might want to build your modified ONOS into your own docker image so that you can run it in some environment. The following command will build an ONOS docker image out of an ONOS source tree:
...