Tags

,

Project website presents information about setting a Fedora system (https://wiki.opendaylight.org/view/GettingStarted:Development_Environment_Setup), Here I will try to install into Debian.

Install java. openjdk would be fine

sdn-partII-installing_openjdk

Than install maven which is a well known build automation tool for java projects

sdn-partII-installing_maven

Install git for repository operations

sdn-partII-install_git

And install wireshark for network packet inspecting

sdn-partII-installing_wireshark

In OpenDayLight, code reviews are handled with gerrit, and in order to use gerrit, ssh public keys should be feed to your project account. Check if you already have ssh public keys.

”cat ~/.ssh/id_rsa.pub”

sdn-partII-read_ssh_pulic_key

If you are not able to see the keys, then you should generate from scratch using

”ssh-keygen -t rsa”

sdn-partII-generating_ssh_public_key

Create a project account, if not already present from the link https://identity.opendaylight.org/carbon/user-registration/index.jsp?region=region1&item=user_registration_menu

then go to gerrit, and login with credentials https://git.opendaylight.org/gerrit/#/q/status:open,n,z

sdn-partII-gerrit_login

Go to settings menu and public keys section from the upper right section of dashboard. Here, the ssh public keys of the **development environment** should be entered.

sdn-partII-gerrit_settings_section

ssh public key should be entered to **ssh public keys** section of the **settings** menu

Verification may be done by unsuccessful but authorized ssh attempt to git repository of project

”ssh -p 29418 sifa@git.opendaylight.org”

sdn-partII-ssh_key_check_with_shh

In order to make everyday things easier you may set an environment variable $ODL_USERNAME, to ”~/.bashrc” as you wish

sdn-partII-adding_odl_username_variable_to_bashrc

Then we can get the code from repositoty. For example, to get controller;

”git clone ssh:/${ODL_USERNAME}@git.opendaylight.org:29418/controller.git

cd controller

scp -p -P 29418 ${ODL_USERNAME}@git.opendaylight.org:hooks/commit-msg .git/hooks/

chmod 755 .git/hooks/commit-msg

git config remote.origin.push HEAD:refs/for/master ”

Currently OpenDayLight initiative has 12 sub projects which can all be obtained from remote repository similar to upper commands, with only project names and directories replaced. The result should be similar to below;

sdn-partII-opendaylight_list_of_projects

in order to build the code just go into local repository and call maven. Maven may be greedy in memory consumption so it will be better to make ram of build machine grater than 1GB

”mvn clean install”

After some time, you should have a success message as can be seen from below;

sdn-partII-controller_build_success

Here I had an runtime problem in java.  The time I tried to run the controller, I experienced a java runtime problem, that can be seen below

sdn-partII-opendaylight_runsh_jre_error

The line about java.lang.UnsupportedClassVersionError gives a clue about the source of the problem. To be sure let’s check the version of compiler and run time environment,

sdn-partII-javac_and_java_versions

Here we see that compiler uses java version 1.7 but runtime environment uses java 1.6. Let’s try upgrading runtime.

sdn-partII-apt_get_install_openjdk_7_jre

We see that we already have the latest version. Check from debian package,

sdn-partII-openjdk_7_jre_debain_web

So, what can be the problem? To investigate, try to discover which java runtime we are using,

sdn-partII-java_runtime_location

the problem seems to be occuring because java links to java 1.6 insted of java 1.7. Now, let’s try to fix this. Relink symbolic link to java 1.7 with

sdn-partII-relink_java_symbolic_link

And check the result

sdn-partII-result_of_java_relink

Now everything should be fixed. Check to see log messages of a running controller.

sdn-partII-opendaylight_controller_running

If a faster build is desired with ommiting tests, ”mvn install -DskipTests -DskipIT -nsu” may be used, where option nsu stands for no snapshot updates meaning no definition updates.

From time to time there appears problems in style, then we may skip style check also

“mvn clean install -Dcheckstyle.skip=true -DskipTests”

OpenDaylight also has a web based user interface serving at port 8080. Default credentials are admin / admin.

sdn-partII-web login

Since we don’t have any controllable network elements yet, we are not able to see any topology at dashboard.

sdn-partII-web dashboard

Next step will be to generate some controllable network elements. These will be some soft staff such as Mininet, and real hardware as an Alcatel OS6860 switch.

 

Advertisements