Merge "Update ACM design arch docs"
[policy/parent.git] / docs / development / devtools / pairwise / clamp-dcae.rst
1 .. This work is licensed under a
2 .. Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4
5 .. _clamp-pairwise-testing-label:
6
7 .. toctree::
8    :maxdepth: 2
9
10 CLAMP <-> Dcae
11 ~~~~~~~~~~~~~~
12
13 The pairwise testing is executed against a default ONAP installation in the OOM.
14 CLAMP-Automation Composition interacts with DCAE to deploy dcaegen2 services like PMSH.
15 This test verifies the interaction between DCAE and clamp-acm works as expected.
16
17 General Setup
18 *************
19
20 The kubernetes installation allocated all policy components across multiple worker node VMs.
21 The worker VM hosting the policy components has the following spec:
22
23 - 16GB RAM
24 - 8 VCPU
25 - 160GB Ephemeral Disk
26
27
28 The ONAP components used during the pairwise tests are:
29
30 - CLAMP acm runtime, policy participant, kubernetes participant.
31 - DCAE for running dcaegen2-service via kubernetes participant.
32 - ChartMuseum service from platform, initialised with DCAE helm charts.
33 - DMaaP for the communication between Automation Composition runtime and participants.
34 - Policy Gui for instantiation and commissioning of control loops.
35
36
37 ChartMuseum Setup
38 *****************
39
40 The chartMuseum helm chart from the platform is deployed in the same cluster. The chart server is then initialized with the helm charts of dcaegen2-services by running the below script in OOM repo.
41 The script accepts the directory path as an argument where the helm charts are located.
42
43 .. code-block:: bash
44
45     #!/bin/sh
46     ./oom/kubernetes/contrib/tools/registry-initialize.sh -d /oom/kubernetes/dcaegen2-services/charts/
47
48 Testing procedure
49 *****************
50
51 The test set focused on the following use cases:
52
53 - Deployment and Configuration of DCAE microservice PMSH
54 - Undeployment of PMSH
55
56 Creation of the Automation Composition:
57 ---------------------------------------
58 An Automation Composition is created by commissioning a Tosca template with Automation Composition definitions and instantiating the Automation Composition with the state "UNINITIALISED".
59
60 - Upload a TOSCA template from the POLICY GUI. The definitions include a kubernetes participant and automation composition elements that deploys and configures a microservice in the kubernetes cluster.
61   Automation Composition element for kubernetes participant includes a helm chart information of DCAE microservice and the element for Http Participant includes the configuration entity for the microservice.
62   :download:`Sample Tosca template <tosca/pairwise-testing.yml>`
63
64   .. image:: images/ac-commission.png
65
66   .. image:: images/ac-upload.png
67
68   Verification: The template is commissioned successfully without errors.
69
70 - Instantiate the commissioned Automation Composition definitions from the Policy Gui under 'Instantiation Management'.
71
72   .. image:: images/create-instance.png
73
74   Update instance properties of the Automation Composition Elements if required.
75
76   .. image:: images/update-instance.png
77
78   Verification: The Automation composition is created with default state "UNINITIALISED" without errors.
79
80   .. image:: images/ac-instantiation.png
81
82
83 Deployment and Configuration of DCAE microservice (PMSH):
84 ---------------------------------------------------------
85 The Automation Composition state is changed from "UNINITIALISED" to "PASSIVE" from the Policy Gui. The kubernetes participant deploys the PMSH helm chart from the DCAE chartMuseum server.
86
87 .. image:: images/ac-passive.png
88
89 Verification:
90
91 - DCAE service PMSH is deployed in to the kubernetes cluster. PMSH pods are in RUNNING state.
92   `helm ls -n <namespace>` - The helm deployment of dcaegen2 service PMSH is listed.
93   `kubectl get pod -n <namespace>` - The PMSH pods are deployed, up and running.
94
95 - The subscription configuration for PMSH microservice from the TOSCA definitions are updated in the Consul server. The configuration can be verified on the Consul server UI `http://<CONSUL-SERVER_IP>/ui/#/dc1/kv/`
96
97 - The overall state of the Automation Composition is changed to "PASSIVE" in the Policy Gui.
98
99 .. image:: images/ac-create.png
100
101
102 Undeployment of DCAE microservice (PMSH):
103 -----------------------------------------
104 The Automation Composition state is changed from "PASSIVE" to "UNINITIALISED" from the Policy Gui.
105
106 .. image:: images/ac-uninitialise.png
107
108 Verification:
109
110 - The kubernetes participant uninstall the DCAE PMSH helm chart from the kubernetes cluster. The pods are removed from the cluster.
111
112 - The overall state of the Automation Composition is changed to "UNINITIALISED" in the Policy Gui.
113
114 .. image:: images/ac-uninitialised-state.png
115
116
117