Skip to content

OF Patch Openflow Controller install

okinawaopenlabs edited this page Aug 26, 2015 · 10 revisions

Note:
OF-Patch OpenFlow Controller should be installed after OF-Patch Manager install.


##Prerequisites

####Install python

sudo apt-get install python-pip  
sudo apt-get install libxml2-dev libxslt-dev python-dev zlib1g-dev  
sudo apt-get install python-oslo.config  

####Install ryu

sudo pip install lxml  
sudo pip install paramiko
sudo pip install -U six
sudo pip install ryu

####Operation check

ryu-manager --version  

Check the following message is output:

ryu-manager x.xx  

Note:
x.xx is current ryu version.

####Install package(for OF-Patch Openflow Controller)

You will need the following installed in your environment that runs ofc:

sudo pip install httplib2  
sudo pip install unirest  

##Install OF-Patch Openflow Controller

cd /tmp
git clone https://github.com/okinawaopenlabs/of-patch-openflow-controller.git  
sudo cp -rp /tmp/of-patch-openflow-controller/ofp_ofc_ryu/ /usr/local/lib/  

####Modify config file
If you change OF Patch Openflow Controller configuration, please refer to following steps.

sudo vi /usr/local/lib/ofp_ofc_ryu/conf/ofp-ofc.conf

Edit as follows:

log_dir = "/var/log/ofp-ofc-ryu"  
log_file = "ofc.log"  
ofpm_set_flow_url = "http://localhost:18080/ofpm/logical_topology/setFlow"  
ofpm_init_flow_url = "http://localhost:18080/ofpm/logical_topology/initFlow"  

####Modify init file

sudo cp /usr/local/lib/ofp_ofc_ryu/bin/ofp-ofc-ryu /etc/init.d  
sudo chmod 755 /etc/init.d/ofp-ofc-ryu  

If you change OF Patch Openflow Controller init file configuration, please refer to following steps.

sudo vi /etc/init.d/ofp-ofc-ryu  

Edit as follows:

WSGI_PORT=28080  
WSGI_HOST="localhost"  
APPDIR=/usr/local/lib/ofp_ofc_ryu  

sudo update-rc.d ofp-ofc-ryu defaults  

####Make directory for OF-Patch Openflow Controller log

sudo mkdir /var/log/ofp-ofc-ryu  

####Operation check

sudo /etc/init.d/ofp-ofc-ryu start
grep VERSION /var/log/ofp-ofc-ryu/ofc.log  

Check the following message is output:

[DEBUG]  OF-PATCH CONTROLLER VERSION = x.x.x  

Note:
x.x.x is current OF-Patch Openflow controller version.

Clone this wiki locally