Open Daylight integration with OpenStack: a tutorial
How to deploy OpenDaylight and integrate it with OpenStack to address use cases specific to networking infrastructure.
The adoption of open source technologies is on the rise, which is evident from the popularity of projects like OpenStack and OpenDaylight. While each project tries to address specific problems, a combination of OpenStack and OpenDaylight projects might be something to look out for.
OpenDaylight started with the release of Hydrogen and is now in its third release cycle, named Lithium. There are more than 60 projects available or being incubated with OpenDaylight Lithium that could satisfy all the networking requirements demanded by SDN. There are also some dedicated projects for OpenStack that are designed and integrated with OpenDaylight.
In this article, I will walk you through the steps in deploying OpenDaylight and integrating it with OpenStack to address use cases specific to networking infrastructure.
1. Assumption
Before getting started, I assume the reader understands OpenStack (kilo) and the set-up is already done.
2. Installing OpenDaylight
OpenDaylight Controller runs in a JVM. So install OpenJDK7 using the command below:
$ apt-get install openjdk-7-jdk |
Download the latest OpenDaylight-Lithium package from the official repo, as follows:
$ wget https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.3.3-Lithium-SR3/distribution-karaf-0.3.3-Lithium-SR3.tar.gz |
Uncompress it as the root user, and start OpenDaylight using the following command:
$ tar xvfz distribution-karaf-0.3.3-Lithium-SR3.tar.gz$ cd distribution-karaf-0.3.3-Lithium-SR3/$ ./bin/start # Start OpenDaylight as a server process and Wait for some time before running the next command below. |
Connect to the Karaf shell, as follows:
$ ./bin/client # connecting to the OpenDaylight with the client |
Now, you should be in OpenDaylights console. Install all the required features:
opendaylight-user@root> feature:install odl-base-all odl-aaa-authn odl-restconf odl-nsf-allodl-adsal-northbound odl-mdsal-apidocs odl-ovsdb-openstack odl-ovsdb-northbound odldlux-core#Feature installation may take some time to install. |
Once the installation is complete, you can check whether everything is working fine by using the curl call shown below:
$ curl -u admin:admin http://<OPENDAYLIGHT SERVERs IP>:8080/controller/nb/v2/neutron/networks |
The response should be an empty network list if OpenDaylight is working properly.
Also, you should be able to log in to the dlux interface on http://<OPENDAYLIGHT SERVERs IP>:8181/index.html– the default username and password is admin/admin (see Figure 2).
Additionally, you can find the log details at the location below:
$ tail -f data/log/karaf.log$ tail -f logs/web_access_log_2015-12.txt |
Now, you have a working OpenDaylight-Lithium set-up; so, lets get into the integration part.

Figure 1: OpenDaylight OpenStack
3. Erase all VMs, networks, routers and ports in the controller node
Since you already have a working OpenStack set-up, you may test for VM provisioning, but before integrating OpenStack with OpenDaylight, you must clean up all the unwanted data from the OpenStack database. When using OpenDaylight as the Neutron back-end, ODL expects to be the only source for Open vSwitch configuration. Because of this, it is necessary to remove existing OpenStack and Open vSwitch (OVS) configurations to give OpenDaylight a clear field.
The following steps will guide you through the cleaning process:
Delete the instances$ nova list$ nova delete <instance names> Remove links from subnets to routers$ neutron subnet-list$ neutron router-list$ neutron router-port-list <router name>$ neutron router-interface-delete <router name> <subnet ID or name> Delete subnets, nets, routers$ neutron subnet-delete <subnet name>$ neutron net-list$ neutron net-delete <net name>$ neutron router-delete <router name> Check that all ports have been cleared - at this point, this should be an empty list$ neutron port-list |
While Neutron is managing the OVS instances on compute and control nodes, OpenDaylight and Neutron can be in conflict. To prevent issues, turn off the Neutron server on the network controller and Neutrons Open vSwitch agents on all hosts.
$ service neutron-server stop |
4. Configuring Open vSwitches in network and compute nodes
The Neutron plugin in every node must be removed because only OpenDaylight will be controlling the Open vSwitches. So on each host, we will clear the pre-existing Open vSwitch configuration and set OpenDaylight to manage the Open vSwitch.
$ apt-get purge neutron-plugin-openvswitch-agent$ service openvswitch-switch stop$ rm -rf /var/log/openvswitch/*$ rm -rf /etc/openvswitch/conf.db #Clear openvswitch database and start it again.$ service openvswitch-switch start$ ovs-vsctl show #This command must return the empty set except OpenVswitch ID andits Version. |
5. Connecting Open vSwitch with OpenDaylight
Use the following commands to make OpenDaylight manage Open vSwitch:
$ ovs-vsctl set Open_vSwitch <OPENVSWITCH ID> other_config={local_ip=<TUNNEL INTERFACE IP>}$ ovs-vsctl set-manager tcp:<OPENDAYLIGHT MANAGEMENT IP>:6640 |
You can get the Open vSwitch ID from the command ovs-vsctl show and the tunnel IP from the OpenStack ml2_conf.ini file.
Execute the above command in all the nodes (network and compute nodes) that have Open vSwitch installed.
Create the bridge br-ex, which is needed for the external network for OpenStack in the network (Neutron) node.
$ ovs-vsctl add-br br-ex$ ovs-vsctl add-port br-ex <INTERFACE NAME OF EXTERNAL NETWORK> #commonly eth0 or p2p1$ ovs-vsctl show |
The above command will show that you are connected to the OpenDaylight server, and OpenDaylight will automatically create a br-int bridge.
[root@vinoth ~]# ovs-vsctl show9e3b34cb-fefc-4br4-828s-084b3e55rtfdManager tcp:192.XXX.X.XXX:XXXXIs_connected: trueBridge br-intController tcp:192.XXX.X.XXX:XXXXfail_mode: securePort br-intInterface br-intovs_version: 2.1.3 |

Figure 2: Dlux login screenshot
6. Configuring ml2_conf.ini for the OpenDaylight driver
Edit vi /etc/neutron/plugins/ml2/ml2_conf.ini in all the required nodes and modify the following configuration. Leave the other configurations as they are.
[ml2]type_drivers = flat,vxlantenant_network_types = vxlanmechanism_drivers = opendaylight[ml2_odl]password = adminusername = adminurl = http://<OPENDAYLIGHT SERVERs IP>:8080/controller/nb/v2/neutron |
7. Configuring the Neutron database
Reset the Neutron database, as follows:
$ mysql -uroot p$ drop database neutron;$ create database neutron;$ grant all privileges on neutron.* to neutron@localhost identified by <YOUR NEUTRONPASSWORD>;$ grant all privileges on neutron.* to neutron@% identified by <YOUR NEUTRONPASSWORD>;$ exit$ su -s /bin/sh -c neutron-db-manage --config-file /etc/neutron/neutron.conf --config-fileetc/neutron/plugins/ml2/ml2_conf.ini upgrade head neutron |
Restart the Neutron server, using the following command:
$ service neutron-server start |
8. Installing the networking_odl Python module
Important: At this stage you will get a message stating Neutron service failed to start. Dont worry; its a temporary issue. Since you have enabled OpenDaylight as amechanism_driver but not yet installed the Python module for it, you need to install the networking_odl Python module, as follows:
$ apt-get install python-pip$ pip install networking_odl |
Now, restart the Neutron server and check its status. It should be running without errors.
9. Verifying the integration
We are almost done with integrating OpenStack with OpenDaylight. Now, its time to verify it.
Create initial networks in OpenStack and check whether they are reflected in OpenDaylight.
You could create the network using the OpenStack horizon dashboard also. Shown below are the commands to create the same in CLI:
$ neutron router-create router1$ neutron net-create private$ neutron subnet-create private --name=private_subnet 172.0.0.0/24$ neutron router-interface-add router1 private_subnet$ nova boot --flavor <flavor> --image <image id> --nic net-id=<network id> vinoth-vm1 |
Once the network creation is done, you will be able to see that the same network has been created in OpenDaylight by using the following command:
$ curl -u admin:admin http://${OPENDAYLIGHTs SERVER}:8080/controller/nb/v2/neutron/networks |
The above command will return the network information which is created in OpenDaylight through OpenStack. If the integration has been done correctly, you should now be able to ping VM.
References
[1] http://www.hellovinoth.com/
[2] http://www.cloudenablers.com/blog/
[3] https://www.opendaylight.org/
[4] http://docs.openstack.org/
Vinoth Kumar Selvaraj is a DevOps engineer at Cloudenablers Pvt Ltd, a cloud technology start-up based at Chennai, India and a freelance reviewer with PACKTPUB Publishers for books related to OpenStack. He blogs at http://www.hellovinoth.com
This post first appeared on OpenSource for u.
Superuser is always interested in OpenStack tutorials and how-tos. Please get in touch:editor@openstack.org
[Cover Photo](https://www.flickr.com/photos/fauxto_dkp/2708086283/) // CC [BY NC](https://creativecommons.org/licenses/by-nc/2.0/)
Open Daylight integration with OpenStack: a tutorial的更多相关文章
- Integrate NSX into Neutron
NSX is VMware's strategy for Software-defined networking, it was implemented purely in software, and ...
- MAVLink Linux/QNX/MacOs Integration Tutorial (UDP)
MAVLink Linux/QNX/MacOs Integration Tutorial (UDP) Overview This program was written to test the udp ...
- MAVLink Onboard Integration Tutorial
MAVLink Onboard Integration Tutorial MAVLink is a header-only library, which means that you don't ha ...
- Spring MVC Hibernate MySQL Integration(集成) CRUD Example Tutorial【摘】
Spring MVC Hibernate MySQL Integration(集成) CRUD Example Tutorial We learned how to integrate Spring ...
- 理解 OpenStack + Ceph (5):OpenStack 与 Ceph 之间的集成 [OpenStack Integration with Ceph]
理解 OpenStack + Ceph 系列文章: (1)安装和部署 (2)Ceph RBD 接口和工具 (3)Ceph 物理和逻辑结构 (4)Ceph 的基础数据结构 (5)Ceph 与 OpenS ...
- Vulkan Tutorial 14 Integration pipeline
操作系统:Windows8.1 显卡:Nivida GTX965M 开发工具:Visual Studio 2017 我们现在整合前几章节的结构体和对象创建图形管线!以下是我们现在用到的对象类型,作为一 ...
- 成为OpenStack工程师
OpenStack Hacker 态度:开放.主动.沟通 影响力:能说.能写.能分享 四化:自动化.流程化.系统化.文档化 0级 掌握一些基本技能:python.c.linux.git.unittes ...
- 探索 OpenStack 之(7):Neutron 深入探索之 Open vSwitch (OVS) + GRE 之 Neutron节点篇
0. 测试环境 硬件环境:还是使用四节点OpenStack部署环境,参见 http://www.cnblogs.com/sammyliu/p/4190843.html OpenStack配置: ten ...
- 学习OpenStack之(6):Neutron 深入学习之 OVS + GRE 之 Compute node 篇
0.环境 硬件环境见上一篇博客:学习OpenStack之(5):在Mac上部署Juno版本OpenStack 四节点环境 OpenStack网络配置:一个tenant, 2个虚机 Type drive ...
随机推荐
- ftp定时任务-日志备份
1. 安装 #yum -y install vsftpd 2. 修改配置文件 #vi /etc/vsftpd/vsftpd.conf FTP服务器的默认目录是/var/ftp,而且当用户以匿名方式登录 ...
- 面试题3--数组中的重复数字(new数组的新写法)
总是忘了一些条件的判断,比如非空或者其他之类. #include<iostream> using namespace std; int Frepeat(int num[],int leng ...
- 微信小程序onlaunch异步,首页onLoad先执行?
按照原理是小程序初始化时会先触发APP里的onLaunch事件,之后再执行页面Page里的onLoad事件.但实际请求时在onLaunch事件中请求获取数据,等待返回值的时候Page里的onLoad事 ...
- Sping AOP Capabilities and Goals
Spring AOP是用纯的java实现的.不需要任何个性的实现过程.Spring AOP不需要控制类加载器,并且它适用于Servlet容器或者应用服务器. Spring AOP当前只支持方法执行的连 ...
- Win10 禁止自动更新以及禁止Windows 10升级助手(Windows 10 易升)
微软目前已经重新启用非常烦人的Windows 10升级助手,现在该助手主要帮助用户自动下载以及安装更新. 彻底禁用: 1.在开始菜单右侧的搜索框中输入关键词控制面板,然后打开控制面板后转到程序与功能里 ...
- 【数论】 快速幂&&矩阵快速幂
首先复习快速幂 #include<bits/stdc++.h> using namespace std; long long power(long long a,long long b,l ...
- 【C/C++】数组 & 指针
int main() { ]; ]; ][]; ]; ]; ]; ][]; cout << sizeof(a) << endl; cout << sizeof(pa ...
- https环境搭建(本地搭建)
1.创建自签名证书 2. 在iis中绑定https 先解析一个域名. 运行网站 示不安全,点击继续浏览即可.在实际的环境中,你拿到的是一个实际的证书,所以不会产生类似的报告安全证书有问题.
- Unity录音
上周做过Unity录音,(不知道的可以到网上查找一下,代码挺多的),不过只能录制麦克风的声音,项目需要同时录制背景音和麦克风传进去的声音,经过探索,现已可以录制: 首先需要知道,即使用电脑录音,想录制 ...
- sqlserver常用存储过程基本语法
一.定义变量--简单赋值 declare @a intset @a=5 print @a --使用select语句赋值 declare @user1 nvarchar(50) select @user ...