wiki:Documentation/fSDN/cOpenDaylight

Version 5 (modified by ssugrim, 10 years ago) ( diff )

Open Daylight Controller

The following instructions are for installing the ODL Helium controller on Ubuntu version 14.04 on ORBIT infrastructure.

Installation

Assuming you have a working 14.04 image (e.g. ubuntu-14-04-64bit.ndz) The installation process is quite simple. It is documented here. Ignore this guide as there are no meaningful instructions in it.

The "install" process is split into two parts, Env Prep/Download and the Karaf shell.

Env Prep/Download

First we need to prepare the install environment.

  1. You will need the openjdk-7:
    apt-get install openjdk-7-jre
    
    Note: Previous version's required maven, this seems to no longer be required for usage (but might still be needed for build.
  2. Download the current version of the ODL tarball. As of this writing this is done like so:
    wget https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.2.3-Helium-SR3/distribution-karaf-0.2.3-Helium-SR3.tar.gz
    
  3. Extract said tarball
    tar -xzvf distribution-karaf-0.2.3-Helium-SR3.tar.gz
    
  4. Setup the JAVA_HOME environment variable
    export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
    

Karaf

Once you have the environment setup, the next step is installing features via Karaf:

For a basic learning switch capable controller (built for working with open-Vswitch) we will need to install ODL features to "talk" to switches. Note: No features come installed by default. To install the features needed follow these steps:

  1. Start the karaf shell
    /UNTARPATH/distribution-karaf-0.2.3-Helium-SR3/bin/karaf
    
  2. Install the following features in the listed orderd
    feature:install odl-base-all odl-aaa-authn odl-restconf odl-adsal-northbound odl-mdsal-apidocs odl-l2switch-switch
    feature:install odl-ovsdb-northbound
    
  3. Exit the karaf shell via ctrl-C
  4. Start the controller instance via the startup script
    /UNTARPATH/distribution-karaf-0.2.3-Helium-SR3/bin/start
    

This will start the ODL controller. You can verify it's running by looking for the java process:

root@node1-1:~# ps -ef | grep karaf

root      3188     1 33 16:11 pts/0    00:04:26 /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java -server -Xms128M -Xmx2048m -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -XX:MaxPermSize=512m -Dcom.sun.management.jmxremote -Djava.endorsed.dirs=/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/endorsed:/usr/lib/jvm/java-1.7.0-openjdk-amd64/lib/endorsed:/root/distribution-karaf-0.2.3-Helium-SR3/lib/endorsed -Djava.ext.dirs=/usr/lib/jvm/java-1.7.0-openjdk-amd64/jre/lib/ext:/usr/lib/jvm/java-1.7.0-openjdk-amd64/lib/ext:/root/distribution-karaf-0.2.3-Helium-SR3/lib/ext -Dkaraf.instances=/root/distribution-karaf-0.2.3-Helium-SR3/instances -Dkaraf.home=/root/distribution-karaf-0.2.3-Helium-SR3 -Dkaraf.base=/root/distribution-karaf-0.2.3-Helium-SR3 -Dkaraf.data=/root/distribution-karaf-0.2.3-Helium-SR3/data -Dkaraf.etc=/root/distribution-karaf-0.2.3-Helium-SR3/etc -Djava.io.tmpdir=/root/distribution-karaf-0.2.3-Helium-SR3/data/tmp -Djava.util.logging.config.file=/root/distribution-karaf-0.2.3-Helium-SR3/etc/java.util.logging.properties -Dkaraf.startLocalConsole=false -Dkaraf.startRemoteShell=true -classpath /root/distribution-karaf-0.2.3-Helium-SR3/lib/karaf-jaas-boot.jar:/root/distribution-kara -0.2.3-Helium-SR3/lib/karaf-jmx-boot.jar:/root/distribution-karaf-0.2.3-Helium-SR3/lib/karaf-org.osgi.core.jar:/root/distribution-karaf-0.2.3-Helium-SR3/lib/karaf.branding-1.0.3-Helium-SR3.jar:/root/distribution-karaf-0.2.3-Helium-SR3/lib/karaf.jar org.apache.karaf.main.Main

If properly running you should see this PID listening on port 6633 as well as several others.

root@node1-1:~# netstat -tnlup | grep 3188
tcp6       0      0 :::8101                 :::*                    LISTEN      3188/java
tcp6       0      0 :::6633                 :::*                    LISTEN      3188/java
tcp6       0      0 :::1099                 :::*                    LISTEN      3188/java
tcp6       0      0 127.0.0.1:57453         :::*                    LISTEN      3188/java
tcp6       0      0 :::6640                 :::*                    LISTEN      3188/java
tcp6       0      0 :::8080                 :::*                    LISTEN      3188/java
tcp6       0      0 127.0.0.1:50353         :::*                    LISTEN      3188/java
tcp6       0      0 127.0.0.1:40659         :::*                    LISTEN      3188/java
tcp6       0      0 :::8181                 :::*                    LISTEN      3188/java
tcp6       0      0 :::56886                :::*                    LISTEN      3188/java
tcp6       0      0 127.0.0.1:7800          :::*                    LISTEN      3188/java
tcp6       0      0 127.0.0.1:54936         :::*                    LISTEN      3188/java
tcp6       0      0 :::8185                 :::*                    LISTEN      3188/java
tcp6       0      0 :::44444                :::*                    LISTEN      3188/java
tcp6       0      0 :::6653                 :::*                    LISTEN      3188/java
tcp6       0      0 :::12001                :::*                    LISTEN      3188/java
udp6       0      0 :::7500                 :::*                                3188/java

At this point switches should be able to connect to this controller for control messages using the default control port 6633. (e.g. using mininet: mn —controller=remote,ip=CTRLIP). In /UNTARPATH/distribution-karaf-0.2.3-Helium-SR3/bin are additional control scripts for stopping the server and setting environment variables.


Older Notes - 5/13/2015

Installing the ODL Controller

The SDN controller used in the MF SDN prototype is the Open Daylight Controller. The release version is Hydrogen and we use the Base edition.

Required Packages

sudo apt-get update
sudo apt-get install git maven openjdk-7-jdk openjdk-7-jre

The pre-built version of the controller can be downloaded at the following link Open Dayligth Controller Hydrogen Base Edition

Download and unzip the controller in a Linux machine. The controller was tested to work in Ubuntu 13.04.

unzip distributions-base-0.1.1-osgipackage.zip

For more details, visit the controller installation guide at: https://wiki.opendaylight.org/view/Release/Hydrogen/Base/Installation_Guide#Installing

Developing OpenFlow 1.3 Modules with the Controller

For developing applications and running the controller with OF 1.3, download the openflowplugin from git at the following link:

git clone https://git.opendaylight.org/gerrit/p/openflowplugin.git

A sample application for a Learning switch is provided by the plugin. For learning to develop new modules as applications, this is a good starting point.

Build the application:

cd  openflowplugin/samples/learning-switch/
mvn clean install

For running the learning switch application,do the following steps

rm opendaylight/plugins/org.opendaylight.controller.samples.simpleforwarding-0.4.1.jar

Copy the 'learning-switch-0.0.3-SNAPSHOT.jar' bundle into the ‘opendaylight/plugins' folder.

To run the controller with OF 1.3:

cd opendaylight

./run.sh -of13

To test if the learning switch is working, on the controller console:

osgi > lb learn

Now you can see the controller installing flow rules when you test the network by pinging nodes.

For more details and information for developing applications you can visit the Open Daylight wiki

Running the Controller

The controller can be started directly by running the script in the following directory

cd opendaylight
./run.sh

Once the controller is running,to access the GUI, point your browser to the IP address running the controller with port 8080: http://<ip-address-of-machine-where-you-ran-opendaylight>::8080 or http://127.0.0.1:8080 from the same machine running the controller

Login with the following details: username: admin password: admin

You can set up flow rules or make modifications using the GUI provided.

Note: See TracWiki for help on using the wiki.