07b82a59fe0077a937c5156688908adca06cf517
[honeycomb.git] / release-notes / src / main / asciidoc / user_guide / user_running_honeycomb.adoc
1 = Running Honeycomb
2
3 link:release_notes.html[< Home]
4
5 == Starting Honeycomb agent
6 The zipped vpp-integration distribution can be started by invoking:
7
8 [subs="+attributes"]
9  sudo ./vpp-integration-distribution-{project-version}/honeycomb
10
11 This will start Honeycomb with all ODL dependencies and VPP translation code. It will automatically initialize vpp-jvpp to create interface between VPP and Honeycomb.
12
13 If Honeycomb was installed from the RPM or DEB packages, it can be started by (make sure you start vpp first):
14
15  sudo service vpp start
16  sudo service honeycomb start
17
18 The location of installed honeycomb is at /opt/honeycomb
19
20 == Testing Honeycomb agent
21 There are multiple ways of testing Honeycomb agent, depending on e.g. which northbound interface will be used
22
23 === Using NETCONF Northbound
24
25 Netconf northbound can be easily tested manually using CLI SSH client. Initialize SSH connection by invoking:
26
27  ssh admin@localhost -p 2831 -s netconf
28
29 NOTE: Using default credentials admin/admin, default port 2831 and netconf SSH channel Note: "Are you sure you want to continue connecting (yes/no)?" Answer yes
30
31 Next thing to do is to provide client hello message to initialize netconf session. Following content must be copy&pasted into SSH session + hit enter:
32
33 [source,xml]
34 ----
35 <hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
36     <capabilities>
37         <capability>urn:ietf:params:netconf:base:1.0</capability>
38     </capabilities>
39 </hello>
40 ]]>]]>
41 ----
42
43 This initializes netconf session silently. No response from Honeycomb will be provided
44
45 Next step is to get all the configuration data from VPP using Honeycomb's netconf northbound interface. Following content must be copy&pasted into SSH session + hit enter:
46
47 [source,xml]
48 ----
49 <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
50     <get-config>
51         <source>
52             <running/>
53         </source>
54     </get-config>
55 </rpc>
56 ]]>]]>
57 ----
58
59 Honeycomb will respond will all the data currently configured in Honeycomb + VPP
60
61 Next step is to get all the operational data from VPP using Honeycomb's netconf northbound interface. Following content must be copy&pasted into SSH session + hit enter:
62
63 [source,xml]
64 ----
65 <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
66     <get/>
67 </rpc>
68 ]]>]]>
69 ----
70
71 Honeycomb will respond will all operational data present in VPP.
72
73 ==== Listening for notifications
74
75 Notifications over NETCONF are supported by Honeycomb. To test it out, open ssh NETCONF session and send hello message. Exactly as detailed above.
76
77 Next thing to do is to activate honeycomb notification stream over NETCONF. So just send this rpc over ssh session:
78
79 [source,xml]
80 ----
81 <netconf:rpc netconf:message-id="101" xmlns:netconf="urn:ietf:params:xml:ns:netconf:base:1.0">
82 <create-subscription xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
83    <stream>honeycomb</stream>
84 </create-subscription>
85 </netconf:rpc>
86 ]]>]]>
87 ----
88
89 From now on, all notifications from honeycomb will appear in the netconf session. To verify, VPP's interface state can be changed over CLI:
90
91  telnet 0 5002
92  set interface state local0 up
93
94 A notification should appear in opened NETCONF session.
95
96 === Using RESTCONF northbound
97
98 [TIP]
99 ====
100 Testing over RESTCONF is easier, and common calls can be found in this postman collection:
101
102 * {project-git-web}/v3po/postman_rest_collection.json?h={project-branch}[V3PO postman collection][Honeycomb V3PO POSTMAN collection]*
103
104 Each request in the collection contains equivalent VPP command (over CLI or VAT, whichever works) in the description.
105 ====
106
107 To use:
108
109 * POSTMAN is a google chrome application
110 * Clicking the collection link above is not CORRECT
111 * Open POSTMAN and select Import https://www.dropbox.com/s/v2odj4gih5if99d/Screenshot%202016-05-19%2008.51.45.png?dl=0
112 * Select import from link https://www.dropbox.com/s/s6wsqzf7h4yhesh/Screenshot%202016-05-19%2008.52.54.png?dl=0
113 * Copy the link above into the dialogue https://www.dropbox.com/s/3qc3bbndhy6rr1g/Screenshot%202016-05-19%2008.53.30.png?dl=0
114 * PROFIT! https://www.dropbox.com/s/lrdtua7zziqyqc3/Screenshot%202016-05-19%2008.53.51.png?dl=0
115
116 NOTE: All POSTMAN collections are listed under User Guide.
117
118 ==== Listening for notifications
119 Notifications over RESTCONF are not supported due to ODL's RESTCONF limitations.