Brief Description

In this tutorial, we are going to build ONOS controller cluster using tutorial VM image. (Download here)

At least two VM instances are needed to build a cluster, obviously. We use two in this tutorial.

Fix Environment Variables

ONOS_USER, KARAF_ROOT and PATH are incorrect in the tutorial VM.

Configure Node Information

If you are not using VirtualBox, the ONOS_NIC could probably be wrong. I use VMWare Fusion on OS X, in which DHCP leases 192.168.136.0/24 by default rather than 192.168.56.0/24.

ONOS_FEATURES is also an important environment variable which should be set correctly when we load developer enviroment. Just make sure onos-core is included.

Check Cluster Status

• Check cluster status

You should see nodes=2 if nothing goes wrong.

Start Mininet

Mininet switches need to be reconfigure to communicates with all controllers in the cluster. Take ~/onos/tools/test/topos/tower.py for example, we need to add both controllers in the script.

After modification, start Mininet by

Check Cluster Status, Again

Now you should see something like this

What’s Next?

This environment is now ready for you to continue the official tutorial about Distributed ONOS. You can now change mastership, or, kill one of the two controllers by rebooting it. Have fun.