introducing vpp-demo
[groupbasedpolicy.git] / demos / vpp-demo / readme.rst
1 VPP-DEMO for GBP
2 ================
3 This demo requires Vagrant (tested on 1.8.5 version) and VirtualBox (tested on 5.1.2 version)
4 To setup the environment just navigate to groupbasedpolicy\demos\vpp-demo and execute following command::
5
6     vagrant up
7
8 Vagrant then creates 3VMs (controller, compute0 and compute1). After vagrant finishes you can stop the VMs with
9 "vagrant halt" command and bring them up again with "vagrant up" command. If distribution-karaf-0.5.0-Boron.tar.gz is
10 available in vpp-demo folder vagrant setup will use this one. If it is not it will download ODL to controller node.
11
12 DEMO setup
13 ----------
14 (repeat this everytime you want to reset the demo)
15 To reset state of VMs run the following command on all VMs. It resolves on which node it is running and
16 configures IPs to vpp::
17
18     /vagrant/reload-nodes.sh
19
20 To enter VMs use "vagrant ssh" command::
21
22     vagrant ssh controller
23     vagrant ssh compute0
24     vagrant ssh compute1
25
26 On controller the script will start ODL in debug mode.
27
28 You need to install following features in ODL (logs are optional)::
29
30     feature:install odl-vbd-ui odl-groupbasedpolicy-ui odl-groupbasedpolicy-neutron-vpp-mapper odl-restconf
31
32     log:set ERROR org.opendaylight.netconf
33     log:set TRACE org.opendaylight.groupbasedpolicy.renderer.vpp
34     log:set TRACE org.opendaylight.groupbasedpolicy.neutron.vpp.mapper
35     log:set TRACE org.opendaylight.vbd.impl
36     log:set ERROR org.opendaylight.netconf
37     log:tail
38
39 You can now import vpp-demo collection (local-demo-postman.json) to postman and start demo by following these steps::
40
41     1. You need to register VPP nodes in postman collection:
42        a. Register VPP controller
43        b. Register VPP compute0
44        c. Register VPP compute1
45     2. After nodes are connected (you can check in "VPP renderer operational") yo can feed data to ODL:
46        use "neutron data - initial" from collection
47     3. This will take some time, then you should be able to add tap ports to namespaces and ping between them
48
49 As the last thing you need to assign Tap ports which were created by the above configuration to according namespaces.
50
51 On controller::
52
53     sudo ip netns add vpp-controller
54     sudo ip link set dev qr-6a616da7-d1 up netns vpp-controller
55     sudo ip link set dev tapc6076003-2b up netns vpp-controller
56     sudo ip netns exec vpp-controller ip addr add 10.11.12.1/24 dev qr-6a616da7-d1
57     sudo ip netns exec vpp-controller ip addr add 10.11.12.2/24 dev tapc6076003-2b
58
59     sudo ip netns exec vpp-controller ping 10.11.12.3 -c 5
60     sudo ip netns exec vpp-controller ping 10.11.12.4 -c 5
61     sudo ip netns exec vpp-controller ping 10.11.12.5 -c 5
62     sudo ip netns exec vpp-controller ping 10.11.12.6 -c 5
63
64 On compute0::
65
66     sudo ip netns add vpp-compute0
67     sudo ip link set dev tap8def6a66-7d up netns vpp-compute0
68     sudo ip link set dev tapa9607d99-0a up netns vpp-compute0
69     sudo ip netns exec vpp-compute0 ip addr add 10.11.12.4/24 dev tap8def6a66-7d
70     sudo ip netns exec vpp-compute0 ip addr add 10.11.12.3/24 dev tapa9607d99-0a
71
72     sudo ip netns exec vpp-compute0 ping 10.11.12.1 -c 5
73     sudo ip netns exec vpp-compute0 ping 10.11.12.2 -c 5
74     sudo ip netns exec vpp-compute0 ping 10.11.12.5 -c 5
75     sudo ip netns exec vpp-compute0 ping 10.11.12.6 -c 5
76
77 On compute1::
78
79     sudo ip netns add vpp-compute1
80     sudo ip link set dev tap7415f153-2a up netns vpp-compute1
81     sudo ip link set dev tapfa943a17-ac up netns vpp-compute1
82     sudo ip netns exec vpp-compute1 ip addr add 10.11.12.5/24 dev tap7415f153-2a
83     sudo ip netns exec vpp-compute1 ip addr add 10.11.12.6/24 dev tapfa943a17-ac
84
85     sudo ip netns exec vpp-compute1 ping 10.11.12.1 -c 5
86     sudo ip netns exec vpp-compute1 ping 10.11.12.2 -c 5
87     sudo ip netns exec vpp-compute1 ping 10.11.12.3 -c 5
88     sudo ip netns exec vpp-compute1 ping 10.11.12.4 -c 5