4 The below steps covers manual setup of DCAE VM’s and DCAE service
12 DCAE VES Collector can be configured on VM with ubuntu-16.04 image
13 (m1.small should suffice if this is only service) and 20Gb cinder
21 sudo apt install `docker.io <http://docker.io/>`__
23 2. Pull the latest container from onap nexus
27 sudo docker login -u docker -p docker
28 `nexus.onap.org <http://nexus.onap.org/>`__:10001
31 `nexus.onap.org <http://nexus.onap.org/>`__:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.1
33 3. Start the VESCollector with below command
37 sudo docker run -d --name vescollector -p 8080:8080/tcp -p
38 8443:8443/tcp -P -e DMAAPHOST='<dmaap IP>'
39 `nexus.onap.org <http://nexus.onap.org/>`__:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.1
41 .. Note: Change the dmaaphost to required DMAAP ip. To change the
42 dmaap information for a running container, stop the active
43 container and rerun above command changing the dmaap IP.
47 i. Check logs under container /opt/app/VESCollector/logs/collector.log
50 ii. If no active feed, you can simulate an event into collector via curl
54 curl -i -X POST -d @<sampleves> --header "Content-Type:application/json" -k http://localhost:8080/eventListener/v5
56 .. Note: If DMAAPHOST provided is invalid, you will see exception
57 around publish on the collector.logs (collector queues and attempts
58 to resend the event hence exceptions reported will be periodic).
60 i. Below two topic configuration are pre-set into this container. When
61 valid DMAAP instance ip was provided and VES events are received,
62 the collector will post to below topics.
65 http://<dmaaphost>:3904/events/unauthenticated.SEC\_FAULT\_OUTPUT
68 -http://<dmaaphost>:3904/events/unauthenticated.SEC\_MEASUREMENT\_OUTPUT
73 To address windriver server in-stability, the below **init.sh** script
74 was used to start the container on VM restart.
79 sudo docker ps | grep “vescollector”
81 sudo docker login -u docker -p docker nexus.onap.org:10001
82 sudo docker pull nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.1
83 sudo docker rm -f vescollector
84 echo “Collector process not running - $(date)” >> /home/ubuntu/startuplog
85 sudo docker run -d –name vescollector -p 8080:8080/tcp -p 8443:8443/tcp -P -e DMAAPHOST=‘10.12.25.96’ nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.1
87 echo “Collector process running - $(date)” >> /home/ubuntu/startuplog
91 This script was invoked via VM init script (rc.d).
95 ln -s /home/ubuntu/init.sh /etc/init.d/init.sh
96 sudo update-rc.d init.sh start 2
100 ThresholdCrossingAnalysis (TCA/CDAP)
101 ------------------------------------
103 The platform deploys CDAP as cluster and instantiates TCA. For the
104 manual setup, we will leverage the CDAP SDK docker container to deploy
105 TCA instances. To setup TCA, choose VM with ubuntu-16.04 image,
106 m1.medium size and 50gb cinder volumes.
113 sudo apt install `docker.io <http://docker.io/>`__
115 2. Pull CDAP SDK container
119 sudo docker pull caskdata/cdap-standalone:4.1.2
121 3. Deploy and run the CDAP container
125 sudo docker run -d --name cdap-sdk-2 -p 11011:11011 -p 11015:11015
126 caskdata/cdap-standalone:4.1.2
128 4. Create Namespace on CDAP application
132 curl -X PUT http://localhost:11015/v3/namespaces/cdap_tca_hi_lo
134 5. Create TCA app config file - "tca\_app\_config.json" under ~ubuntu as below
140 "name": "dcae-analytics-cdap-tca",
146 "appName": "dcae-tca",
147 "appDescription": "DCAE Analytics Threshold Crossing Alert Application",
148 "tcaVESMessageStatusTableName": "TCAVESMessageStatusTable",
149 "tcaVESMessageStatusTableTTLSeconds": 86400.0,
150 "tcaAlertsAbatementTableName": "TCAAlertsAbatementTable",
151 "tcaAlertsAbatementTableTTLSeconds": 1728000.0,
152 "tcaVESAlertsTableName": "TCAVESAlertsTable",
153 "tcaVESAlertsTableTTLSeconds": 1728000.0,
154 "thresholdCalculatorFlowletInstances": 2.0,
155 "tcaSubscriberOutputStreamName": "TCASubscriberOutputStream"
160 6. Create TCA app preference file under ~ubuntu as below
165 "publisherContentType" : "application/json",
166 "publisherHostName" : "10.12.25.96",
167 "publisherHostPort" : "3904",
168 "publisherMaxBatchSize" : "1",
169 "publisherMaxRecoveryQueueSize" : "100000",
170 "publisherPollingInterval" : "20000",
171 "publisherProtocol" : "http",
172 "publisherTopicName" : "unauthenticated.DCAE_CL_OUTPUT",
173 "subscriberConsumerGroup" : "OpenDCAE-c1",
174 "subscriberConsumerId" : "c1",
175 "subscriberContentType" : "application/json",
176 "subscriberHostName" : "10.12.25.96",
177 "subscriberHostPort" : "3904",
178 "subscriberMessageLimit" : "-1",
179 "subscriberPollingInterval" : "20000",
180 "subscriberProtocol" : "http",
181 "subscriberTimeoutMS" : "-1",
182 "subscriberTopicName" : "unauthenticated.SEC_MEASUREMENT_OUTPUT",
183 "enableAAIEnrichment" : false,
184 "aaiEnrichmentHost" : "10.12.25.72",
185 "aaiEnrichmentPortNumber" : 8443,
186 "aaiEnrichmentProtocol" : "https",
187 "aaiEnrichmentUserName" : "DCAE",
188 "aaiEnrichmentUserPassword" : "DCAE",
189 "aaiEnrichmentIgnoreSSLCertificateErrors" : false,
190 "aaiVNFEnrichmentAPIPath" : "/aai/v11/network/generic-vnfs/generic-vnf",
191 "aaiVMEnrichmentAPIPath" : "/aai/v11/search/nodes-query",
193 "domain": "measurementsForVfScaling",
194 "metricsPerEventName": [{
195 "eventName": "vFirewallBroadcastPackets",
196 "controlLoopSchemaType": "VNF",
197 "policyScope": "DCAE",
198 "policyName": "DCAE.Config_tca-hi-lo",
199 "policyVersion": "v0.0.1",
201 "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
203 "fieldPath": "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta",
204 "thresholdValue": 300,
205 "direction": "LESS_OR_EQUAL",
207 "closedLoopEventStatus": "ONSET"
209 "closedLoopControlName": "ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a",
211 "fieldPath": "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta",
212 "thresholdValue": 700,
213 "direction": "GREATER_OR_EQUAL",
214 "severity": "CRITICAL",
215 "closedLoopEventStatus": "ONSET"
218 "eventName": "vLoadBalancer",
219 "controlLoopSchemaType": "VM",
220 "policyScope": "DCAE",
221 "policyName": "DCAE.Config_tca-hi-lo",
222 "policyVersion": "v0.0.1",
224 "closedLoopControlName": "ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3",
226 "fieldPath": "$.event.measurementsForVfScalingFields.vNicUsageArray[*].receivedTotalPacketsDelta",
227 "thresholdValue": 300,
228 "direction": "GREATER_OR_EQUAL",
229 "severity": "CRITICAL",
230 "closedLoopEventStatus": "ONSET"
233 "eventName": "Measurement_vGMUX",
234 "controlLoopSchemaType": "VNF",
235 "policyScope": "DCAE",
236 "policyName": "DCAE.Config_tca-hi-lo",
237 "policyVersion": "v0.0.1",
239 "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
241 "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
243 "direction": "EQUAL",
245 "closedLoopEventStatus": "ABATED"
247 "closedLoopControlName": "ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e",
249 "fieldPath": "$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value",
251 "direction": "GREATER",
252 "severity": "CRITICAL",
253 "closedLoopEventStatus": "ONSET"
260 .. Note: Dmaap configuration are specified on this file on
261 publisherHostName and subscriberHostName. To be changed as
264 7. Copy below script to CDAP server (this gets latest image from nexus and deploys TCA application) and execute it
269 TCA_JAR=dcae-analytics-cdap-tca-2.0.0.jar
270 rm -f /home/ubuntu/$TCA_JAR
272 wget https://nexus.onap.org/service/local/repositories/staging/content/org/onap/dcaegen2/analytics/tca/dcae-analytics-cdap-tca/2.0.0/$TCA_JAR
273 if [ $? -eq 0 ]; then
274 if [ -f /home/ubuntu/$TCA_JAR ]; then
275 echo “Restarting TCA CDAP application using $TCA_JAR artifact”
277 echo “ERROR: $TCA_JAR missing”
281 echo “ERROR: $TCA_JAR not found in nexus”
285 curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/stop
286 curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/stop
287 curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/stop
289 curl -X DELETE http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca
291 curl -X DELETE http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/artifacts/dcae-analytics-cdap-tca/versions/2.0.0
293 curl -X POST –data-binary @/home/ubuntu/$TCA_JAR http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/artifacts/dcae-analytics-cdap-tca
295 curl -X PUT -d @/home/ubuntu/tca_app_config.json http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca
297 curl -X PUT -d @/home/ubuntu/tca_app_preferences.json http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/preferences
299 curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/start
300 curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/start
301 curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/start
303 # get status of programs
304 curl http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/status
305 curl http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/status
306 curl http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/status
310 8. Verify TCA application and logs via CDAP GUI processes
312 The overall flow can be checked here
314 TCA Configuration Change
315 ~~~~~~~~~~~~~~~~~~~~~~~~
317 Typical configuration changes include changing DMAAP host and/or Policy configuration. If necessary, modify the file on step #6 and run the script noted as step #7 to redeploy TCA with updated configuration.
322 To address windriver server in-stability, the below **init.sh** script
323 was used to restart the container on VM restart. This script was
324 invoked via VM init script (rc.d).
329 #docker run -d –name cdap-sdk -p 11011:11011 -p 11015:11015 caskdata/cdap-standalone:4.1.2
330 sudo docker restart cdap-sdk-2
333 curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/start
334 curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/start
335 curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/start
338 This script was invoked via VM init script (rc.d).
342 ln -s /home/ubuntu/init.sh /etc/init.d/init.sh
343 sudo update-rc.d init.sh start 2