...
sudo apt install docker.io
2) Pull the latest container from onap nexus
...
sudo docker pull nexus.onap.org:10001/onap/org.onap.dcaegen2.collectors.ves.vescollector:1.1
...
3) Start the VESCollector with below command
...
Note: Change the dmaaphost to required DMAAP ip. To change the dmaap information for a running container, stop the active container and rerun above command changing the dmaap IP.
4) Verification
- Check logs under container /opt/app/VESCollector/logs/collector.log for errors
- If no active feed, you can simulate an event into collector via curl
...
Measurement -http://<dmaaphost>:3904/events/unauthenticated.SEC_MEASUREMENT_OUTPUT
VM Init
To address windriver server in-stability, the below init.sh script was used to start the container on VM restart.
...
sudo update-rc.d init.sh start 2
ThresholdCrossingAnalysis (TCA/CDAP)
...
The platform deploys CDAP as cluster and instantiates TCA. For the manual setup, we will leverage the CDAP SDK docker container to deploy TCA instances. To setup TCA, choose VM with ubuntu-16.04 image, m1.medium size and 50gb cinder volumes.
1) Install docker
sudo apt-get update
...
Note: Dmaap configuration are specified on this file on publisherHostName and subscriberHostName. To be changed as required**
...
6) Copy below script to CDAP server (this gets latest image from nexus and deploys TCA application) and execute it
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
#!/bin/sh TCA_JAR=dcae-analytics-cdap-tca-2.0.0.jar rm -f /home/ubuntu/$TCA_JAR cd /home/ubuntu/ wget https://nexus.onap.org/service/local/repositories/staging/content/org/onap/dcaegen2/analytics/tca/dcae-analytics-cdap-tca/2.0.0/$TCA_JAR if [ $? -eq 0 ]; then if [ -f /home/ubuntu/$TCA_JAR ]; then echo "Restarting TCA CDAP application using $TCA_JAR artifact" else echo "ERROR: $TCA_JAR missing" exit 1 fi else echo "ERROR: $TCA_JAR not found in nexus" exit 1 fi # stop programs curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/stop curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/stop curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/stop # delete application curl -X DELETE http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca# delete artifact curl -X DELETE http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/artifacts/dcae-analytics-cdap-tca/versions/2.0.0# load artifact curl -X POST --data-binary @/home/ubuntu/$TCA_JAR http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/artifacts/dcae-analytics-cdap-tcaecho# create app curl -X PUT -d @/home/ubuntu/tca_app_config.json http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca# load preferences curl -X PUT -d @/home/ubuntu/tca_app_preferences.json http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/preferences# start programs curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/start curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/start curl -X POST http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/startecho# get status of programs curl http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRPublisherWorker/status curl http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/workers/TCADMaaPMRSubscriberWorker/status curl http://localhost:11015/v3/namespaces/cdap_tca_hi_lo/apps/dcae-tca/flows/TCAVESCollectorFlow/statusecho |
7) Verify TCA application and logs via CDAP GUI processes
...
http://<hostname/ip>:11011/oldcdap/ns/cdap_tca_hi_lo/apps/dcae-tca/programs/flows/TCAVESCollectorFlow/runs
TCA Configuration Change
...
Typical configuration changes include changing DMAAP host and/or Policy configuration. If necessary, modify the file on step #5 and run the script noted as step #6 to redeploy TCA with updated configuration.
...