Skip to content
Martin Skorupski edited this page Apr 6, 2017 · 7 revisions

Instructions for TST

Installation

This chapter describes how to install the SDN-Controller OpenDaylight and the applications of the 4. ONF Microwave Transport Network Proof-of-Concept on Ubuntu 16.04. These instructions should also work on other Debian derivative distributions.

Step #1 Preparations

  • java-jdk: the Java development kit.

    sudo add-apt-repository ppa:webupd8team/java
    sudo apt-get update
    sudo apt-get install oracle-java8-installer
    sudo apt-get install oracle-java8-set-default
    export JAVA_HOME="/usr/lib/jvm/java-8-oracle"
    

    Feel free to add the JAVA_HOME variable to /etc/environment.

  • maven: the Apache build manager for Java projects. Follow the maven installation instructions.

    Here a short version.

    wget https://archive.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz
    sudo tar xzvf apache-maven-3.3.9-bin.tar.gz -C /usr/share/
    sudo update-alternatives --install /usr/bin/mvn mvn /usr/share/apache-maven-3.3.9/bin/mvn 150
    sudo update-alternatives --config mvn
    export PATH=/usr/share/apache-maven-3.3.9/bin:$PATH
    

    Feel to update PATH variable in /etc/environment.

    OpenDaylight requires specific maven settings. Please see ODL wiki

    mkdir -p ~/.m2 && \
    cp -n ~/.m2/settings.xml{,.orig} ; \
    wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
    
  • git: the version control system.

    sudo apt-get install git
    

The setup can be verified with the following commands:

package min. Version
java -version 1.8
mvn --version 3.3.9
git --version 2.7.4

Step #2 - OpenDaylight and database

Example directory structure under user's home:

drwxrwxr-x  5 your_user_name your_user_name 4096 Okt 25 17:18 ./
drwxr-xr-x 25 your_user_name your_user_name 4096 Okt 25 16:50 ../
drwxrwxr-x 15 your_user_name your_user_name 4096 Okt 20 14:26 CENTENNIAL/
drwxrwxr-x 14 your_user_name your_user_name 4096 Okt 25 20:04 distribution-karaf-0.5.1-Boron-SR1/

Step #2.1 - Download Karaf/ Opendaylight package and unpack

The 4th ONF Wireless PoC applications are developed for OpenDaylight Boron-SR1 release.

wget https://nexus.opendaylight.org/content/groups/public/org/opendaylight/integration/distribution-karaf/0.5.1-Boron-SR1/distribution-karaf-0.5.1-Boron-SR1.tar.gz
tar -xvzf distribution-karaf-0.5.1-Boron-SR1.tar.gz
cd distribution-karaf-0.5.1-Boron-SR1/

The folder "distribution-karaf-0.5.1-Boron-SR1/" is also called "$ODL_KARAF_HOME" in the following sections. Add an environment variable with an editor to the end of ~/.profile and ~/.bashrc

export ODL_KARAF_HOME="$HOME/distribution-karaf-0.5.1-Boron-SR1"

Activate the change with

. .profile

Step #2.2 - Download CENTENNIAL applications

Clone the ONF Git repository for the open source project

cd ~
git clone https://github.com/OpenNetworkingFoundation/CENTENNIAL.git
cd CENTENNIAL/code

Step #3 Modify, build, install and start the PoC applications and OpenDaylight

Karaf is not running for the next steps. In Karaf CLI shutdown and confirm (yes) if necessary.

shutdown

Step #3.2 - Build

Build the applications for the 4th ONF Wireless PoC at folder 'CENTENNIAL/code'.

mvn clean install -DskipTests

It takes some time (frist time 20min, in my case) ...

Copy manually the bundles into the karaf system folder.

mkdir -p $ODL_KARAF_HOME/system/cn
mkdir -p $ODL_KARAF_HOME/system/cn/com
cp -R ~/.m2/repository/org/opendaylight/mwtn $ODL_KARAF_HOME/system/org/opendaylight
cp -R ~/.m2/repository/cn/com/zte $ODL_KARAF_HOME/system/cn/com
cp -R ~/.m2/repository/com/hcl $ODL_KARAF_HOME/system/com
cp -R ~/.m2/repository/com/highstreet $ODL_KARAF_HOME/system/com

Step #3.3 - Install and run

Start karaf with clean:

cd $ODL_KARAF_HOME
./bin/karaf clean

Install the karaf features with the following command:

feature:install \
odl-netconf-connector-all \
odl-l2switch-switch \
odl-restconf-all \
odl-mdsal-apidocs \
odl-dlux-all \
odl-toaster

It takes some time ...

Subsequent starts are without clean:

cd $ODL_KARAF_HOME ./bin/karaf