From 36424f46ff5543c2ae475c60bb3e08f299c55799 Mon Sep 17 00:00:00 2001 From: Ed Warnicke Date: Sun, 10 Jan 2016 06:15:18 -0800 Subject: Initial honeycomb code commit. This commit drops the basic structure with disabled integration tests. The tests will be enabled in a follow-up patch, which sorts out the current .so loading problems. Change-Id: If70f2f13b2cf49af82996f884218ac05d335c2ed Signed-off-by: Ed Warnicke Signed-off-by: Robert Varga --- NOTES.txt | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 NOTES.txt (limited to 'NOTES.txt') diff --git a/NOTES.txt b/NOTES.txt new file mode 100644 index 000000000..92f7d9c35 --- /dev/null +++ b/NOTES.txt @@ -0,0 +1,141 @@ + ODL Honeycomb Development Notes + =============================== +Links +===== +1) Ed's ODL Summit 2015 Honeycomb Application Development Tuturial +https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Application_Development_Tutorial +https://github.com/flavio-fernandes/odlHelloTutorial + +2) Maven +http://maven.apache.org/install.html +https://maven.apache.org/guides/mini/guide-proxies.html +https://maven.apache.org/ref/3.3.3/maven-settings/settings.html +https://maven.apache.org/guides/mini/guide-configuring-maven.html +http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html +https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html + +3) OpenDayLight +https://wiki.opendaylight.org/view/GIT_Cheat_Sheet +https://www.opendaylight.org/project-lifecycle-releases +https://wiki.opendaylight.org/view/CrossProject:Integration_Group:System_Test:Step_by_Step_Guide +https://wiki.opendaylight.org/view/Simultaneous_Release:Beryllium_Release_Plan +https://wiki.opendaylight.org/view/OpenDaylight_Presentations:Main +https://wiki.opendaylight.org/view/YANG_Tools:YANG_to_Java_Mapping +https://github.com/opendaylight/mdsal/tree/master/model // IETF Yang Models +https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/pom.xml#L78 // for 2013-07-15 version of ietf-yang-types +https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/pom.xml#L54 // for mdsal.model +// Data Change Listener examples +https://github.com/opendaylight/vtn/blob/master/manager/neutron/src/main/java/org/opendaylight/vtn/manager/neutron/NeutronNetworkChangeListener.java +https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataChangeListener.java +https://github.com/opendaylight/vpnservice/blob/078ae023c9cceb14aaadea10c81a5f1d90f47789/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/InterfaceManager.java + +Installation/Environment +======================== +1) Packages to install + apache-maven-3.3.3 (https://wiki.opendaylight.org/view/Install_On_Ubuntu_14.04) + openjdk-7-jdk + libssl-dev + eclipse + +2) Environment Variables: + export ODL_USERNAME=dwallace + export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.3 + export PATH=/usr/local/apache-maven/apache-maven-3.3.3/bin:$PATH + export MAVEN_OPTS='-Xmx4096m -XX:MaxPermSize=2048m' + export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 + export PATH=$JAVA_HOME/bin:$PATH + +Building/Installing ODL +======================= + +How-To's +======== +1) Build ODL + - cd honeycomb/ + - mvn clean install + +4) Start up ODL + - cd honeycomb/v3po/karaf/target/assembly/bin + - sudo bash + - ./karaf + Note: use "./karaf debug" to enable remote debugging. + Note: DON'T USE CTRL-D to quit. That fails to clean up gracefully. + Best practice is to use "shutdown -f". + Note: Building will run karaf which will fail if another instance + is already running. It also touches/creates files in + v3po/karaf... See #5 below for clean up recipe. + +5) Testing with YANGUI + - DOESN'T WORK WITH FIREFOX! :-( + - Install google chrome. + - Start chrome and enter the URL: + http://localhost:8080/index.html#/yangui/index + - Select "Yang UI" on left region + - Expand (click on '+') v3po rev.2015.01.05 + - Expand (click on '+') operations + - Enter text ("Dave") in textbox next to "me" + - Select "Send" + - Results show up in "version" textbox: + "Yo Dave! VPP interface list is [GigabitEthernet8/0/1: 5, + TenGigabitEthernet86/0/0: 6, local0: 0]!" + +6) Pre-build clean up + - Running karaf as root touches files which will break the build. + Do the following to clean up before building: + + shutdown -f + sudo chown -R dwallace:floppy /scratch/dwallace/honeycomb-vpp/v3po/karaf + +7) Adding YANG models + NOTE: pom.xml dependency versions are managed via + specifications. When including + standard yang models (e.g. from org.opendaylight.mdsal.model), there + needs to be a depencency defined to tell + maven what version to download into the local repo. This isw + why each dependency in the section does not + contain version information. + - Add a dependency in .../honeycomb/v3po/api/pom.xml + - Add a dependency in .../honeycomb/v3po/features/pom.xml + - Add a bundle in ../honeycomb/v3po/features/pom.xml + NOTE: Yangtools don't unravel nested import statements, so all + imported yang models referenced in v3po.yang must be + explicitly imported (e.g. ietf-interfaces) + +8) Useful CURL commands for debugging netconf mounts +# show mounted nodes +curl -su admin:admin http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes?prettyPrint=true;echo + +# show node configuration +curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/controller-config?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/vpp1?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/vpp2?prettyPrint=true;echo + +# show node connection status +curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/controller-config?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/vpp1?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/vpp2?prettyPrint=true;echo + +# show mount config modules +curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node//yang-ext:mount/?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp1/yang-ext:mount/?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp2/yang-ext:mount/?prettyPrint=true;echo + +# show mount config modules +curl -su admin:admin -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node//yang-ext:mount/?prettyPrint=true;echo +curl -su admin:admin -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/?prettyPrint=true;echo +curl -su admin:admin -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp1/yang-ext:mount/?prettyPrint=true;echo +curl -su admin:admin -H 'Accept: application/xml' -H 'Content-Type: application/xml' http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp2/yang-ext:mount/?prettyPrint=true;echo + +# show mount operational modules +curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node//yang-ext:mount/?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/vpp1/yang-ext:mount/?prettyPrint=true;echo +curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/vpp2/yang-ext:mount/?prettyPrint=true;echo + +9) Clean up ODL cache/state +cd /scratch/dwallace/honeycomb-demo/r2demo/karaf/target/assembly/bin +sudo rm -rf ../data/* +sudo rm -f ../etc/opendaylight/current/* -- cgit 1.2.3-korg