c8cd0b0cf88d3a5a154cfb7df5493e06e8651463
[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 If you want to use ODL Carbon (current master) you need to change also the versions of Honeycomb and VPP. The repositories are added
13 to "/etc/apt/sources.list.d/99fd.io.list". For Boron use "https://nexus.fd.io/content/repositories/fd.io.stable.1609.ubuntu.trusty.main/"
14 which is default and for Carbon use "https://nexus.fd.io/content/repositories/fd.io.master.ubuntu.trusty.main/".
15 You just need to comment out undesired repositories and uncomment repository that you want to use, then update VPP and honeycomb to new versions.
16
17 DEMO setup
18 ----------
19 (repeat this everytime you want to reset the demo)
20 To reset state of VMs run the following command on all VMs. It resolves on which node it is running and
21 configures IPs to vpp::
22
23     /vagrant/reload-nodes.sh
24
25 To enter VMs use "vagrant ssh" command::
26
27     vagrant ssh controller
28     vagrant ssh compute0
29     vagrant ssh compute1
30
31 On controller the script will start ODL in debug mode.
32
33 You need to install following features in ODL (logs are optional)::
34
35     feature:install odl-vbd-ui odl-groupbasedpolicy-ui odl-groupbasedpolicy-neutron-vpp-mapper odl-restconf
36
37     log:set ERROR org.opendaylight.netconf
38     log:set TRACE org.opendaylight.groupbasedpolicy.renderer.vpp
39     log:set TRACE org.opendaylight.groupbasedpolicy.neutron.vpp.mapper
40     log:set TRACE org.opendaylight.vbd.impl
41     log:set ERROR org.opendaylight.netconf
42     log:tail
43
44 You can now import vpp-demo collection (local-demo-postman.json) to postman and start demo by following these steps::
45
46     1. You need to register VPP nodes in postman collection:
47        a. Register VPP controller
48        b. Register VPP compute0
49        c. Register VPP compute1
50     2. After nodes are connected (you can check in "VPP renderer operational") yo can feed data to ODL:
51        use "neutron data - initial" from collection
52     3. This will take some time, then you should be able to add tap ports to namespaces and ping between them
53
54 As the last thing you need to assign Tap ports which were created by the above configuration to according namespaces.
55
56 On controller::
57
58     sudo ip netns add vpp-controller
59     sudo ip link set dev qr-6a616da7-d1 up netns vpp-controller
60     sudo ip link set dev tapc6076003-2b up netns vpp-controller
61     sudo ip netns exec vpp-controller ip addr add 10.11.12.1/24 dev qr-6a616da7-d1
62     sudo ip netns exec vpp-controller ip addr add 10.11.12.2/24 dev tapc6076003-2b
63
64     sudo ip netns exec vpp-controller ping 10.11.12.3 -c 5
65     sudo ip netns exec vpp-controller ping 10.11.12.4 -c 5
66     sudo ip netns exec vpp-controller ping 10.11.12.5 -c 5
67     sudo ip netns exec vpp-controller ping 10.11.12.6 -c 5
68
69 On compute0::
70
71     sudo ip netns add vpp-compute0
72     sudo ip link set dev tap8def6a66-7d up netns vpp-compute0
73     sudo ip link set dev tapa9607d99-0a up netns vpp-compute0
74     sudo ip netns exec vpp-compute0 ip addr add 10.11.12.4/24 dev tap8def6a66-7d
75     sudo ip netns exec vpp-compute0 ip addr add 10.11.12.3/24 dev tapa9607d99-0a
76
77     sudo ip netns exec vpp-compute0 ping 10.11.12.1 -c 5
78     sudo ip netns exec vpp-compute0 ping 10.11.12.2 -c 5
79     sudo ip netns exec vpp-compute0 ping 10.11.12.5 -c 5
80     sudo ip netns exec vpp-compute0 ping 10.11.12.6 -c 5
81
82 On compute1::
83
84     sudo ip netns add vpp-compute1
85     sudo ip link set dev tap7415f153-2a up netns vpp-compute1
86     sudo ip link set dev tapfa943a17-ac up netns vpp-compute1
87     sudo ip netns exec vpp-compute1 ip addr add 10.11.12.5/24 dev tap7415f153-2a
88     sudo ip netns exec vpp-compute1 ip addr add 10.11.12.6/24 dev tapfa943a17-ac
89
90     sudo ip netns exec vpp-compute1 ping 10.11.12.1 -c 5
91     sudo ip netns exec vpp-compute1 ping 10.11.12.2 -c 5
92     sudo ip netns exec vpp-compute1 ping 10.11.12.3 -c 5
93     sudo ip netns exec vpp-compute1 ping 10.11.12.4 -c 5