blob: ac45ebc42db433f96b00184ad0d7050f23a8cdbd [file] [log] [blame]
sebdet5dea2222019-01-11 13:11:03 +01001.. 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-2018 AT&T Intellectual Property. All rights reserved.
4
osgn422w17f8fc62019-05-29 19:26:49 +02005Control loop in CLAMP
6---------------------
7There is 2 control loop levels in CLAMP:
Krysiak Adamd3a57d92019-05-28 15:35:09 +02008
osgn422w17f8fc62019-05-29 19:26:49 +02009- Control loop template: This is created from the DCAE blueprint (designed in the DCAE designer), and distributed by SDC to CLAMP.
10- Control loop instance: Based on the template, it represents a physical control loop in the platform related to a service and a VNF.
Krysiak Adamd3a57d92019-05-28 15:35:09 +020011 This is created in CLAMP when receiving the SDC notification, as this one is related to a specific service/vnf.
sebdet5dea2222019-01-11 13:11:03 +010012
osgn422w17f8fc62019-05-29 19:26:49 +020013There is no way to design a control loop from scratch in CLAMP, you can only configure it and manage its life-cycle.
sebdet5dea2222019-01-11 13:11:03 +010014For more info on how to design the service in SDC, check this: https://wiki.onap.org/display/DW/CLAMP+videos#CLAMPvideos-DesignpartinSDC
15
osgn422w17f8fc62019-05-29 19:26:49 +020016There is a specific menu to open distributed control loops in CLAMP UI.
sebdet5dea2222019-01-11 13:11:03 +010017
18|clamp-open-menu|
19
osgn422w17f8fc62019-05-29 19:26:49 +020020Please note that the option "Create CL" can be used to create a control loop from the template distributed by SDC, you can therefore instantiate it for another service/vnf
sebdet5dea2222019-01-11 13:11:03 +010021
22Once you click on "Open CL", this dialog box is shown
23
24|clamp-open-box|
25
osgn422w17f8fc62019-05-29 19:26:49 +020026Once the distributed control loop has been chosen, the control loop is shown to the user.
27From this view user can start configure empty control loop using **Closed loop modeller**.
sebdet5dea2222019-01-11 13:11:03 +010028
29|clamp-opened-closed-loop|
30
Krysiak Adamd3a57d92019-05-28 15:35:09 +020031Closed loop modeler has 3 main parts:
32
33#. Loop configuration view
34 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.
35 It Always consists of **VES -> <nodes from blueprint> -> OperationalPolicy**. Not all nodes are visualized. Only those with type **dcae.nodes.\***
36 |blueprint-node|
37
38#. Loop status
39 Visualizes status of opened loop.
40#. Loop logs
41 Table with log data of opened loop
42
osgn422w17f8fc62019-05-29 19:26:49 +020043Control Loop properties
44-----------------------
45In Dublin release this view shows what are deployment parameters or control Loop.
Krysiak Adamd3a57d92019-05-28 15:35:09 +020046To open it from *Closed Loop* menu select *Properties CL*
sebdet5dea2222019-01-11 13:11:03 +010047
48|clamp-menu-prop|
49
Krysiak Adamd3a57d92019-05-28 15:35:09 +020050This opens a box with JSON object. It contains deployment parameters extracted from DCAE_INVENTORY_BLUEPRINT.
51It's not recommended to edit this JSON. Each of this parameters should be available in view shown to deploy analytic application.
52
sebdet5dea2222019-01-11 13:11:03 +010053
54|clamp-prop-box|
55
Krysiak Adamd3a57d92019-05-28 15:35:09 +020056Operational and Guard policy properties
osgn422w17f8fc62019-05-29 19:26:49 +020057---------------------------------------
Krysiak Adamd3a57d92019-05-28 15:35:09 +020058Operational policy is a parametrized drools (in Dublin) rule with logic performing action on resource.
59User can't chose his own rule. Clamp always tries to create operational policy that bases on rule bind with **ClosedLoopControlName** attribute available in Policy dictionary.
sebdet5dea2222019-01-11 13:11:03 +010060
osgn422w17f8fc62019-05-29 19:26:49 +020061There is only one operational policy per control loop. More about operational policies can be found here `Control Loop Operational Policy <https://wiki.onap.org/display/DW/Control+Loop+Operational+Policy>`_.
sebdet5dea2222019-01-11 13:11:03 +010062
Krysiak Adamd3a57d92019-05-28 15:35:09 +020063Guard policy is policy securing operational policy calls. It defines a set of constraints that have to be matched before running operational policy.
64More about guard policies can be found here `Creating and Using Guard Policies <https://docs.onap.org/en/dublin/submodules/policy/engine.git/docs/platform/guardpolicy.html>`_.
65
66To configure operational and guard policy user has to click *OperationalPolicy* box.
67
68Once clicked, it's possible to configure operational policy. Policy can have child policies, one per Recipe.
sebdet5dea2222019-01-11 13:11:03 +010069
70|clamp-op-policy-box-policy1|
71
Krysiak Adamd3a57d92019-05-28 15:35:09 +0200721. Parent policy name
732. Global time limit for this operational policies
743. Specifies whether policy is abated
754. Unique id for Control Loop.
765. Button for creating child/parent policies
776. Unique id of Policy. (Clamp internal)
787. Recipe/Operation triggered on controller/orchestrator
798. Maximum count of retries
809. Timeout for this operational policy
8110. Actor used to perform action. (Orchestrator/Controller)
8211. Payload required by actor to perform an action
8312. Set of fields with policies called under certain conditions. E.g. when health-check receives timeout failure restart could be called.
8413. Set of fields specifying resource. On this resource Operational Policy should perform an action
8514. Checkbox enabling/disabling guard policy for this operational policy
8615. Guard Policy type (frequency limited or min max)
8716. Set of guard policy specific fields. Please check `Creating and Using Guard Policies <https://docs.onap.org/en/dublin/submodules/policy/engine.git/docs/platform/guardpolicy.html>`_.
88
89
90Micro-service policy properties
sebdet5dea2222019-01-11 13:11:03 +010091-------------------------------
Krysiak Adamd3a57d92019-05-28 15:35:09 +020092Boxes between `VES` and `OperationalPolicy` are generated from blueprint. They can be one of ONAP predefined analytic microservices or custom analytics.
93Each of the boxes is clickable. Microservice configuration view is generated using Policy Type assigned to selected microservice.
94Clamp by default assumes that microservices have policy type **onap.policies.monitoring.cdap.tca.hi.lo.app**.
95
96After clicking microservice box Clamp opens popup dialog. Example popup dialog for microservice with default type looks like:
97
sebdet5dea2222019-01-11 13:11:03 +010098|clamp-config-policy-tca1|
99
Krysiak Adamd3a57d92019-05-28 15:35:09 +0200100|clamp-config-policy-tca2|
101
102
osgn422w17f8fc62019-05-29 19:26:49 +0200103Saving Control loop
104-------------------
Krysiak Adamd3a57d92019-05-28 15:35:09 +0200105Policies are saved localy in Clamp after each configuration change
sebdet5dea2222019-01-11 13:11:03 +0100106
sebdet5dea2222019-01-11 13:11:03 +0100107
osgn422w17f8fc62019-05-29 19:26:49 +0200108Submitting the Control loop to policy
109-------------------------------------
sebdet5dea2222019-01-11 13:11:03 +0100110In the "Manage Menu", the submit action can be used to send the configuration to policy engine.
Krysiak Adamd3a57d92019-05-28 15:35:09 +0200111
sebdet5dea2222019-01-11 13:11:03 +0100112
113|clamp-submit-cl|
114
Krysiak Adamd3a57d92019-05-28 15:35:09 +0200115If everything is successful, this changes the status to "Submitted". Clamp should also show proper logs in logs view.
sebdet5dea2222019-01-11 13:11:03 +0100116
117|clamp-distributed|
118
Krysiak Adamd3a57d92019-05-28 15:35:09 +0200119After Policies are submitted they should be visible in Policy PAP component.
120Please check `Policy GUI <https://docs.onap.org/en/dublin/submodules/policy/engine.git/docs/platform/policygui.html>`_
121
osgn422w17f8fc62019-05-29 19:26:49 +0200122Deploy/undeploy the Control Loop to DCAE
123-----------------------------------------
sebdet5dea2222019-01-11 13:11:03 +0100124Once sent to policy engine, Clamp can ask to DCAE to deploy the micro service
125
126|clamp-deploy|
127
128This opens a window where the parameters of the DCAE micro service can be configured/tuned.
129The policy_id is automatically generated by Clamp in the previous steps.
130
131|clamp-deploy-params|
132
osgn422w17f8fc62019-05-29 19:26:49 +0200133Once deployed on DCAE the status Control loop status goes to ACTIVE, it can then be Undeployed/Stopped or even Updated (this is to push new policies on policy engine)
sebdet5dea2222019-01-11 13:11:03 +0100134
135|clamp-undeploy|
136
137.. |clamp-open-menu| image:: images/user-guide/open-menu.png
138.. |clamp-open-box| image:: images/user-guide/open-box.png
139.. |clamp-opened-closed-loop| image:: images/user-guide/opened-closed-loop.png
140.. |clamp-menu-prop| image:: images/user-guide/open-menu-prop.png
141.. |clamp-prop-box| image:: images/user-guide/prop-box.png
sebdet5dea2222019-01-11 13:11:03 +0100142.. |clamp-op-policy-box-policy1| image:: images/user-guide/op-policy-box-policy1.png
143.. |clamp-config-policy-tca1| image:: images/user-guide/config-policy-tca1.png
Krysiak Adamd3a57d92019-05-28 15:35:09 +0200144.. |clamp-config-policy-tca2| image:: images/user-guide/config-policy-tca2.png
sebdet5dea2222019-01-11 13:11:03 +0100145.. |clamp-submit-cl| image:: images/user-guide/submit-menu.png
146.. |clamp-distributed| image:: images/user-guide/distributed.png
147.. |clamp-deploy| image:: images/user-guide/deploy.png
148.. |clamp-deploy-params| image:: images/user-guide/deploy-params.png
Krysiak Adamd3a57d92019-05-28 15:35:09 +0200149.. |clamp-undeploy| image:: images/user-guide/undeploy.png
150.. |blueprint-node| image:: images/user-guide/blueprint_node_type.png