3 This is a demonstration/development environment for show-casing OpenDaylight GroupBasedPolicy (GBP) with ServiceFunctionChaining (SFC)
5 This version is using a vagrant box: alagalah/gbpsfc-trusty64 v1.0.1
7 It is important to ./cleandemo.sh before using. A demo.lock file will be added to repo so that first run will fail unless you ./cleandemo.sh
9 This is to ensure that each OVS gets a unique UUID as the Box file will re-use the same UUID for each OVS.
11 After the first time it is very quick.
14 * Edit env.sh for NUM_NODES. (Keep all other vars the same for this version)
15 * Each VM takes approximately 1G RAM, 2GB used HDD (40GB)
17 * demo-symmetric-chain: 6 VMs.
18 * demo-asymmetric-chain: 6 VMs.
19 2. From the directory you cloned into:
24 * If the starting process fail with '/sbin/mount.vboxsf: mounting failed with the error: No such device' line
25 (usually occur after first halt) run 'vagrant plugin install vagrant-vbguest' command on host. It should solve the problem.
28 * Currently it is expected that that controller runs on the host hosting the VMs.
29 * Tested using groupbasedpolicy beryllium
30 If you are building and get 'illegal unicode escape' error,
31 you have to rename two yang files in 'groupbasedpolicy\ui-backend\src\main\yang'.
32 These files have to start with a character other than 'u'.
33 E.g. rename 'ui-backend.yang' to 'aui-backend.yang' and 'ui-backend-impl.yang' to 'aui-backend-impl.yang'.
34 * Start controller by running bin/karaf and install following features in karaf:
37 feature:install odl-groupbasedpolicy-ofoverlay odl-groupbasedpolicy-ui odl-restconf
40 * Run `log:tail | grep renderer` and wait until the following message appears in the log:
42 INFO - OFOverlayRenderer - org.opendaylight.groupbasedpolicy.ofoverlay-renderer - Initialized OFOverlay renderer
44 * Now you can ^C the log:tail if you wish
48 * 8 docker containers in 2 x EPGs (web, client)
49 * contract with ICMP and HTTP
51 * 2 docker containers in 2 x EPGs (web, client)
52 * contract with ICMP (ALLOW) and HTTP (CHAIN, where Client request is chained, Web reverse path is reverse path of chain)
54 * 2 docker containers in 2 x EPGs (web, client)
55 * contract with ICMP (ALLOW) and HTTP (CHAIN, where Client request is chained, Web reverse path is ALLOW)
67 * h35_{x} are in EPG:client
68 * h36_{x} are in EPG:web
70 To run, from host folder where Vagrantfile located do:
72 ` ./startdemo.sh demo-gbp1`
74 After this, `infrastructure_config.py` will be copied from `/demo-gbp1`, and you are ready to start testing.
78 SSH to test VM (may take some seconds):
88 Check docker containers running on your VM:
93 Notice there are containers from two different endpoint groups, "h35" and "h36".
94 Enter into the shell on one of "h36" (web) container (on `gbpsfc1` it will be `h36_4`, its IP is `10.0.36.4`,
95 you will need it later).
96 *(You need double ENTER after `docker attach`)*
103 python -m SimpleHTTPServer 80
106 Press `Ctrl-P-Q` to return to your root shell on `gbpsfc1`
108 Enter into one of "h35" (client) container,
109 ping the container where HTTP server runs,
110 and connect to index page:
112 *We use eternal loop here to imitate web activity.
113 After finishing your test, you might want to stop the loop with `Ctrl-C`*
115 docker attach h35_{x}
117 while true; do curl 10.0.36.4; done
120 You may `ping` and `curl` to the web-server from any test VM.
122 `Ctrl-P-Q` to leave back to root shell on VM.
124 Now watch the packets flow:
131 exit #leave root shell
132 exit #close ssh session
134 Repeat `vagrant ssh` etc. for each of gbpsfc2, gbpsfc3.
138 When finished from host folder where Vagrantfile located do:
142 If you like `vagrant destroy` will remove all VMs.
144 ##demo-symmetric-chain / demo-asymmetric-chain
147 * gbpsfc1: gbp (client initiates transactions from here)
152 * gbpsfc6: gbp (run a server here)
155 * h35_2 is in EPG:client on gbpsfc1
156 * h36_4 is in EPG:web on gbpsfc6
158 To run, from host folder where Vagrantfile located do:
160 ` ./startdemo.sh demo-symmetric-chain` | `demo-asymmetric-chain`
162 ### To test by sending traffic:
163 Start a test HTTP server on h36_4 in VM 6.
165 *(don't) forget double ENTER after `docker attach`*
169 sudo -E docker attach h36_4
170 python -m SimpleHTTPServer 80
173 Ctrl-P-Q to detach from docker without stopping the SimpleHTTPServer, and logoff gbpsfc6.
175 Now start client traffic, either ping or make HTTP requests to the server on h36_4.
180 sudo -E docker attach h35_2
183 while true; do curl 10.0.36.4; sleep 1; done
186 Ctrl-P-Q to detach from docker, leaving the client making HTTP requests, and logoff gbpsfc1.
189 Look around: use "vagrant ssh" to the various machines
190 * take packet captures on eth1.
191 * sudo ovs-dpctl dump-flows`
193 ### When finished from host folder where Vagrantfile located do:
197 If you like `vagrant destroy` will remove all VMs
199 ##Preparing to run another demo
200 1. In the vagrant directory, run cleandemo.sh
201 2. stop controller (logout of karaf)
202 3. Remove journal and snapshot directories from controller directory.
203 4. Restart the controller, install features, wait, as above.
206 # Useful vagrant plugins
208 You can install plugins using
211 vagrant plugin install <plugin>
215 vagrant-cachier - faster build times as APT repos cached
216 vagrant-vbguest - updates VirtualBox Guest Additions versions (if possible)