Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

View file
nameclamp-onap-bejing-cl-take2.mp4
height250

Testing Assumptions


A single VES Collector will be pre-deployed for all flows

DCAE project will generate 'hand-craft' a blueprint for TCA deployment using Kubernetes

SDC (DCAE-Design Studio) will not generate the blueprint programmatically

...

Deploy VES Blueprint to DCAE which will deploy the VES collector

Generate TCA Blueprint Generate

Confirm validity of previously-generated (and uploaded to Policy) TCA Policy modelmodel 

Policy

Policy Make sure that policy model for TCA is already uploaded to Policy GUI - this should be done as part of initial Policy container deployment

CLAMP

Store policy model for TCA in local repository

Testing Flow

This sequence of flows below will be repated for all services being tested (vCPE, vFirewall, vDNS)

Flow 1:

...

Design and

...

Distribute First Control Loop

...

Image Added



Code Block
titleUML Code for Flow 1
collapsetrue
@startuml
title ThisCreating isthe theservice flowdesign thatin willSDC beand testeddistributing indesign Beijingartifacts
actor SDC_Tester
participant SDC
participant CLAMP
actor CLAMP_Tester
participant DCAE_SCH
participant DCAE_Deployment
participant DCAE_Inventory
participant Policy
participant DCAE_Policy_Handler
participant DCAE_Consul
autonumber
box "DCAE controller"
participant "Service Change Handler" as SCH
database Inventory
end box
autonumber
note over SDC_Tester: Closed loop 1
SDC_Tester -> SDC : CreateDesign vCPE service composed\nof one VNF resource
note left
Closed loop 1
end note
SDC_Tester -> SDC : Upload DCAE TCA blueprint\nas artifact
SDC_Tester -> SDC : Test, Certifycertify, distribute the Distributeservice Servicedesign
SDC -> CLAMP : Blueprint distribution
SDC -> DCAE_SCH : Blueprint distribution
DCAE_SCH -> Inventory : Save blueprint
@enduml


Testing Directions


Log into SDC as designer (cs0008)

Create a service

In Composition, create a resource instance in the service

On the composition canvas, click on the resource instance

On the panel on the right, click on the second tab (Deployment Artifacts)

Click "Add Artifact"

Assign values to the artifacts as in the below screenshot, and upload the provided blueprint.

Blueprint: 

View file
nametcadocker-service_v3_demo.yaml
height250

Image Added


Submit the Service for Testing

Log in as a Tester user (jm0007)

Test the Service and Approve It

Log in as a Governance User (gv0001)

Approve Service for Distribution

Log in as Operations User (op0001)

Distribute Service

Monitor Service to see that both DCAE and Clamp clients have successfully deployed the artifact


Step RangeDescriptionStatusNotes
1-3Upload artifact and distributeTested
4Process distribution in CLAMPTested
5-6Process distribution in DCAETested





Flow 2: Configure and Deploy First Control Loop


Image Added


Step RangeDescriptionStatusNotes
1-3CLAMP Creates PoliciesTested with workaround

Has been tested, but outstanding bug on Policy, which requires manual workaround on Policy GUI

Jira
serverONAP JIRA
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyPOLICY-775
- fixed based on POLICY-777

4-11CLAMP Starts deployment in DCAETested
12-17CLAMP starts getting deployment statusTested
18-22DCAE gets and stores TCA policy

23-25DCAE deploys TCATested
26-30TCA gets Policy

31-35CLAMP gets final statusTested

Fix required for successful status to be passed back -

Jira
serverONAP JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyDCAEGEN2-482
- this is done







Code Block
titleUML Code for Flow 2
collapsetrue
@startuml
title Configure and Deploy First Control Loop
actor CLAMP_Tester
participant CLAMP
participant Policy
box "DCAE controller"
database Inventory
participant "Deployment-handler" as DH
control "Cloudify+plugin" as Cloudify
participant "Policy-handler" as PH
database "Consul-kv" as consul
participant "Config-binding service" as CBS
control k8s
end box
participant TCA_Instance
autonumber
note over CLAMP_Tester: Closed loop 1
hnote right CLAMP_Tester: decided Saveto install blueprintTCA
CLAMP_Tester -> CLAMP : Configure thresholds\n of control loop
CLAMP_Tester -> CLAMP : Configure actions\n of control loop
activate CLAMP
CLAMP -> Policy : Create Configuration\n and Operational Policies
PolicyCLAMP -> DCAE_Policy_HandlerInventory : ConfigurationGet Policy
DCAE_Policy_Handler -> DCAE_Consul: Store configDCAE Service Id\n based on Distributed Parameters
group install TCA_Instance
CLAMP -> DCAE_InventoryDH : Getinstall instance DCAEof ServiceTCA Idwith basedpolicy_id onas Distributedinput
activate ParametersDH
CLAMPDH -> DCAE_DeploymentInventory : get Triggerblueprint Deployment
instancefor TCA_Instance
TCA_InstanceInventory --> DH DCAE_Consul: Get Configuration
@enduml

Flow 2: Deploy and Configure Second Control Loop

Image Removed

Code Block
titleUML Code for Flow 2
collapsetrue
@startuml
title This is the flow that will be tested in Beijing
actor SDC_Tester
participant SDC
participant CLAMP
actor CLAMP_Tester
participant DCAE_SCH
participant DCAE_Deployment
participant DCAE_Inventory
participant Policy
participant DCAE_Policy_Handler
participant DCAE_Consul
autonumber
SDC_Tester -> SDC : Create vFirewall service composed\nof one VNF resource
note left
Closed loop 2
end note
SDC_Tester -> SDC : Upload DCAE TCA blueprint\nas artifact
SDC_Tester -> SDC : Test, Certify, Distribute Service
SDC -> CLAMP : Blueprint distribution
SDC -> DCAE_SCH : Blueprint distribution
DCAE_SCH -> DCAE_Inventory : Save blueprint
CLAMP_Tester -> CLAMP : Configure thresholds\n of control loop
CLAMP_Tester -> CLAMP : Configure actions\n of control loop
CLAMP -> Policy : Create Configuration and Operational Policies
Policy -> DCAE_Policy_Handler : Configuration Policy
DCAE_Policy_Handler -> DCAE_Consul: Store config
CLAMP -> DCAE_Inventory : Get DCAE Service Id based on Distributed Parameters
CLAMP -> DCAE_Deployment : Trigger Deployment
participant TCA_Instance
note right
There are now two TCA instances deployed
end note
TCA_Instance -> DCAE_Consul: Get Configuration
@enduml

Flow 3: Deploy and Configure Third Control Loop

Image Removed

Code Block
titleUML Code for Flow 3
collapsetrue
@startuml
title This is the flow that will be tested in Beijing
actor SDC_Tester
participant SDC
participant CLAMP
actor CLAMP_Tester
participant DCAE_SCH
participant DCAE_Deployment
participant DCAE_Inventory
participant Policy
participant DCAE_Policy_Handler
participant DCAE_Consul
autonumber
SDC_Tester -> SDC : Create vDNS service composed\nof one VNF resource
note left
Closed loop 3
end note
SDC_Tester -> SDC : Upload DCAE TCA blueprint\nas artifact
SDC_Tester -> SDC : Test, Certify, Distribute Service
SDC -> CLAMP : Blueprint distribution
SDC -> DCAE_SCH : Blueprint distribution
DCAE_SCH -> DCAE_Inventory : Save blueprint
CLAMP_Tester -> CLAMP : Configure thresholds\n of control loop
CLAMP_Tester -> CLAMP : Configure actions\n of control loop
CLAMP -> Policy : Create Configuration and Operational Policies
Policy -> DCAE_Policy_Handler : Configuration Policy
DCAE_Policy_Handler -> DCAE_Consul: Store config
CLAMP -> DCAE_Inventory : Get DCAE Service Id based on Distributed Parameters
CLAMP -> DCAE_Deployment : Trigger Deployment
participant TCA_Instance
note right
There are now three TCA instances deployed
end note
TCA_Instance -> DCAE_Consul: Get Configuration
@enduml

Flow 4: Run Control Loop #1

blueprint for TCA
DH -> Cloudify : install TCA_Instance
activate Cloudify
Cloudify --> DH : started: execution_id
DH --> CLAMP : started installation: url to get status
deactivate DH
CLAMP -> CLAMP : sleep
group CLAMP polling for installation status
    CLAMP -> CLAMP : wake up
    activate CLAMP #DarkSalmon
    CLAMP -> DH : get status of installation
    activate DH #DarkSalmon
    DH -> Cloudify : get execution status
    activate Cloudify #DarkSalmon
    Cloudify --> DH : status: started
    deactivate Cloudify
    DH --> CLAMP : installation status: **processing**
    deactivate DH
    CLAMP -> CLAMP : sleep
    deactivate CLAMP
end group
Cloudify -> PH : get policy\n by policy_id
PH -> Policy : /getConfig policy for policyName = policy_id
Policy --> PH : return found policy
PH --> Cloudify : policy by policy_id
Cloudify -> consul: store config with policies\n for TCA_Instance
Cloudify -> k8s: create instance of TCA
activate k8s
create TCA_Instance
k8s -> TCA_Instance: deploys
activate TCA_Instance
k8s --> Cloudify: created instance of TCA
deactivate k8s
deactivate Cloudify
TCA_Instance -> CBS: get Config\n and policies\n (**new API**)
CBS -> consul: get Config\n and policies
consul --> CBS: Config\n and policies
CBS --> TCA_Instance: Config and policies
TCA_Instance -->]: run
group CLAMP polling for installation status
    CLAMP -> CLAMP : wake up
    activate CLAMP #DarkSalmon
    CLAMP -> DH : get status of installation
    activate DH #DarkSalmon
    DH -> Cloudify : get execution status
    activate Cloudify #DarkSalmon
    Cloudify --> DH : status: terminated
    deactivate Cloudify
    DH --> CLAMP : installation status: **succeeded**
    deactivate DH
    deactivate CLAMP
end group
hnote over CLAMP: installed TCA
deactivate CLAMP
end group
@enduml


Testing Directions

Log into CLAMP using credentials admin/password

Select Open CL from Closed Loop Menu

You will find the Closed Loop model that has been distributed from SDC.  Its name has the form: CLAMP + <Service name> + <version> + <resource name>.  For example, below there is a closed loop model for serivce 'intsrv1', version 1.0 and resource vLBMS0.

Image Added


This will bring up a view of the control loop model.  This allows you to create the TCA configuration policy and Operational Policy.


Image Added


Fill in the details of the Operational Policy by clicking on Policy


Image Added


Fill in the details of the Configuration Policy by clicking on TCA

Image Added


Choose Save CL from Closed Loop Menu

Choose Submit from Manage Menu

The Status will change to "Distributed"

Choose Deploy from Manage Menu

The deploy window provides a JSON of inputs to provide to the deploy call:

  • The policyId field should be kept as-is
  • The rest of the JSON object should be replaced by the following.  external_port and scn_name need to be unique across existing deployments of TCA microservice
Code Block
titleinputs
collapsetrue
,"aaiEnrichmentHost":"aai","aaiEnrichmentPort":"30233","enableAAIEnrichment":"true","enableRedisCaching":"false","dmaap_host":"10.12.5.127","dmaap_port":"3904","redisHosts":"na","consul_host":"10.12.5.130","consul_port":"8500","cbs_host":"config-binding-service","cbs_port":"10000","tag_version":"nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tca-cdap-container:1.0.0","dh_override":"dockerhost","dh_location_id":"zone1","scn_name":"dcaegen2-analytics_tca_clampinstance_936","external_port":"32138"}


This may take on the order of tens of seconds, as it waits for DCAE to report final success.

Once the Deployment is successful in DCAE, Status will change to "Active"


Image Added

Flow 3: Run Control Loop After Deployment 


Image AddedImage Removed


Code Block
titleUML Code for Flow 43
collapsetrue
@startuml
title This is the flow that will be tested in Beijing
participant VNF
participant VES_Collector
participant TCA_Instance1
participant Policy
participant AppC
autonumber
VNF -> VES_Collector : VES Message\nmeasurementsForVfScaling
VES_Collector -> TCA_Instance1 : VES Message\nmeasurementsForVfScaling
TCA_Instance1 -> Policy : Signature ONSET Message
Policy -> AppC : Action
AppC -> VNF : Action
note left
VNF action taken which
corrects the condition
end note
VNF -> VES_Collector : VES Message\nmeasurementsForVfScaling
note left
Time passes until next 
message
end note
VES_Collector -> TCA_Instance1 : VES Message\nmeasurementsForVfScaling
TCA_Instance1 -> Policy : Signature ABATE Message
@enduml

Run Control Loop #2

Run Control Loop #3

Reconfigure Control Loop

Reconfigure

Step RangeDescriptionStatusNotes
1-5Onset after deploying CL

App-C bug on receiving RESET request -

Jira
serverONAP JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyAPPC-900

6-8Abate after deploying CL






Flow 4: Update Control Loop by Reconfiguring TCA

Reconfigure

Image AddedImage Removed


Code Block
titleUML Code for Flow 54
collapsetrue
@startuml
title This is the flow that will be tested in Beijing
participant CLAMP
actor CLAMP_Tester
participant Policy
participant DCAE_Policy_Handler
participant DCAE_Consul Update Control Loop by Reconfiguring TCA
actor CLAMP_Tester
participant CLAMP
participant Policy
box "DCAE controller"
participant "Policy-handler" as PH
participant "Deployment-handler" as DH
control "Cloudify+plugin" as Cloudify
database "Consul-kv" as consul
participant "Config-binding service" as CBS
end box
participant TCA_Instance
autonumber
CLAMP_Tester -> CLAMP : ReonfigureUpdate thresholdscontrol\n ofloop control loopsettings
CLAMP -> Policy: update policy
group policy update
    Policy -> PH : Update Configuration Policy
Policy -> DCAE_Policy_Handler : Updated Configuration Policy
DCAE_Policy_Handler -> DCAE_Consul: Store config
participant TCA_Instance
TCA_Instance -> DCAE_Consul: Get Configuration notify about\n updated policy
    activate PH
    PH -> Policy : /getConfig for\n policyName
    Policy --> PH : policy body
    PH -> DH : policy updated
    deactivate PH
    activate DH
    DH -> Cloudify : get components info
    Cloudify --> DH : components
    DH -> DH : find TCA_Instance\n by policy_id
    DH -> Cloudify : policy updated\n on TCA_Instance
    deactivate DH
    activate Cloudify
    Cloudify -> consul: store updated\n policies\n for TCA_Instance
    deactivate Cloudify
end
==TCA is expected to periodically poll for latest policies==
group polling for policy changes
    activate TCA_Instance
    TCA_Instance <-]: wake up
    activate TCA_Instance #DarkSalmon
    TCA_Instance -> CBS: get Config\n and policies\n (**new API**)
    activate CBS #DarkSalmon
    CBS -> consul: get Config\n and policies
    activate consul #DarkSalmon
    consul --> CBS: Config\n and policies
    deactivate consul
    CBS --> TCA_Instance: Config and\n policies
    deactivate CBS
    hnote over TCA_Instance: check if policy\n changed
    TCA_Instance -> TCA_Instance: act on\n changed\n policy
    TCA_Instance -->]: run
    deactivate TCA_Instance
end
@enduml


Run Control Loop Again

...

After the control loop is reconfigured, we test that the changes have taken effect.  This is done by running the control loop again.  For example, if the threshold value was increased, we would initiate an event with the old threshold value, and see that the signature is no longer produced.


Testing Directions


Click on either the Policy box or the TCA box in order to bring up the details of the given policy

Update the values on the policy

Choose Update from the Manage CL Menu


Step RangeDescriptionStatusNotes
1-2CLAMP updates policy

Jira
serverONAP JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyPOLICY-779
Policy update API call does not return; root cause thought to be in
Jira
serverONAP JIRA
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId425b2b0a-557c-3c0c-b515-579789cceedb
keyPOLICY-777
- these have been fixed

3-5Updated policy sent to DCAE

6-11Updated policy stored in DCAE

12-17TCA retrieves new policy

Flow 5: Stop and Restart Control Loop

Image Added


Code Block
titleUML Code for Flow 5
collapsetrue
@startuml
participant CLAMP
actor CLAMP_Tester
participant Policy
autonumber
CLAMP_Tester -> CLAMP : Stop operation\nof control loop
CLAMP -> Policy : Disable Operational Policy
participant VNF
participant VES_Collector
participant TCA_Instance1
participant AppC
autonumber
group Runtime Test
VNF -> VES_Collector : VES Message\nmeasurementsForVfScaling
VES_Collector -> TCA_Instance1 : VES Message\nmeasurementsForVfScaling
TCA_Instance1 -> Policy : Signature ONSET Message
end
CLAMP_Tester -> CLAMP : Restart operation\nof control loop
CLAMP -> Policy : Enable Operational Policy
participant VNF
participant VES_Collector
participant TCA_Instance1
participant AppC
autonumber
group Runtime Test
VNF -> VES_Collector : VES Message\nmeasurementsForVfScaling
VES_Collector -> TCA_Instance1 : VES Message\nmeasurementsForVfScaling
TCA_Instance1 -> Policy : Signature ONSET Message
Policy -> AppC : Action
AppC -> VNF : Action
VNF -> VES_Collector : VES Message\nmeasurementsForVfScaling
VES_Collector -> TCA_Instance1 : VES Message\nmeasurementsForVfScaling
TCA_Instance1 -> Policy : Signature ABATE Message
end
@enduml


Testing Directions


Choose Stop from the Manage Menu

The Status will change to "Stopped"

To verify, check Policy GUI to confirm that the BRMS policy under the control loop's scope has been removed


Choose Restart from the Manage Menu

The Status will change back to "Active"

To verify, check Policy GUI to confirm that the BRMS policy under the control loop's scope has been returned


Step RangeDescriptionStatusNotes
1-2Operational Policy (action) is disabled


Disabling of action is tested


Operational Policy (action) is enabled


Onset is tested after enabling action


Abatement is tested after enabling action


Flow 6: Undeploy Control Loop


Choose Undeploy from the Manage Menu

The Status will change to "Distributed"

To verify, check DCAE to make sure that the TCA instance has been removed

Dashboard