Scripting the build of OpenDayight Controller under CentOS

Jon Langemak has a great write up on building the OpenDaylight controller under CentOS. Since I’ll have to do this a bunch of times, I though tI’d take what he so generously put online and build a very rudimentary script for deploying ODC under CentOS. The prerequisites are that you already have an account and ssh key at the OpenDaylight GIT repo and that you disable SELinux.

Here is the script:


# Install Opendaylight controller under CentOS
# by nick [at]
# Based on post by Jon Langemak (


echo "************************"
echo "************************"
echo "Disable SELINUX before starting this process"
echo "Edit the /etc/selinux/config file and restart the server"
echo "************************"
echo "************************"
echo "Change the username in the GIT section to your own"
echo "you'll need to create it and upload"
echo "your ssh key at"
echo "************************"
echo "************************"

echo "************************"
echo "Installing Development tools and other deps"
echo "************************"
yum install -y wget vim java ant python eclipse-platform git
yum groupinstall -y “Development tools”A

echo "************************"
echo "Downloading and installing maven"
echo "************************"
unzip -d /usr/share/
ln -s /usr/share/apache-maven-3.0.5/bin/mvn /usr/bin/mvn

echo "************************"
echo "Downloading GIT code"
echo "************************"
# Change the username here to your own, you'll need to create it and upload
# your ssh key at
mkdir -p /services/opendaylight/
cd /services/opendaylight/
git clone https://[email protected]/gerrit/p/controller.git

echo "************************"
echo "Building OpenDaylight Controller with Maven"
echo "************************"
cd controller/opendaylight/distribution/opendaylight/
mvn clean install

echo "************************"
echo "Configure Java Env variables"
echo "************************"
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64
echo "JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk.x86_64" >> /etc/environment

echo "************************"
echo "Load the controller"
echo "************************"
cd /services/opendaylight/controller/opendaylight/distribution/opendaylight/target/distribution.opendaylight-0.1.0-SNAPSHOT-osgipackage/opendaylight

echo "************************"
echo "Start OpenDaylight OF controller"
echo "************************"

Once up and running, it’s pretty trivial to point something like an HP switch at the controller.
For an HP5400, just decide what VLAN(s) you want to use OpenFlow on. I chose 999 as my test VLAN.

sw-5400-of# conf t
sw-5400-of(config)# vlan 999 name test-openflow999
sw-5400-of(vlan-999)# untagged A3-A4 
sw-5400-of(vlan-999)# exit
sw-5400-of(config)# openflow vlan 999
sw-5400-of(openFlow vlan-999)# enable
sw-5400-of(openFlow vlan-999)# controller "tcp:"
sw-5400-of(openFlow vlan-999)# exit       
sw-5400-of(openFlow)# exit
w-5400-of(config)# exit
sw-5400-of# show openflow 

sw-5400-of# show openflow 

 Openflow Configuration

  Openflow aggregate VLANs [Disabled] :           
  Openflow aggregate management VlanId [0] : 0     
  Openflow second aggregate management VlanId [0] : 0     
  Openflow aggregate configuration VlanId [0] : 0     

  VID  State HW  Active controller Pseudo-URL                       Conn
  ---- ----- --- -------------------------------------------------- ----
  666  Off   On                                                     No  
  999  On    On  tcp:                                Yes

From here we can see the box in the openflow controller.



Screen Shot 2013-05-03 at 4.20.03 PM


I’m still having some issues pushing flows, I’m sure I can work it out but here is a quick screencast of me trying to push a flow.  More posts will be added as soon as I can get the flows to push correctly.

I suspect it is user error and I just need to read the docs.  More to come for sure.  This controller is very, very slick.


  1. Once you disregard this need, the quality of your life will skyrocket and you
    will become a much happier, more centred person. If she
    cannot get captivated by you, she will think nothing of you in the end.
    Since these are not the types of impressions that you want project, it
    is vitally important that you have good eye contact with
    her throughout your interaction.

  2. Upon visiting this Website, you will know the low cost airlines in getting to foreign cities.

    The pet can travel comfortably in the cabin as compared to the travel in a cargo.
    Solo travel for women is all about staying safe and enjoying yourself.

© 2019 The Forwarding Plane. All rights reserved.

Copyright 2016 Nick Buraglio, ForwardingPlane, LLC

%d bloggers like this: