Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview


Architecture Diagram



Artifacts

Βlueprint (deployment artifact) :

Input file (deployment input)    :

Docker image                            : nexus3.onap.org:10001/onap/<>



Deployment Prerequisite/dependencies



Deployment Steps


Deployment of Tca-gen2 can be done using Dashboard UI or CloudifyUI or via CLI. Below steps are based on CLI.


  • Transfer blueprint component file in DCAE bootstrap POD under /blueprints directory
  • Transfer blueprint component inputs file in DCAE bootstrap POD under / directory
  • Log-in to the DCAE bootstrap POD's main container
  • Validate blueprint

    Validate Blueprint
    cfy blueprints validate /blueprints/k8s-tca-gen2.yaml
  • Verify Plugin versions in target Cloudify instance match to blueprint imports

    Verify Plugin version
    cfy plugins list

    If the version of plugin used are different, update the blueprint import to match.

  • Deploy Service

    Upload and deploy blueprint
    cfy install -b tca-gen2 -d tca-gen2 -i /k8s-tca-gen2-inputs.yaml /blueprints/k8s-tca-gen2.yaml

To un-deploy

  • Uninstall running component and delete deployment

    Uninstall component
    cfy uninstall tca-gen2
  • Delete blueprint

    Delete blueprint
    cfy blueprints delete tca-gen2
    

Initial Validation

After deployment, verify if tca-gen2 POD and mongoDB pod are running correctly

Verify Heartbeat is running
root@k8s-rancher:~# kubectl get pods -n onap | egrep "tca-gen2|mongoDB"


And then check the logs to see if it can connect to DMaaP, polling for events.

Verify Logs for Dmaap poll
kubectl logs -f -n onap dep-dcae-tca-gen2-service-5ff7558fd-4nt6z  dcae-tca-gen2-service
.
.

Functional tests

Following default configuration is loaded into tca-gen2 (set in blueprint configuration)


Configuration
 


To simulate the event flow and trigger missing tca-gen2 event, we can simulate a VES event into tca-gen2 subscription topic (using curl).

Generate tca-gen2 CL Onset

Send a triggering event to DMaaP topic unauthenticated.SEC_tca-gen2_OUTPUT

Before sending, validate following

  • Correct DMaaP address
  • "eventName" field in VES input matches eventName configuration set in tca-gen2 Service
  • "lastEpochMicrosec" in reflecting current time stamp approximately


Trigger a Heartbeat
curl -X POST http://10.12.5.8:30227/events/unauthenticated.SEC_tca-gen2_OUTPUT -H 'Content-Type: application/json' -d '{
        "event": {
                "commonEventHeader": {
                        "startEpochMicrosec": 1556753402000,
                        "sourceId": "79e90d76-513a-4f79-886d-470a0037c5cf",
                        "eventId": "tca-gen2_vDNS_10.0.0.1",
                        "nfcNamingCode": "DNS",
                        "reportingEntityId": "79e90d76-513a-4f79-886d-470a0037c5cf",
                        "eventType": "applicationVnf",
                        "priority": "Normal",
                        "version": 3,
                        "reportingEntityName": "testcmd001",
                        "sequence": 36312,
                        "domain": "tca-gen2",
                        "lastEpochMicrosec": 1556753402000,
                        "eventName": "tca-gen2_vDNS",
                        "sourceName": "testnode001",
                        "nfNamingCode": "MDNS"
                }
        }
}'


Logs showing VES heartbeat event being processed
 


We can check that a new DCAE_CL_OUTPUT event has been published (make sure you target the correct DMaaP IP address)

Fetch events from DCAE_CL_OUTPUT topic
curl http://10.12.5.8:30227/events/unauthenticated.DCAE_CL_OUTPUT/vv/1


Published event
["{\"closedLoopEventClient\": \"DCAE_tca-gen2_MS\", \"policyVersion\": \"1.0.0.5\", \"policyName\": \"vFireWall\", \"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\", \"target_type\": \"VNF\", \"AAI\": {\"generic-vnf.vnf-name\": \"testnode001\"}, \"closedLoopAlarmStart\": 1556768124419, \"closedLoopEventStatus\": \"ONSET\", \"closedLoopControlName\": \"ControlLoopEvent1\", \"version\": \"1.0\", \"target\": \"genVnfName\", \"requestID\": \"8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc\", \"from\": \"DCAE\"}"]


Generate tca-gen2 CL Abatement Event


Send a triggering event to DMaaP topic unauthenticated.SEC_tca-gen2_OUTPUT

Before sending, validate following

  • Correct DMaaP address
  • "eventName" field in VES input matches eventName configuration set in tca-gen2 Service
  • "lastEpochMicrosec" in reflecting current time stamp approximately
  •  Ensure the event is on the same "sourceName" as original event sent


Resend heartbeat with new timestamp
curl -X POST http://10.12.5.8:30227/events/unauthenticated.SEC_tca-gen2_OUTPUT -H 'Content-Type: application/json' -d '{
        "event": {
                "commonEventHeader": {
                        "startEpochMicrosec": 1556768319000,
                        "sourceId": "79e90d76-513a-4f79-886d-470a0037c5cf",
                        "eventId": "tca-gen2_vDNS_10.0.0.1",
                        "nfcNamingCode": "DNS",
                        "reportingEntityId": "79e90d76-513a-4f79-886d-470a0037c5cf",
                        "eventType": "applicationVnf",
                        "priority": "Normal",
                        "version": 3,
                        "reportingEntityName": "testcmd001",
                        "sequence": 36312,
                        "domain": "tca-gen2",
                        "lastEpochMicrosec": 1556768319000,
                        "eventName": "tca-gen2_vDNS",
                        "sourceName": "testnode001",
                        "nfNamingCode": "MDNS"
                }
        }
}'


Logs showing CL abatement event generation
 


We can check that a new DCAE_CL_OUTPUT event has been published (make sure you target the correct DMaaP IP address)

Fetch events from DCAE_CL_OUTPUT topic
curl http://10.12.5.8:30227/events/unauthenticated.DCAE_CL_OUTPUT/vv/1
CL Abatement Published event
["{\"closedLoopEventClient\": \"DCAE_tca-gen2_MS\", \"policyVersion\": \"1.0.0.5\", \"policyName\": \"vFireWall\", \"policyScope\": \"resource=sampleResource,type=sampletype,CLName=sampleCLName\", \"target_type\": \"VNF\", \"AAI\": {\"generic-vnf.vnf-name\": \"testnode001\"}, \"closedLoopAlarmStart\": 1556768386209, \"closedLoopEventStatus\": \"ABATED\", \"closedLoopControlName\": \"ControlLoopEvent1\", \"version\": \"1.0\", \"target\": \"genVnfName\", \"requestID\": \"8c1b8bd8-06f7-493f-8ed7-daaa4cc481bc\", \"from\": \"DCAE\"}"]


Dynamic Configuration Update

As the tca-gen2 service periodically polls Consul KV using configbindingService api's - the run time configuration of tca-gen2 service can be updated dynamically without having to redeploy/restart the service. The updates to configuration can be triggered either from Policy (or CLAMP) or made directly in Consul.

Locate the servicename by executing into tca-gen2 Service pod and getting env HOSTNAME value

ServiceName of Heartbeat Service
root@k8s-rancher:~# kubectl exec -it -n onap dep-s78f36f2daf0843518f2e25184769eb8b-dcae-tca-gen2-servithzx2 /bin/bash
Defaulting container name to s78f36f2daf0843518f2e25184769eb8b-dcae-tca-gen2-service.
Use 'kubectl describe pod/dep-s78f36f2daf0843518f2e25184769eb8b-dcae-tca-gen2-servithzx2 -n onap' to see all of the containers in this pod.

misshtbt@s78f36f2daf0843518f2e25184769eb8b-dcae-tca-gen2-service:~/bin$ env | grep HOSTNAME
HOSTNAME=s78f36f2daf0843518f2e25184769eb8b-dcae-tca-gen2-service

Change the configuration for Service in KV-store through UI

Consul URL
http://<k8snodeip>:30270/ui/#/dc1/kv/


Consul Snapshot <>

  • No labels