blob: 703be030f7b90e006c53e42e6b3f7e6cacb8c1ca [file] [log] [blame]
Simon Huntf5d433a2016-03-01 14:31:14 -08001# Simon's LXC-based multi ONOS instances & ONOS mininet VM.
2
3###
4### NOTE:
5### Assumes a route has been set up
6### from 192.168.56.0/24 -> 10.0.3.0/24
7###
8### {dest-net} {gateway} (i.e. container VM)
9### sudo route -n add 10.0.3.0/24 192.168.56.102
10###
11
Simon Hunta855a402016-03-02 14:41:52 -080012## ONOS Cluster VM (has LXC containers for cluster nodes)
Simon Hunt4a24a3e2016-03-09 18:50:43 -080013export OCVM=192.168.56.98
Simon Huntf5d433a2016-03-01 14:31:14 -080014
15#============================================
Simon Hunt3b955642016-03-07 15:03:30 -080016# sdn@ocluster:~$ sudo lxc-ls --fancy
Simon Huntf5d433a2016-03-01 14:31:14 -080017# NAME STATE IPV4 IPV6 AUTOSTART
18# -------------------------------------------
Simon Hunt1ebef9d2016-03-08 11:17:25 -080019# onos1 RUNNING 10.0.3.11 - YES
20# onos2 RUNNING 10.0.3.12 - YES
21# onos3 RUNNING 10.0.3.13 - YES
22# onos4 RUNNING 10.0.3.14 - YES
Simon Huntf5d433a2016-03-01 14:31:14 -080023#============================================
24
Simon Hunta855a402016-03-02 14:41:52 -080025export ONOS_NIC="10.0.3.*"
26
Simon Huntf5d433a2016-03-01 14:31:14 -080027## ONOS instances (LXC containers)
Simon Hunt1ebef9d2016-03-08 11:17:25 -080028export OC1=10.0.3.11
29export OC2=10.0.3.12
30export OC3=10.0.3.13
Simon Huntf810e522016-03-07 17:34:50 -080031
32## keep this out of the initial cluster...
Simon Hunt1ebef9d2016-03-08 11:17:25 -080033## export OC4=10.0.3.14
Simon Huntf5d433a2016-03-01 14:31:14 -080034
35## default ONOS instance
36export OCI=$OC1
37
38## credentials for logging into ONOS instances
39export ONOS_USER=sdn
40
Simon Hunt59f598c2016-03-04 15:15:13 -080041## the apps we want activated at startup
Simon Hunt661d4102016-03-08 15:09:59 -080042export ONOS_APPS="drivers,openflow,proxyarp,drivermatrix,mlb"
Simon Huntf5d433a2016-03-01 14:31:14 -080043
44## mininet VM
Simon Hunt4a24a3e2016-03-09 18:50:43 -080045export OCN="192.168.56.99"
Simon Huntf5d433a2016-03-01 14:31:14 -080046
47export ONOS_WEB_USER=onos
48export ONOS_WEB_PASS=rocks
Simon Hunt4a24a3e2016-03-09 18:50:43 -080049
50# Verify route to LXC cluster
51netstat -nr | grep 10.0.3 | grep -q $OCVM && echo "Routes to LXC in place" || (
52 echo "Route to LXC not found. Adding...";
53 sudo bash -c "route -n delete 10.0.3.0/24; \
54 route -n add 10.0.3.0/24 192.168.56.98" >/dev/null 2>&1
55)