Running CloudRouter OpenDaylight Docker Image

 

Pull down the docker cloudrouter opendaylight 

 

# docker pull cloudrouter/odl-fedora
Pulling repository cloudrouter/odl-fedora
776732229dc4: Download complete 
511136ea3c5a: Download complete 
782cf93a8f16: Download complete 
6cece30db4f9: Download complete 
71ecfdef9361: Download complete 
620448a22f6a: Download complete 
c1eebcac3287: Download complete 
26495897ed3d: Download complete 
39ec28c35806: Download complete 
1df7cd4d1bbf: Download complete 
b6ef46a4f1ef: Download complete 
31d3186ca781: Download complete 
0636a2a1fe1b: Download complete 
b46eaca516a9: Download complete 
c0bfb704bac8: Download complete 
d71d4f51f982: Download complete 
2eb7bd96fcc2: Download complete 
cd2227c16f0e: Download complete 
0538cabd224b: Download complete 
80a0811293f0: Download complete 
Status: Downloaded newer image for cloudrouter/odl-fedora:latest

 

Run the docker image

# docker run --publish-all=true -t -i cloudrouter/odl-fedora /bin/bash

[root@747ffb20162e opendaylight-helium]# pwd
/opt/opendaylight/opendaylight-helium
[root@747ffb20162e opendaylight-helium]# ls
bin            data    etc           lib     version.properties
configuration  deploy  externalapps  system
[root@747ffb20162e opendaylight-helium]#

 

Start Karaf console

#  cd bin
[root@3259ea1ed9e8 bin]# ./karaf
                                                                                           
    ________                       ________                .__  .__       .__     __       
    \_____  \ ______   ____   ____ \______ \ _____  ___.__.|  | |__| ____ |  |___/  |_     
     /   |   \\____ \_/ __ \ /    \ |    |  \\__  \<   |  ||  | |  |/ ___\|  |  \   __\    
    /    |    \  |_> >  ___/|   |  \|    `   \/ __ \\___  ||  |_|  / /_/  >   Y  \  |      
    \_______  /   __/ \___  >___|  /_______  (____  / ____||____/__\___  /|___|  /__|      
            \/|__|        \/     \/        \/     \/\/            /_____/      \/          
                                                                                           
Hit '<tab>' for a list of available commands
and '[cmd] --help' for help on a specific command.
Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown OpenDaylight.
opendaylight-user@root>

 

Install some features of OpenDaylight to test it

opendaylight-user@root>feature:install odl-base-all odl-aaa-authn odl-restconf odl-nsf-all odl-adsal-northbound odl-mdsal-apidocs odl-l2switch-switch odl-dlux-core
Refreshing bundles org.apache.aries.util (13)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://116.fwk1777502922:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://116.fwk1777502922:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://116.fwk1777502922:3/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.JDK14LoggerFactory]
Refreshing bundles com.sun.jersey.servlet (166), org.ops4j.pax.web.pax-web-jetty (91), org.ops4j.pax.web.pax-web-runtime (90)
Refreshing bundles org.ops4j.pax.web.pax-web-extender-war (184), org.apache.xbean.finder-shaded (87), org.ops4j.pax.web.pax-web-spi (89), org.ops4j.pax.web.pax-web-jsp (182), org.ops4j.pax.web.pax-web-runtime (90), org.apache.xbean.bundleutils (84), org.ops4j.pax.web.pax-web-api (88)
GossipRouter started at Wed Apr 15 22:44:19 UTC 2015
Listening on port 12001 bound on address 0.0.0.0/0.0.0.0
Backlog is 1000, linger timeout is 2000, and read timeout is 0
opendaylight-user@root>

 

Install mininet on the docker image

 

# git clone git://github.com/mininet/mininet
# cd mininet/util
# ./install.sh -n

 

Exit Karaf and start OpenDaylight

 

opendaylight-user@root>^D
# cd /opt/opendaylight/opendaylight-helium/
# cd bin
# ./start
 

 

Check to make sure dlux console is reachable from a browser.

 

# ip addr show # to find out your docker image IP address
21: eth0: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:ac:11:00:08 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.8/16 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::42:acff:fe11:8/64 scope link 
       valid_lft forever preferred_lft forever

Open up a browser and visit https://172.17.0.8:8181/dlux/index.html [ 172.17.0.8 was the ip address in this case ]. Default user/pass is admin/admin.

 

Mininet Topology

Its time to try out a mininet topology with mininet pointing at the  OpenDaylight Controller running inside a docker image.

[root@localhost ~] $ mn --mac --switch=ovsk,protocols=OpenFlow13 --controller=remote,ip=172.17.0.8,port=6653 --topo=tree,3
*** Creating network
*** Adding controller
*** Adding hosts:
h1 h2 h3 h4 h5 h6 h7 h8 
*** Adding switches:
s1 s2 s3 s4 s5 s6 s7 
*** Adding links:
(s1, s2) (s1, s5) (s2, s3) (s2, s4) (s3, h1) (s3, h2) (s4, h3) (s4, h4) (s5, s6) (s5, s7) (s6, h5) (s6, h6) (s7, h7) (s7, h8) 
*** Configuring hosts
h1 h2 h3 h4 h5 h6 h7 h8 
*** Starting controller
c0 
*** Starting 7 switches
s1 s2 s3 s4 s5 s6 s7 
*** Starting CLI:
mininet> 

 

OpenDaylight/Topology

 

Visit the console to make sure the topology is recognized.