Intial version for solution/dev
[oam.git] / solution / dev / smo / README.md
1 # Service Management and Orchestration (SMO)
2
3 With respect to OAM the SMO implements the O1-interface provider. According to the O-RAN OAM Architecture and the O-RAN OAM Interface Specification, the SMO has a NetConf Client for configuration and HTTP/REST/VES Server for receiving all kind of events in a VES format. 
4
5 The setup contains an OpenDaylight based NetConf client and a VES Test Collector.
6
7 ## Overview
8
9 This docker-compose file starts a pre-configured, self-contained SDN-R solution for developer test or demo purposes
10
11   * **SDN-R** single node instance
12
13     ... representing the NetConf consumer on the Service Management and Orchstration framework (SMO) for the O1 interface.
14     ODL-Neon/CCSDK/SDNC-ElAlto
15
16   * **VES test collector**
17
18     ... representing the VES (REST) provider at SMO for all kind of events.
19     DCAE-ElAlto/VES 5.0
20
21   * **NTSDevice simulator**
22
23     ... represents the NetConf Provider of an O-RAN component.
24
25   * **NetconfServerSimulator** 
26
27     ... another simulator
28
29 ## Prerequisites
30
31 docker-compose file version 3.3 is used and tested with
32
33   * Ubuntu 18.04 LTS
34   * Docker version 19.03.x
35   * docker-compose version 1.24.x
36   * git version 2.17.1
37   * docker-compose for the solution
38   * enable git private docker registry, if used
39
40 ```
41 cat /etc/os-release
42 docker --version
43 docker-compose --version
44 git --version
45 cd 
46 mkdir git
47 cd git
48 git clone  https://git-highstreet-technologies.com/highstreet/CICD_environment.git
49 cd CICD_environment/docker/solution/o-ran-dev
50 ```
51
52 ## Usage
53
54 ### Bring Up Solution 
55
56   * Check (adjust if required) environment variables
57
58 ```
59 cd ~/git/CICD_environment/docker/solution/o-ran-dev
60 nano .env
61 ```
62   
63   * startup solution 
64
65 ```
66 cd ~/git/CICD_environment/docker/solution/o-ran-dev
67 docker-compose up -d
68 ```
69
70 ### Log files and karaf console
71
72   * ODL karaf.logs can be found on docker host
73 ```
74 tail -f /var/tmp/sdnr/logs/karaf.log
75 ```
76
77   * karaf console access (karaf:karaf)
78
79 ```
80 ssh karaf@localhost -p 8101
81 ```
82
83   * ves-testcollector logs
84
85 ```
86   tail -f /var/tmp/ves-v5/logs/evel-output.log
87 ```
88
89 ### Customizing Solution
90
91 '.env' file contains customizing parameters
92
93
94 ### Verification Solution
95
96 #### Access to SDN-R UX
97
98   * login into SDN-R
99     http://<host_ip>:8181/odlux/index.html
100     User:admin
101     Password:admin
102
103 #### Connectivity NETCONF interface to simulator of type 'NTSdevice'
104
105   * Mount simulated network element (default parameters if not changed in '.env'
106     * Open 'Connect'
107     * Required Network Elements: add ('+' sign)
108     * Name: NTSDevice
109     * IP: <host_ip>
110     * Port: 2240
111     * User: netconf
112     * Password: netconf
113     
114   Network Element 'NTSDevice' Should be connected
115
116 #### Connectivity NETCONF interface to simulator of type 'netconfserversimulator'
117
118   * Mount simulated network element (default parameters if not changed in '.env'
119     * Open 'Connect'
120     * Required Network Elements: add ('+' sign)
121     * Name: SIMTEST
122     * IP: <host_ip>
123     * Port: 2230
124     * User: admin
125     * Password: admin
126
127   Network Element 'SIMTEST' Should be connected
128
129
130 #### Connectivity SDN-R to VES-testcollector 
131   * verify VES-testcollector on host terminal
132   ```
133   tail -f /var/tmp/ves-v5/logs/evel-output.log
134   ```
135   
136   * heart beat events should be visible
137     
138   ```
139   Authenticated OK
140 ==== Wed Aug 14 12:28:51 2019 =================================================
141 Valid body decoded & checked against schema OK:
142 {
143     "event": {
144         "commonEventHeader": {
145             "domain": "heartbeat",
146             "eventId": "testpattern-ab305d54-85b4-a31b-7db2-fb6b9e546015",
147             "eventName": "heartbeat_Controller",
148             "eventType": "Controller",
149             "lastEpochMicrosec": 11087481660,
150             "priority": "Low",
151             "reportingEntityId": "",
152             "reportingEntityName": "bf0c1c6deac1",
153             "sequence": 7,
154             "sourceId": "",
155             "sourceName": "bf0c1c6deac1",
156             "startEpochMicrosec": 11087481660,
157             "version": 3.0
158         },
159         "heartbeatFields": {
160             "additionalFields": [
161                 {
162                     "name": "eventTime",
163                     "value": "2019-08-14T12:28:51.5Z"
164                 }
165             ],
166             "heartbeatFieldsVersion": 1.0,
167             "heartbeatInterval": 30
168         }
169     }
170 }172.20.0.3 - - [14/Aug/2019 12:28:51] "POST /eventListener/v5 HTTP/1.1" 202 0
171
172   ```
173 #### Verify e2e event flow from 'NTSDevice' to VES-testcollector
174
175 NTSDevice simulator raise new alarms every 60 seconds. Time interval can be configured within .env file
176 This alarm shoulld be visible within the ves testcollector log file
177
178
179 #### Verify e2e event flow from 'netconfserversimulator' to VES-testcollector
180
181 Raise test event via device simulator and check VES log file
182   
183 * login to simulator with admin:admin
184
185   ```
186   ssh admin@<host_IP> -p 8000
187   
188   ```
189   * type 'n2'  (or 'n1') for m and clear event
190  
191   
192 ```
193 ==== Wed Aug 14 12:36:34 2019 =================================================
194 Valid body decoded & checked against schema OK:
195 {
196     "event": {
197         "commonEventHeader": {
198             "domain": "fault",
199             "eventId": "SIMTEST_LP-MWPS-RADIO_signalIsLostMajor",
200             "eventName": "fault_Microwave_Radio_Alarms_signalIsLostMajor",
201             "eventType": "Microwave_Radio_Alarms",
202             "lastEpochMicrosec": 1565786194600000,
203             "priority": "High",
204             "reportingEntityId": "",
205             "reportingEntityName": "bf0c1c6deac1",
206             "sequence": 23,
207             "sourceId": "",
208             "sourceName": "SIMTEST",
209             "startEpochMicrosec": 1565786194600000,
210             "version": 3.0
211         },
212         "faultFields": {
213             "alarmAdditionalInformation": [
214                 {
215                     "name": "eventTime",
216                     "value": "2019-08-14T12:36:34.6Z"
217                 },
218                 {
219                     "name": "equipType",
220                     "value": "unknown"
221                 },
222                 {
223                     "name": "vendor",
224                     "value": "unknown"
225                 },
226                 {
227                     "name": "model",
228                     "value": "unknown"
229                 }
230             ],
231             "alarmCondition": "signalIsLostMajor",
232             "alarmInterfaceA": "LP-MWPS-RADIO",
233             "eventSeverity": "MAJOR",
234             "eventSourceType": "Microwave_Radio",
235             "faultFieldsVersion": 2.0,
236             "specificProblem": "signalIsLostMajor",
237             "vfStatus": "Active"
238         }
239     }
240 }172.20.0.3 - - [14/Aug/2019 12:36:34] "POST /eventListener/v5 HTTP/1.1" 202 0
241 ```
242   * type '~.' to exit ssh
243   * 
244   
245 ### Terminate solution
246
247 To stop all container:
248
249 ```
250 cd ~/git/CICD_environment/docker/solution/o-ran-dev
251 docker-compose down
252 ```
253
254 re-start solution at any point in time with 
255 ```
256 cd ~/git/CICD_environment/docker/solution/o-ran-dev
257 docker-compose up -d
258 ```
259
260
261 ### Cleanup
262
263 !!! be careful if other stopped containers are on the same system
264 ```
265 docker system prune -a -f
266 sudo rm -rf /var/tmp/ves-v5/
267
268 ```
269 ### Troubleshooting
270
271 Issue: no VES events, no heartbeat events
272   * For some reasons SDN-R overwrites DCAE settings in devicemanager.properties.
273
274 ```
275 sudo docker-compose down
276 git checkout -- devicemanager.properties
277 sudo docker-compose up -d
278 ```