Bump version to 1.16.9 FINAL
[honeycomb.git] / NOTES.txt
1                         ODL Honeycomb Development Notes
2                         ===============================
3 Links
4 =====
5 1) Ed's ODL Summit 2015 Honeycomb Application Development Tuturial
6 https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Application_Development_Tutorial
7 https://github.com/flavio-fernandes/odlHelloTutorial
8
9 2) Maven
10 http://maven.apache.org/install.html
11 https://maven.apache.org/guides/mini/guide-proxies.html
12 https://maven.apache.org/ref/3.3.3/maven-settings/settings.html
13 https://maven.apache.org/guides/mini/guide-configuring-maven.html
14 http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html
15 https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html
16
17 3) OpenDayLight
18 https://wiki.opendaylight.org/view/GIT_Cheat_Sheet
19 https://www.opendaylight.org/project-lifecycle-releases
20 https://wiki.opendaylight.org/view/CrossProject:Integration_Group:System_Test:Step_by_Step_Guide
21 https://wiki.opendaylight.org/view/Simultaneous_Release:Beryllium_Release_Plan
22 https://wiki.opendaylight.org/view/OpenDaylight_Presentations:Main
23 https://wiki.opendaylight.org/view/YANG_Tools:YANG_to_Java_Mapping
24 https://wiki.opendaylight.org/view/OpenDaylight_Controller:MD-SAL:Concepts
25 https://wiki.opendaylight.org/view/OpenDaylight_Controller:Netconf:Design
26 https://wiki.opendaylight.org/view/OpenDaylight_Controller:Config:Examples:Netconf#Configuring_Netconf_logging
27 https://wiki.opendaylight.org/view/OpenDaylight_Controller:Lithium:Netconf:Integration_Test
28 https://wiki.opendaylight.org/view/Controller_Core_Functionality_Tutorials:Tutorials:Netconf_Mount#Testing_against_ODL_itself_.28MD-SAL_netconf_northbound_loopback_mount.29
29 https://github.com/opendaylight/coretutorials
30 https://github.com/opendaylight/mdsal/tree/master/model  // IETF Yang Models
31 https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/pom.xml#L78  // <dependency> for 2013-07-15 version of ietf-yang-types
32 https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-api/pom.xml#L54  // <dependencyManagement><dependency> for mdsal.model
33 // Data Change Listener examples
34 https://github.com/opendaylight/vtn/blob/master/manager/neutron/src/main/java/org/opendaylight/vtn/manager/neutron/NeutronNetworkChangeListener.java
35 https://github.com/opendaylight/ovsdb/blob/master/southbound/southbound-impl/src/main/java/org/opendaylight/ovsdb/southbound/OvsdbDataChangeListener.java
36 https://github.com/opendaylight/vpnservice/blob/078ae023c9cceb14aaadea10c81a5f1d90f47789/interfacemgr/interfacemgr-impl/src/main/java/org/opendaylight/vpnservice/interfacemgr/InterfaceManager.java
37 http://karaf.apache.org/
38 https://karaf.apache.org/manual/latest-2.2.x/developers-guide/features-maven-plugin-generate.html
39
40 4) Java / JNI
41 http://stackoverflow.com/questions/3949260/java-class-isinstance-vs-class-isassignablefrom
42 http://stackoverflow.com/questions/7275844/interface-as-a-type-in-java
43 http://www.xyzws.com/javafaq/what-does-classforname-method-do/17
44 https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html
45 https://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/types.html#type_signatures
46
47 5) Misc
48 http://www.w3schools.com/tags/ref_urlencode.asp
49
50 Installation/Environment
51 ========================
52 1) Packages to install
53    apache-maven-3.3.3 (https://wiki.opendaylight.org/view/Install_On_Ubuntu_14.04)
54    openjdk-7-jdk
55    libssl-dev
56    eclipse
57
58 2) Environment Variables:
59    export ODL_USERNAME=dwallace
60    export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.3
61    export PATH=/usr/local/apache-maven/apache-maven-3.3.3/bin:$PATH
62    export MAVEN_OPTS='-Xmx4096m -XX:MaxPermSize=2048m' 
63    export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
64    export PATH=$JAVA_HOME/bin:$PATH
65
66 Building/Installing ODL
67 =======================
68
69 How-To's
70 ========
71 1) Build ODL
72    - cd honeycomb/
73    - mvn clean install
74
75 4) Start up ODL
76    - cd honeycomb/v3po/karaf/target/assembly/bin
77    - sudo bash
78    - ./karaf
79    Note: use "./karaf debug" to enable remote debugging.
80    Note: DON'T USE CTRL-D to quit.  That fails to clean up gracefully.
81          Best practice is to use "shutdown -f".
82    Note: Building will run karaf which will fail if another instance
83          is already running.  It also touches/creates files in
84          v3po/karaf... See #5 below for clean up recipe.
85
86 5) Testing with YANGUI
87    - DOESN'T WORK WITH FIREFOX! :-(
88    - Install google chrome.
89    - Start chrome and enter the URL: 
90      http://localhost:8080/index.html#/yangui/index
91    - Select "Yang UI" on left region
92    - Expand (click on '+') v3po rev.2015.01.05
93    - Expand (click on '+') operations
94    - Enter text ("Dave") in textbox next to "me"
95    - Select "Send"
96    - Results show up in "version" textbox:
97      "Yo Dave! VPP interface list is [GigabitEthernet8/0/1: 5, 
98       TenGigabitEthernet86/0/0: 6, local0: 0]!"
99
100 6) Pre-build clean up
101    - Running karaf as root touches files which will break the build.
102      Do the following to clean up before building:
103
104      shutdown -f
105      sudo chown -R dwallace:floppy /scratch/dwallace/honeycomb-vpp/v3po/karaf
106      
107 7) Adding YANG models
108    NOTE: pom.xml dependency versions are managed via
109          </dependencyManagement></dependency> specifications.  When including
110          standard yang models (e.g. from org.opendaylight.mdsal.model), there
111          needs to be a <ManagedDependency> depencency defined to tell
112          maven what version to download into the local repo.  This isw
113          why each dependency  in the </Dependencies> section does not
114          contain version information.        
115    - Add a dependency in .../honeycomb/v3po/api/pom.xml
116    - Add a dependency in .../honeycomb/v3po/features/pom.xml
117    - Add a bundle in ../honeycomb/v3po/features/pom.xml
118      NOTE: Yangtools don't unravel nested import statements, so all
119            imported yang models referenced in v3po.yang must be
120            explicitly imported (e.g. ietf-interfaces)
121
122 8) Useful CURL commands for debugging netconf mounts
123 # show mounted nodes
124 curl -su admin:admin http://127.0.0.1:8181/restconf/config/opendaylight-inventory:nodes?prettyPrint=true;echo
125
126 # show node configuration
127 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/<NODE>?prettyPrint=true;echo
128 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
129 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
130 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
131
132 # show node connection status
133 curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/<NODE>?prettyPrint=true;echo
134 curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/controller-config?prettyPrint=true;echo
135 curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/vpp1?prettyPrint=true;echo
136 curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/vpp2?prettyPrint=true;echo
137
138 # show mount config modules <response in json format>
139 curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/<NODE>/yang-ext:mount/?prettyPrint=true;echo
140 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
141 curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp1/yang-ext:mount/?prettyPrint=true;echo
142 curl -su admin:admin http://localhost:8181/restconf/config/network-topology:network-topology/topology/topology-netconf/node/vpp2/yang-ext:mount/?prettyPrint=true;echo
143
144 # show mount config modules <response in xml format>
145 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/<NODE>/yang-ext:mount/?prettyPrint=true;echo
146 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
147 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
148 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
149
150 # show mount operational modules <response in json format>
151 curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/<NODE>/yang-ext:mount/?prettyPrint=true;echo
152 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
153 curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/vpp1/yang-ext:mount/?prettyPrint=true;echo
154 curl -su admin:admin http://localhost:8181/restconf/operational/network-topology:network-topology/topology/topology-netconf/node/vpp2/yang-ext:mount/?prettyPrint=true;echo
155
156 9) Clean up ODL cache/state
157 cd /scratch/dwallace/honeycomb-demo/r2demo/karaf/target/assembly/bin
158 sudo rm -rf ../data/*
159 sudo rm -f ../etc/opendaylight/current/*