aeba21fdd0eab551d619e931d29bc16b83ad0d0a
[policy/parent.git] / docs / development / devtools / 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 control loop 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 control loop 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/cl-commission.png
65
66   Verification: The template is commissioned successfully without errors.
67
68 - Instantiate the commissioned Automation Composition definitions from the Policy Gui under 'Instantiation Management'.
69
70   .. image:: images/create-instance.png
71
72   Update instance properties of the Automation Composition Elements if required.
73
74   .. image:: images/update-instance.png
75
76   Verification: The control loop is created with default state "UNINITIALISED" without errors.
77
78   .. image:: images/cl-instantiation.png
79
80
81 Deployment and Configuration of DCAE microservice (PMSH):
82 ---------------------------------------------------------
83 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.
84
85 .. image:: images/cl-passive.png
86
87 Verification:
88
89 - DCAE service PMSH is deployed in to the kubernetes cluster. PMSH pods are in RUNNING state.
90   `helm ls -n <namespace>` - The helm deployment of dcaegen2 service PMSH is listed.
91   `kubectl get pod -n <namespace>` - The PMSH pods are deployed, up and running.
92
93 - 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/`
94
95 - The overall state of the Automation Composition is changed to "PASSIVE" in the Policy Gui.
96
97 .. image:: images/cl-create.png
98
99
100 Undeployment of DCAE microservice (PMSH):
101 -----------------------------------------
102 The Automation Composition state is changed from "PASSIVE" to "UNINITIALISED" from the Policy Gui.
103
104 .. image:: images/cl-uninitialise.png
105
106 Verification:
107
108 - The kubernetes participant uninstall the DCAE PMSH helm chart from the kubernetes cluster. The pods are removed from the cluster.
109
110 - The overall state of the Automation Composition is changed to "UNINITIALISED" in the Policy Gui.
111
112 .. image:: images/cl-uninitialised-state.png
113
114
115