Difference between revisions of "IETF 102 Hackathon"

From Yuma123 Wiki
Jump to navigationJump to search
Line 17: Line 17:
 
===Controller (client) side plug-in implementation - ncflowplugin for ODL===
 
===Controller (client) side plug-in implementation - ncflowplugin for ODL===
 
Incomplete.
 
Incomplete.
====Walkthrough====
+
====Walkthrough (tested on Debian)====
  +
Build and start netconfd server instance with the ietf-network-bridge* modules loaded listening on port 830:
  +
<nowiki>
  +
cd
  +
sudo apt-get install git autoconf gcc libtool libxml2-dev libssh2-1-dev make libncurses5-dev zlib1g-dev libreadline-dev
  +
git clone git://git.code.sf.net/p/yuma123/git yuma123-git
  +
cd yuma123-git
  +
autoreconf -i -f
  +
./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr
  +
make
  +
sudo make install
  +
#Enable the netconf subsystem and restart sshd
  +
echo "Port 830" | sudo tee -a /etc/ssh/sshd_config
  +
echo "Subsystem netconf "/usr/sbin/netconf-subsystem" | sudo tee -a /etc/ssh/sshd_config
  +
sudo /etc/init.d/ssh restart
  +
/usr/sbin/netconfd --module=/usr/share/yuma/modules/ietf/ietf-interfaces@2014-05-08.yang \
  +
--module=/usr/share/yuma/modules/ietf/iana-if-type@2014-05-08.yang \
  +
--module=/usr/share/yuma/modules/ietf-draft/ietf-network-bridge.yang \
  +
--module=/usr/share/yuma/modules/ietf-draft/ietf-network-bridge-flows.yang \
  +
--module=/usr/share/yuma/modules/ietf-draft/ietf-network-bridge-scheduler.yang \
  +
--module=/usr/share/yuma/modules/examples/example-bridge.yang \
  +
--startup=example-modules/ietf-network-bridge/example-bridge-cfg.xml --log-level=debug4 --superuser=${USER}
   
  +
</nowiki>
  +
Build and start ODL mounting the network bridge over NETCONF:
 
<nowiki>
 
<nowiki>
 
cd
 
cd
Line 89: Line 112:
   
 
yangcli --server=localhost --ncport=2830 --user=admin --password=admin --dump-session=/tmp/yangcli- --keep-session-model-copies-after-compilation=true --batch-mode --run-script=myscript.txt --log-level=debug4
 
yangcli --server=localhost --ncport=2830 --user=admin --password=admin --dump-session=/tmp/yangcli- --keep-session-model-copies-after-compilation=true --batch-mode --run-script=myscript.txt --log-level=debug4
 
===Resume projects started in IETF 101 Hackathon===
 
 
===Release 2.11 version of yuma123===
 

Revision as of 17:25, 15 July 2018

Alternative southbound interface to flow enabled network bridges

This is a new project originally defined in the following post on hackathon@ietf.org https://mailarchive.ietf.org/arch/msg/hackathon/vb27RmJivbwy8UURV_KXh2IzZd0

The project consists of 3 tasks:

  1. Design and publish draft with YANG model of a flow enabled network bridge.
  2. Device (server) side model implementation - loadable module for some of the available opensource NETCONF servers implementing the model for a OpenFlow device as a proxy controller with a single node.
  3. Controller (client) side plug-in implementation - ncflowplugin for

ODL interacting with NETCONF mounted nodes implementing the YANG model that ideally can coexist with openflowplugin.

Progress:

Design and publish draft with YANG model of a flow enabled network bridge.

Done. - https://datatracker.ietf.org/doc/draft-vassilev-netmod-network-bridge/

Device (server) side model implementation

Partial. Can be mounted from ODL but the OpenFlow part is not ready. - https://github.com/vlvassilev/yuma123/tree/master/example-modules/ietf-network-bridge

Controller (client) side plug-in implementation - ncflowplugin for ODL

Incomplete.

Walkthrough (tested on Debian)

Build and start netconfd server instance with the ietf-network-bridge* modules loaded listening on port 830:

 cd
 sudo apt-get install git autoconf gcc libtool libxml2-dev libssh2-1-dev make libncurses5-dev zlib1g-dev libreadline-dev
 git clone git://git.code.sf.net/p/yuma123/git yuma123-git
 cd yuma123-git
 autoreconf -i -f
 ./configure CFLAGS='-g -O0' CXXFLAGS='-g -O0' --prefix=/usr
 make
 sudo make install
 #Enable the netconf subsystem and restart sshd
 echo "Port 830" | sudo tee -a /etc/ssh/sshd_config
 echo "Subsystem netconf "/usr/sbin/netconf-subsystem" | sudo tee -a /etc/ssh/sshd_config
 sudo /etc/init.d/ssh restart
 /usr/sbin/netconfd --module=/usr/share/yuma/modules/ietf/ietf-interfaces@2014-05-08.yang \
                    --module=/usr/share/yuma/modules/ietf/iana-if-type@2014-05-08.yang \
                    --module=/usr/share/yuma/modules/ietf-draft/ietf-network-bridge.yang \
                    --module=/usr/share/yuma/modules/ietf-draft/ietf-network-bridge-flows.yang \
                    --module=/usr/share/yuma/modules/ietf-draft/ietf-network-bridge-scheduler.yang \
                    --module=/usr/share/yuma/modules/examples/example-bridge.yang \
                    --startup=example-modules/ietf-network-bridge/example-bridge-cfg.xml --log-level=debug4 --superuser=${USER}

 

Build and start ODL mounting the network bridge over NETCONF:

<nowiki>

cd sudo apt-get install -y openjdk-8-jdk sudo apt-get install -y maven mkdir ~/.m2 wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml export MAVEN_OPTS='-Xmx1048m -XX:MaxPermSize=512m'

  1. from https://wiki.opendaylight.org/view/GettingStarted:Pulling,_Hacking,_and_Pushing_All_the_Code_from_the_CLI

sudo apt-get install corkscrew mkdir opendaylight cd opendaylight for PROJECT in aaa aalldp alto armoury atrium bgpcep bier capwap cardinal centinel coe controller daexim didm discovery \ dlux dluxapps docs eman faas federation fpc genius groupbasedpolicy honeycomb/vbd integration/distribution \ integration/packaging integration/packaging/ansible-opendaylight integration/packaging/puppet-opendaylight integration/test \ iotdm jsonrpc kafkaproducer l2switch lacp lispflowmapping mdsal messaging4transport natapp nemo netconf netide netvirt \ neutron next nic ocpplugin odlparent of-config ofextensions/circuitsw ofextensions/epc openflowjava openflowplugin opflex \ ovsdb packetcable persistence plugin2oc releng releng/autorelease releng/builder reservation sdninterfaceapp sfc snbi snmp \ snmp4sdn sxp systemmetrics tcpmd5 topoprocessing transportpce tsdr ttp unimgr usc usecplugin vpnservice vtn yang-push \ yangide yangtools; \ do git clone https://git.opendaylight.org/gerrit/${PROJECT}.git ${PROJECT}; \ done

git clone https://git.opendaylight.org/gerrit/p/integration/distribution.git distribution

cd distribution git checkout tags/release/beryllium-sr4 mvn clean install -Pq

cd distribution-karaf/target/assembly

./bin/start sleep 30 ./bin/client -u karaf 'feature:list --installed'

  1. install NETCONF support

./bin/client -u karaf 'feature:install odl-netconf-all odl-netconf-ssh odl-netconf-connector-all'

  1. install GUI support

./bin/client -u karaf 'feature:install odl-dlux-all'

  1. install topology configuration support

./bin/client -u karaf 'feature:install odl-restconf-all' ./bin/client -u karaf 'feature:install odl-netconf-topology'

  1. odl-netconf-clustered-topology

./bin/client -u karaf feature:list

cat > myscript.txt << EOF merge /modules/module[name='h1-center'][type='sal-netconf-connector'] -- address=localhost sal-netconf:port=6830 tcp-only=false username=root password=hadm1_123 sal-netconf:event-executor/type=netty-event-executor sal-netconf:event-executor/name=global-event-executor sal-netconf:binding-registry/type=binding-broker-osgi-registry sal-netconf:binding-registry/name=binding-osgi-broker sal-netconf:dom-registry/type=dom-broker-osgi-registry sal-netconf:dom-registry/name=dom-broker sal-netconf:client-dispatcher/type=netconf-client-dispatcher sal-netconf:client-dispatcher/name=global-netconf-dispatcher sal-netconf:processing-executor/type=threadpool sal-netconf:processing-executor/name=global-netconf-processing-executor sal-netconf:keepalive-executor/type=scheduled-threadpool sal-netconf:keepalive-executor/name=global-netconf-ssh-scheduled-executor merge /modules/module[name='ncflow'][type='sal-netconf-connector'] -- address=localhost sal-netconf:port=830 tcp-only=false username=tester password=tester sal-netconf:event-executor/type=netty-event-executor sal-netconf:event-executor/name=global-event-executor sal-netconf:binding-registry/type=binding-broker-osgi-registry sal-netconf:binding-registry/name=binding-osgi-broker sal-netconf:dom-registry/type=dom-broker-osgi-registry sal-netconf:dom-registry/name=dom-broker sal-netconf:client-dispatcher/type=netconf-client-dispatcher sal-netconf:client-dispatcher/name=global-netconf-dispatcher sal-netconf:processing-executor/type=threadpool sal-netconf:processing-executor/name=global-netconf-processing-executor sal-netconf:keepalive-executor/type=scheduled-threadpool sal-netconf:keepalive-executor/name=global-netconf-ssh-scheduled-executor commit EOF

  1. If commit is not done in the same session as the merge the changes to candidate are discarded autmatically .. thus the --run-script instead 2 sequential --run-command calls for merge and commit.

yangcli --server=localhost --ncport=1830 --user=admin --password=admin --dump-session=/tmp/yangcli- --keep-session-model-copies-after-compilation=true --batch-mode --run-script=myscript.txt --log-level=debug4


  1. enable northbound MD-SAL interface - opens port 2830

./bin/client -u karaf 'feature:install odl-netconf-mdsal' sleep 60

./bin/client -u karaf 'feature:install odl-mdsal-apidocs' ./bin/client -u karaf 'feature:install odl-openflowplugin-flow-services-rest' ./bin/client -u karaf 'feature:install odl-openflowplugin-flow-services-ui'

sleepp 30

cat > myscript.txt << EOF merge /nodes/node[id='openflow:1']/table[id='0']/flow[id='1'] -- match/in-port=openflow:1:1 match/ethernet-match/ethernet-type=35063 instructions/instruction[order='0']/apply-actions/action[order='0']/output-action/output-node-connector=2 out_port=2 flow-name=my-ptp-flow commit EOF

yangcli --server=localhost --ncport=2830 --user=admin --password=admin --dump-session=/tmp/yangcli- --keep-session-model-copies-after-compilation=true --batch-mode --run-script=myscript.txt --log-level=debug4