...
The first step is to complete the first three steps of the ONOS from Scratch [OLD] tutorial. So only do the VM preparation, install required software, and setup the build environment. Don't bother creating a cell definition, nor packaging and deploying ONOS. This document has new instructions for those steps.
...
Containers are very convenient since we can automatically obtain their IPs. This is what my cell definition looks like; you want to put this in a file in onos/tools/test/cells/
. You definitely want to verify if the ONOS_NIC
variable corresponds to your system settings, and also OCN
which points to the machine where Mininet is running. Feel free to customize the ONOS_FEATURESAPPS
to your liking. Finally, you have to reload the cell if you create additional containers, so the new IPs get picked up.
Code Block | ||
---|---|---|
| ||
# LXC-based multi ONOS instance & LINC-OE mininet box export ONOS_NIC=10.0.3.* I=1 for CONTAINER in $( sudo lxc-ls ); do IP=`sudo lxc-ls --fancy -F ipv4 $CONTAINER | tail -1` export OC${I}=${IP} let I=I+1 done export OCI=$OC1 export OCN="192.168.56.9" export ONOS_FEATURESAPPS="webconsole,onos-api,onos-core,onos-cli,onos-openflow,onos-app-fwd,onos-app-optical,onos-gui,onos-rest,onos-app-proxyarpdrivers,openflow,proxyarp,optical,bgprouter" export ONOS_USER=ubuntu export ONOS_GROUP=ubuntu |
...
Finally, log out of the container by pressing Ctrl-d or typing exit
.
Cloning Your Container
...
We're now ready to make as many clones of the original container as you want ONOS instances. Repeat the following steps as many times as you'd like, giving each new container a unique name.
...