My Wiki!

ODL Programming

Basic dev

Registration, upload pub key:

Clone project:

git clone ssh://<username>@git.opendaylight.org:29418/<project_repo_name>.git

Setting up Gerrit Change-id Commit Message Hook

cd <project_repo_name>
scp -p -P 29418 <username>@git.opendaylight.org:hooks/commit-msg .git/hooks/
chmod 755 .git/hooks/commit-msg

Gitreview: http://www.mediawiki.org/wiki/Gerrit/git-review#Installation%7Chere

While you are in the <projectreponame> directory, run

  mvn clean install

To run without unitests you can skip building those tests running the following:

  mvn clean install -DskipTests
  /* instead of "mvn clean install" */    
  

Runing OpenDaylight from local build

Change to the karaf distribution sub-directory, and run

  ./target/assembly/bin/karaf

At this point the OpenDaylight controller is running. You can now open a web browser and point your browser at http://localhost:8080/

  http://localhost:8080/    

Pulling the Code changes via Git CLI

Pull the latest changes from the remote repository

  git remote update
  git rebase origin/<project_main_branch_name>

where <projectmainbranch_name> is the the branch you want to commit to. For most projects this is master branch. For some projects such as lispflowmapping, a different branch name (develop in the case of lispflowmapping) should be used.

Pushing the Code via Git CLI

Use git review to push your changes back to the remote repository using:

  git review

You can set a topic for your patch by:

  git review -t <topic>

Integration Group

Get Stable Snapshot

  wget https://jenkins.opendaylight.org/integration/job/integration-helium-project-centralized-integration/lastSuccessfulBuild/artifact/distributions/extra/karaf/target/distribution-karaf-0.2.1-SNAPSHOT.zip
  unzip distribution*
  cd distribution*
  ./bin/karaf
  feature:install odl-l2switch-switch-ui odl-openflowplugin-flow-services-ui odl-ttp-all odl-ovsdb-all odl-ovsdb-openstack odl-restconf
  

Mininet Simulation

    sudo mn --controller=remote,ip=a.b.c.d --topo tree,2 --switch ovsk,protocols=OpenFlow13

Authentication Service

Authentication Methods

Example with token authentication using curl (username/password = admin/admin, domain = sdn):

# Create a token
curl -ik -d 'grant_type=password&username=admin&password=admin&scope=sdn'
http://localhost:8181/oauth2/token
# Use the token (e.g., ed3e5e05-b5e7-3865-9f63-eb8ed5c87fb9) obtained from above (default token validity is 1 hour):
curl -ik -H 'Authorization:Bearer ed3e5e05-b5e7-3865-9f63-eb8ed5c87fb9'
http://localhost:8181/restconf/config/toaster:toaster

Example with basic auth using curl:

  curl -ik -u 'admin:admin' http://localhost:8181/restconf/config/

Configuring Authentication service

Changes to AAA configurations can be made from the following:

  • Webconsole
  • CLI (config command in the Karaf shell)
  • Editing the etc/org.opendaylight.aaa.*.cfg files directly

Every Authentication Service karaf feature has its configuration file.

Note Configurations for AAA are all dynamic and require no restart.

To configure features from the Web console:

  • Install the Web console:
feature:install webconsole

* On the console (http://localhost:8181/system/console) (default Karaf username/password: karaf/karaf), go to OSGi > Configuration > ODL AAA Authentication Configuration.

  • a. Authorized Clients: List of software clients that are authorized to access ODL NB APIs.
  • b. Enable Authentication: Enable or disable authentication. (The default is enable.)

ODL SDN Controller

  git clone ssh://<username>@git.opendaylight.org:29418/controller.git
  cd opendaylight/distribution/opendaylight-karaf/
  mvn clean install
  ls target/

OVSDB Integration

Get the Code

  export ODL_USERNAME=<username for the account you created at OpenDaylight>
  git clone ssh://${ODL_USERNAME}@git.opendaylight.org:29418/ovsdb.git;(cd ovsdb; 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)

Build OVSDB

  • Read README: Build and run
    • 2 (distro)
      • ./bin/karaf AND feature:install odl-ovsdb-openstack
    • 3 (build feature)
      • unzip the downloaded (or built) distribution and copy the ovsdb-features-x.x.x.kar file (from step 2) into the unzipped distribution.opendaylight-karaf-X.X.X/deploy/ directory
  cd ovsdb
  mvn clean install
  cp; tar xvzf 
  cd 
  ./bin/karaf
  

Sumulation with mininet

To start mininet for the OpenFlow 1.3 simulation, use the following command:

  sudo mn --controller=remote,ip=a.b.c.d --topo tree,2 --switch ovsk,protocols=OpenFlow13

Headline

For information on how the GRE-endpoint destination IP address is communicated to the controller, see Neutron and ODL interactions.

The OpenStack integration architecture uses the following technologies:

  • RFC 7047 and The Open vSwitch Database Management Protocol
  • OpenFlow v1.3
  • OpenStack Neutron ML2 Plugin

Karaf

Test VM setup

OVS

  sudo yum install openvswitch
  cd opendaylight-test
  wget http://openvswitch.org/releases/openvswitch-2.3.0.tar.gz
  tar -xvzf open*
  cd open*
  ./configure
  sudo make install
  # Disable OVS controller:
  sudo /etc/init.d/openvswitch-controller stop
  sudo /etc/init.d/openvswitch-controller disable
  # Verify
  sudo ovs-vsctl show

bd38d7bd-7419-40d1-b80e-b48cf773c960

  ovs_version: "2.3.0" 
  

Mininet

  git clone git://github.com/mininet/mininet
  cd mininet/
  #git checkout -b 2.1.0p1 2.1.0p1
  # git branch -a
  # git tag -l
  # apply patch (patch -p0 < newOptions.patch)
  cd ./util
  ./install.sh --help
  ./install.sh -fn
  
  #Verify mininet installation:
  odluser@odl-vm:~\$ sudo mn --test=pingall
  
  #Verify mininet works for OF1.3:
  odluser@odl-vm:~\$ sudo mn --controller=remote,ip=10.125.136.52 --topo tree,2 --switch ovsk,protocols=OpenFlow13
  
  #To test the version of used protocol by switch "s1":
  odluser@odl-vm:~\$ sudo ovs-ofctl -O OpenFlow13 show s1
  
  

Navigation