Merge "update release scripts for gui apex dependency"
[policy/parent.git] / docs / clamp / clamp / user-guide.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (c) 2017-2021 AT&T Intellectual Property.  All rights reserved.
4
5 User Guide: Control loop in Policy/CLAMP
6 ========================================
7
8 There are 2 control loop levels in Policy/CLAMP:
9
10 - Control loop template: This is created from the DCAE blueprint (designed in the DCAE designer), and distributed by SDC to CLAMP.
11 - Control loop instance: Based on the template, it represents a physical control loop in the platform related to a service and a VNF.
12
13 There is no way to design the microservice components of the control loop from scratch in CLAMP, you can only configure it and manage its life-cycle.
14 For more info on how to design the service in SDC, check this: https://wiki.onap.org/display/DW/CLAMP+videos#CLAMPvideos-DesignpartinSDC
15
16
17 There is a specific menu to view the available Control loop templates.
18
19 |clamp-template-menu|
20
21
22 Each microservice policies and operational policies is related to a Policy Model.
23 Clamp either communicates with Policy Engine periodically to download the available Policy Models automatically or user can upload the Policy Model manually.
24 Policy Models related operations could be found under Policy Models menu.
25
26 |clamp-policy-model-menu|
27
28
29 Under the menu *Loop Instance*, there's a list of actions to perform regarding to the loops.
30
31 |clamp-loop-menu|
32
33
34 Option *Create* creates the loop from the templates distributed by SDC.
35
36 |clamp-create-loop|
37
38
39 Option *Open* opens the saved loops. Once the distributed control loop has been chosen, the control loop is shown to the user.
40
41 |clamp-open-loop|
42
43
44 Option *Close* will close the current opened loop.
45
46
47 Option *Modify* opens the window to add/remove different Operational Policies to the loop.
48 Tab *Add Operational Policies* lists all the available operational policies.
49 Click *Add* button to add the selected operational policies to the loop.
50
51 |clamp-add-operational-policies|
52
53 Tab *Remove Operational Policies* lists all the operational policies added to the loop.
54 Click *Remove* button to remove the selected operational policies from the loop.
55
56 |clamp-remove-operational-policies|
57
58
59 Once opened, the user can start configure empty control loop using **Closed loop modeller**.
60
61 |clamp-opened-loop|
62
63
64 Loop modeler has 3 main parts:
65
66 #. Loop configuration view
67     Visualizes event flow in Control Loop. This view is auto-generated by Clamp. To generate it Clamp parses DCAE_INVENTORY_BLUEPRINT from CSAR distributed by SDC.
68     It Always consists of **VES -> <nodes from blueprint> -> OperationalPolicy**. Not all nodes are visualized. Only those with type **dcae.nodes.\***
69     |blueprint-node|
70
71 #. Loop status
72     Visualizes status of opened loop.
73 #. Loop logs
74     Table with log data of opened loop
75
76
77 Control Loop properties
78 -----------------------
79 In Dublin release this view shows what are deployment parameters or control Loop.
80 To open it from *Loop Instance* menu select *Properties*
81
82 |clamp-menu-prop|
83
84 This opens a box with JSON object. It contains deployment parameters extracted from DCAE_INVENTORY_BLUEPRINT.
85 It's not recommended to edit this JSON. Each of this parameters should be available in view shown to deploy analytic application.
86
87 |clamp-prop-box|
88
89
90 Operational policy properties
91 ---------------------------------------
92 Operational policies are added by the user using *Modify* window. The configuration view is generated using Policy Type assigned to selected operational policy.
93
94 To configure operational policies, user has to click the corresponding operational policy boxes. Example popup dialog for operational policy looks like:
95
96 |clamp-op-policy-box-policy|
97
98 Operations and payload for CDS actor is fetched from CDS.
99 Clamp receives CDS blueprint name and version information from sdnc_model_name and sdnc_model_version properties in CSAR distributed by SDC and queries CDS to get list of operations and payload for the corresponding CDS blueprint.
100
101 |clamp-cds-operation|
102
103 Micro-service policy properties
104 -------------------------------
105 Boxes between `VES` and `Operational Policies` are generated from blueprint. They can be one of ONAP predefined analytic microservices or custom analytics.
106 Each of the boxes is clickable. Microservice configuration view is generated using Policy Type assigned to selected microservice.
107 Clamp by default assumes that microservices have policy type **onap.policies.monitoring.cdap.tca.hi.lo.app**.
108
109 After clicking microservice box Clamp opens popup dialog. Example popup dialog for microservice with default type looks like:
110
111 |clamp-config-policy-tca|
112
113
114
115 In the *Loop Operations* menu, lists the operations to be perform to the loop.
116
117 |clamp-loop-operation-menu|
118
119
120 Submitting the Control loop to core policy
121 ------------------------------------------
122 The SUBMIT operation can be used to send the configuration to policy engine.
123 If everything is successful, the status to the policy will become *SENT*. Clamp should also show proper logs in logs view.
124
125 |clamp-policy-submitted|
126
127 After Policies are submitted they should be visible in Policy PAP component.
128 Please check  `Policy GUI <https://docs.onap.org/en/dublin/submodules/policy/engine.git/docs/platform/policygui.html>`_
129
130
131 Deploy/undeploy the Control Loop to DCAE
132 -----------------------------------------
133 Once sent to policy engine, Clamp can ask to DCAE to DEPLOY the micro service
134
135 This opens a window where the parameters of the DCAE micro service can be configured/tuned.
136 The policy_id is automatically generated by Clamp in the previous steps.
137
138 |clamp-deploy-params|
139
140 Once deployed on DCAE the status of DCAE goes to *MICROSERVICE_INSTALLED_SUCCESSFULLY*, it can then be Undeployed/Stopped/Restart.
141
142 .. |clamp-template-menu| image:: images/user-guide/template-menu.png
143 .. |clamp-policy-model-menu| image:: images/user-guide/policy-model-menu.png
144 .. |clamp-loop-menu| image:: images/user-guide/loop-menu.png
145 .. |clamp-create-loop| image:: images/user-guide/create-loop.png
146 .. |clamp-open-loop| image:: images/user-guide/open-loop.png
147 .. |clamp-add-operational-policies| image:: images/user-guide/add-operational-policies.png
148 .. |clamp-remove-operational-policies| image:: images/user-guide/remove-operational-policies.png
149 .. |clamp-opened-loop| image:: images/user-guide/opened-loop.png
150 .. |clamp-menu-prop| image:: images/user-guide/open-menu-prop.png
151 .. |clamp-prop-box| image:: images/user-guide/loop-properties.png
152 .. |clamp-op-policy-box-policy| image:: images/user-guide/op-policy-box-policy.png
153 .. |clamp-config-policy-tca| image:: images/user-guide/config-policy-tca.png
154 .. |clamp-loop-operation-menu| image:: images/user-guide/loop-operation-menu.png
155 .. |clamp-policy-submitted| image:: images/user-guide/policy-submitted.png
156 .. |clamp-deploy-params| image:: images/user-guide/deploy-params.png
157 .. |blueprint-node| image:: images/user-guide/blueprint_node_type.png
158 .. |clamp-cds-operation| image:: images/user-guide/clamp-cds-operation.png