Jump to: navigation, search

Installing OpenDaylight


This needs to be updated. Please bear that in mind when reading the content and feel free to help update it.

This document picks up where the OpenDaylight install guide leaves off. After following that guide, you should have OpenDaylight downloaded, unbundled on your controller host, and see a Karaf prompt.


Artifacts Links

Lithium Latest Distribution Artifacts

These are the Nexus latest generated artifacts for current release

OpenDaylight karaf edition (no integration test features*):

https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.3.0-SNAPSHOT/

(*) Check further sections to know how to add integration test features

Helium Stable Distribution Artifacts

These are the Nexus latest generated artifacts for Helium stable release

OpenDaylight Karaf edition:

https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.2.3-SNAPSHOT/

Artifacts Installation

Setup Controller run environment

Install Java JDK 1.7+:

odluser@odl-vm:~\$ sudo apt-get install openjdk-7-jre

Set JAVA_HOME in environment. Add follow lines (Java path may change depending on the JDK installation) in ~/.bashrc file:

odluser@odl-vm:~\$ vi ~/.bashrc
...
export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
...

Installing Karaf Distribution

Download the distribution artifact, unzip it and run it:

odluser@odl-vm:~\$ wget 'https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/integration/distribution-karaf/0.3.0-SNAPSHOT/distribution-karaf-0.3.0-SNAPSHOT.zip'
odluser@odl-vm:~\$ unzip distribution-karaf-0.3.0-SNAPSHOT.zip
odluser@odl-vm:~\$ cd distribution-karaf-0.3.0-SNAPSHOT
odluser@odl-vm:~\$ bin/karaf 


Installing Karaf Features

Karaf distribution does not install any feature by default, to do so use feature:install command from Karaf console:

 feature:install odl-l2switch-switch-ui 

For a complete list of features and their description please check the ODL Installation Guide:

https://www.opendaylight.org/downloads

For more information on how to deal with features check this Karaf wiki

Installing Java Artifacts in Karaf Distribution (Optional)

If the jar is already shipped in karaf:

Find the bundle path in the system folder:

odluser@odl-vm:~\$  cd <distro-folder>/system/system/org/opendaylight/controller/arphandler/<version> 

Install and run the bundle from karaf console:

> bundle:install mvn:org.opendaylight.controller/arphandler/0.6.0-SNAPSHOT 
> bundle:start arphandler

If it is a new artifact just place it in <distribution>/deploy folder.

mv samples.loadbalancer-0.6.0-SNAPSHOT.jar ~/distribution-karaf-0.3.0-SNAPSHOT/deploy/


Running OpenDaylight as a service

When starting OpenDaylight with Karaf, the service is connected to the Karaf process. To run Karaf in the background as a daemon, run

./bin/start

or

./bin/karaf server

It is very straightforward to write a standard SystemD service unit file or sysvinit file which you can use to start the service at boot time by calling the 3 pre-supplied scripts bin/start, bin/stop and bin/status.


Enabling DLUX

The easiest way to interact with ODl as a new user is through the DLUX (DayLight User eXperience) user interface.

To enable DLUX, install the modules odl-dlux-all, odl-restconf and odl-l2switch-switch using Karaf:

   ./distribution-karaf-0.2.1-Helium-SR1/bin/karaf
   <snip>
   opendaylight-user@root> feature:install odl-dlux-all odl-restconf odl-l2switch-switch

You will need both ovs-dlux-all and odl-restconf, because without restconf you will not be able to authenticate via the web interface.

Once you have installed everything, you can check whether DLUX is working by visiting http://localhost:8181/dlux/index.html. (Note. The default username and password are both "admin".)

If you want to connect to DLUX from a remote host, replace "localhost" by the public IP address of the host.


Connecting Open vSwitch virtual switches to ODL

This document will guide you through what to do next to start managing network traffic with OpenDaylight.

To control network devices we need to be aware of them, and need them to know that we're managing them. For full documentation about getting OVSDB working with OpenStack Juno, see Helium and OpenStack Juno for more complete instructions.

To enable OVSDB, install it in Karaf:

   feature:install odl-base-all odl-aaa-authn odl-restconf odl-adsal-northbound odl-mdsal-apidocs odl-l2switch-switch
   feature:install odl-ovsdb-northbound

Once OVSDB is installed and working, on each of the vSwitch hosts, run the following commands:

   ovs-vsctl set-manager tcp:192.168.120.1:6640

You can check if the command succeeded by running:

   ovs-vsctl show

You should see something like this:

3bb0e82f-87a3-4297-add0-649c400a8090
   Manager "tcp:172.16.21.9:6640"
       is_connected: true
   Bridge br-ex
       Controller "tcp:172.16.21.9:6633"
           is_connected: true
       Port br-ex
           Interface br-ex
               type: internal
   Bridge br-int
       Controller "tcp:172.16.21.9:6633"
           is_connected: true
       fail_mode: secure
       Port br-int
           Interface br-int
               type: internal
       Port patch-tun
           Interface patch-tun
               type: patch
               options: {peer=patch-int}
   Bridge br-tun
       Controller "tcp:172.16.21.9:6633"
           is_connected: true
       Port patch-int
           Interface patch-int
               type: patch
               options: {peer=patch-tun}
       Port br-tun
           Interface br-tun
               type: internal
   ovs_version: "2.1.3"

Note the Manager line, followed by "is_connected: true" and the Controller lines for each of the bridges with the same.