1 OpenStack with Virtual Tenant Network
2 =====================================
4 This section describes using OpenDaylight with the VTN manager feature providing
5 network service for OpenStack. VTN manager utilizes the OVSDB southbound service
6 and Neutron for this implementation. The below diagram depicts the communication
7 of OpenDaylight and two virtual networks connected by an OpenFlow switch using
10 .. figure:: images/vtn/OpenStackDeveloperGuide.png
12 OpenStack Architecture
14 Configure OpenStack to work with OpenDaylight(VTN Feature) using PackStack
15 --------------------------------------------------------------------------
17 Prerequisites to install OpenStack using PackStack
18 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20 * Fresh CentOS 7.1 minimal install
21 * Use the below commands to disable and remove Network Manager in CentOS 7.1,
25 systemctl stop NetworkManager
26 systemctl disable NetworkManager
28 * To make SELINUX as permissive, please open the file "/etc/sysconfig/selinux" and change it as "SELINUX=permissive".
29 * After making selinux as permissive, please restart the CentOS 7.1 machine.
31 Steps to install OpenStack PackStack in CentOS 7.1
32 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34 * To install OpenStack juno, use the following command,
39 yum -y install https://repos.fedorapeople.org/repos/openstack/openstack-juno/rdo-release-juno-1.noarch.rpm
42 * To install the packstack installer, please use the below command,
46 yum -y install openstack-packstack
48 * To create all-in-one setup, please use the below command,
52 packstack --allinone --provision-demo=n --provision-all-in-one-ovs-bridge=n
54 * This will end up with Horizon started successfully message.
56 Steps to install and deploy OpenDaylight in CentOS 7.1
57 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
59 * Download the latest Lithium distribution code in the below link,
63 wget https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.3.4-Lithium-SR4/distribution-karaf-0.3.4-Lithium-SR4.zip
66 * Unzip the lithium distribution code by using the below command,
70 unzip distribution-karaf-0.3.4-Lithium-SR4.zip
72 * Please do the below steps in the OpenDaylight to change jetty port,
74 * Change the jetty port from 8080 to something else as swift proxy of
75 OpenStack is using it.
76 * Open the file "etc/jetty.xml" and change the jetty port from 8080 to 8910
77 (we have used 8910 as jetty port you can use any other number).
78 * Start VTN Manager and install odl-vtn-manager-neutron in it.
79 * Ensure all the required ports(6633/6653,6640 and 8910) are in the listen
80 mode by using the command "netstat -tunpl" in OpenDaylight.
82 Steps to reconfigure OpenStack in CentOS 7.1
83 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
85 * Steps to stop Open vSwitch Agent and clean up ovs
89 sudo systemctl stop neutron-openvswitch-agent
90 sudo systemctl disable neutron-openvswitch-agent
91 sudo systemctl stop openvswitch
92 sudo rm -rf /var/log/openvswitch/*
93 sudo rm -rf /etc/openvswitch/conf.db
94 sudo systemctl start openvswitch
102 systemctl stop neutron-server
105 * Verify that OpenDaylight's ML2 interface is working:
109 curl -v admin:admin http://{CONTROL_HOST}:{PORT}/controller/nb/v2/neutron/networks
115 If this does not work or gives an error, check Neutron's log file in
116 */var/log/neutron/server.log*. Error messages here should give
117 some clue as to what the problem is in the connection with OpenDaylight
119 * Configure Neutron to use OpenDaylight's ML2 driver:
123 sudo crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 mechanism_drivers opendaylight
124 sudo crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 tenant_network_types local
125 sudo crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 type_drivers local
126 sudo crudini --set /etc/neutron/dhcp_agent.ini DEFAULT ovs_use_veth True
128 cat <<EOT | sudo tee -a /etc/neutron/plugins/ml2/ml2_conf.ini > /dev/null
132 url = http://{CONTROL_HOST}:{PORT}/controller/nb/v2/neutron
135 * Reset Neutron's ML2 database
139 sudo mysql -e "drop database if exists neutron_ml2;"
140 sudo mysql -e "create database neutron_ml2 character set utf8;"
141 sudo mysql -e "grant all on neutron_ml2.* to 'neutron'@'%';"
142 sudo neutron-db-manage --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head
144 * Start Neutron Server
148 sudo systemctl start neutron-server
150 * Restart the Neutron DHCP service
154 system restart neutron-dhcp-agent.service
156 * At this stage, your Open vSwitch configuration should be empty:
160 [root@dneary-odl-compute2 ~]# ovs-vsctl show
161 686989e8-7113-4991-a066-1431e7277e1f
165 * Set OpenDaylight as the manager on all nodes
169 ovs-vsctl set-manager tcp:127.0.0.1:6640
172 * You should now see a section in your Open vSwitch configuration
173 showing that you are connected to the OpenDaylight server, and OpenDaylight
174 will automatically create a br-int bridge:
178 [root@dneary-odl-compute2 ~]# ovs-vsctl show
179 686989e8-7113-4991-a066-1431e7277e1f
180 Manager "tcp:127.0.0.1:6640"
183 Controller "tcp:127.0.0.1:6633"
190 * Add the default flow to OVS to forward packets to controller when there is a table-miss,
194 ovs-ofctl --protocols=OpenFlow13 add-flow br-int priority=0,actions=output:CONTROLLER
196 * Please see the `VTN OpenStack PackStack support guide <VTN_OpenStack_PackStack_>`_
197 on the wiki to create VM's from OpenStack Horizon GUI.
199 Implementation details
200 ----------------------
204 Install **odl-vtn-manager-neutron** feature which provides the integration with
209 feature:install odl-vtn-manager-neutron
211 It subscribes to the events from Open vSwitch and also implements the Neutron
212 requests received by OpenDaylight.
219 * The ML2 implementation for OpenDaylight will ensure that when Open vSwitch is
220 started, the ODL_IP_ADDRESS configured will be set as manager.
221 * When OpenDaylight receives the update of the Open vSwitch on port 6640
222 (manager port), VTN Manager handles the event and adds a bridge with required
223 port mappings to the Open vSwitch at the OpenStack node.
224 * When Neutron starts up, a new network create is POSTed to OpenDaylight, for
225 which VTN Manager creates a Virtual Tenant Network.
226 * *Network and Sub-Network Create:* Whenever a new sub network is created, VTN
227 Manager will handle the same and create a vbridge under the VTN.
228 * *VM Creation in OpenStack:* The interface mentioned as integration bridge in
229 the configuration file will be added with more interfaces on creation of a
230 new VM in OpenStack and the network is provisioned for it by the VTN Neutron
231 feature. The addition of a new port is captured by the VTN Manager and it
232 creates a vbridge interface with port mapping for the particular port. When
233 the VM starts to communicate with other VMs, the VTN Manger will install flows
234 in the Open vSwitch and other OpenFlow switches to facilitate communication
239 To use this feature, VTN feature should be installed
244 https://wiki.opendaylight.org/images/5/5c/Integration_of_vtn_and_ovsdb_for_helium.pdf
247 .. _VTN_OpenStack_PackStack: https://wiki.opendaylight.org/view/Release/Lithium/VTN/User_Guide/Openstack_Packstack_Support