Jump to: navigation, search

CrossProject:Integration Group:Controller Artifacts

Maintainer

integration-dev@lists.opendaylight.org

Introduction

OpenDaylight Jenkins builds and uploads all projects artifacts to Nexus so there is no need to setup development environment to use and test the controller.

Artifacts Links

Latest Distribution Artifacts

Nexus contains latest distribution artifacts:

OpenDaylight karaf edition (no integration test features*):

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

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

Released Distribution Artifacts

Nexus also contains released distribution artifacts:

OpenDaylight karaf edition (no integration test features*):

https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/

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

Distribution Artifacts version

  • 0.1.X -> Hydrogen
  • 0.2.X -> Helium
  • 0.3.X -> Lithium
  • 0.4.X -> Beryllium
  • 0.5.X -> Boron

Artifacts Installation

Setup Controller run environment

Install Java JDK 1.8, you can use Oracle or OpenJDK packages:

Oracle Java

odluser@odl-vm:~\$ sudo apt-get install software-properties-common -y
odluser@odl-vm:~\$ sudo add-apt-repository ppa:webupd8team/java -y
odluser@odl-vm:~\$ sudo apt-get update
odluser@odl-vm:~\$ sudo apt-get install oracle-java8-installer oracle-java8-set-default -y

OpenJDK (Ubuntu 15.4+)

odluser@odl-vm:~\$ sudo apt-get install openjdk-8-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.8.0-openjdk-amd64
...

Installing Karaf Distribution

Build artifacts are stored in Nexus, snapshot build artifacts contain timestamp and are deleted after three weeks. The following uses "20160421.111235-1807" as the latest timestamp.

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.5.0-SNAPSHOT/distribution-karaf-0.5.0-20160421.111235-1807.zip'
odluser@odl-vm:~\$ unzip distribution-karaf-0.5.0-20160421.111235-1807.zip
odluser@odl-vm:~\$ cd distribution-karaf-0.5.0-SNAPSHOT
odluser@odl-vm:~\$ bin/karaf

Adding test features repositories (Optional)

To add integration features (only for testing), type the following in Karaf console:

  • Karaf 3:
opendaylight-user@root>feature:repo-add mvn:org.opendaylight.integration/features-integration-test/0.5.0-SNAPSHOT/xml/features

Note 0.5.0-SNAPSHOT above has to match the distribution version.

  • Karaf 4:
opendaylight-user@root>feature:repo-add mvn:org.opendaylight.integration/features-test/0.7.0-SNAPSHOT/xml/features

Note 0.7.0-SNAPSHOT above has to match the distribution version.

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 Getting Started Guide:

http://www.opendaylight.org/software/downloads

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

Installing Java Artifacts in Karaf Distribution (Optional)

1) 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:

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

2) This method also works for 3rd party artifacts:

opendaylight-user@root>bundle:install mvn:org.jolokia/jolokia-osgi/1.1.5
Bundle ID: 64
opendaylight-user@root>bundle:start 64

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

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