Difference between revisions of "IETF 102 Hackathon"

From Yuma123 Wiki
Jump to navigationJump to search
Line 19: Line 19:
 
====Walkthrough====
 
====Walkthrough====
   
  +
<nowiki>
Mount the netconf device:
 
  +
cd
yangcli admin@localhost> merge /modules/module[name='netconfflow-0'][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
 
  +
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'
  +
  +
#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'
  +
#install NETCONF support
  +
./bin/client -u karaf 'feature:install odl-netconf-all odl-netconf-ssh odl-netconf-connector-all'
  +
#install GUI support
  +
./bin/client -u karaf 'feature:install odl-dlux-all'
  +
#install topology configuration support
  +
./bin/client -u karaf 'feature:install odl-restconf-all'
  +
./bin/client -u karaf 'feature:install odl-netconf-topology'
  +
#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
  +
  +
# 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
  +
  +
  +
#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
   
 
===Resume projects started in IETF 101 Hackathon===
 
===Resume projects started in IETF 101 Hackathon===

Revision as of 17:03, 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

<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

Resume projects started in IETF 101 Hackathon

Release 2.11 version of yuma123