sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 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-2018 AT&T Intellectual Property. All rights reserved. |
| 4 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 5 | Closed loop in CLAMP |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 6 | ------------------------- |
| 7 | There is 2 closed loop levels in CLAMP: |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 8 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 9 | - Closed loop template: This is created from the DCAE blueprint (designed in the DCAE designer), and distributed by SDC to CLAMP. |
| 10 | - Closed loop instance: Based on the template, it represents a physical closed loop in the platform related to a service and a VNF. |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 11 | This is created in CLAMP when receiving the SDC notification, as this one is related to a specific service/vnf. |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 12 | |
| 13 | There is no way to design a closed 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 | There is a specific menu to open distributed closed loops in CLAMP UI. |
| 17 | |
| 18 | |clamp-open-menu| |
| 19 | |
| 20 | Please note that the option "Create CL" can be used to create a closed loop from the template distributed by SDC, you can therefore instantiate it for another service/vnf |
| 21 | |
| 22 | Once you click on "Open CL", this dialog box is shown |
| 23 | |
| 24 | |clamp-open-box| |
| 25 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 26 | Once the distributed closed loop has been chosen, the closed loop is shown to the user. |
| 27 | From this view user can start configure empty closed loop using **Closed loop modeller**. |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 28 | |
| 29 | |clamp-opened-closed-loop| |
| 30 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 31 | Closed 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 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 43 | Closed Loop properties |
| 44 | ---------------------- |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 45 | In Dublin release this view shows what are deployment parameters or Closed Loop. |
| 46 | To open it from *Closed Loop* menu select *Properties CL* |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 47 | |
| 48 | |clamp-menu-prop| |
| 49 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 50 | This opens a box with JSON object. It contains deployment parameters extracted from DCAE_INVENTORY_BLUEPRINT. |
| 51 | It's not recommended to edit this JSON. Each of this parameters should be available in view shown to deploy analytic application. |
| 52 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 53 | |
| 54 | |clamp-prop-box| |
| 55 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 56 | Operational and Guard policy properties |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 57 | ----------------------------- |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 58 | Operational policy is a parametrized drools (in Dublin) rule with logic performing action on resource. |
| 59 | User 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. |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 60 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 61 | There is only one operational policy per closed loop. More about operational policies can be found here `Control Loop Operational Policy <https://wiki.onap.org/display/DW/Control+Loop+Operational+Policy>`_. |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 62 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 63 | Guard policy is policy securing operational policy calls. It defines a set of constraints that have to be matched before running operational policy. |
| 64 | More 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 | |
| 66 | To configure operational and guard policy user has to click *OperationalPolicy* box. |
| 67 | |
| 68 | Once clicked, it's possible to configure operational policy. Policy can have child policies, one per Recipe. |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 69 | |
| 70 | |clamp-op-policy-box-policy1| |
| 71 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 72 | 1. Parent policy name |
| 73 | 2. Global time limit for this operational policies |
| 74 | 3. Specifies whether policy is abated |
| 75 | 4. Unique id for Control Loop. |
| 76 | 5. Button for creating child/parent policies |
| 77 | 6. Unique id of Policy. (Clamp internal) |
| 78 | 7. Recipe/Operation triggered on controller/orchestrator |
| 79 | 8. Maximum count of retries |
| 80 | 9. Timeout for this operational policy |
| 81 | 10. Actor used to perform action. (Orchestrator/Controller) |
| 82 | 11. Payload required by actor to perform an action |
| 83 | 12. Set of fields with policies called under certain conditions. E.g. when health-check receives timeout failure restart could be called. |
| 84 | 13. Set of fields specifying resource. On this resource Operational Policy should perform an action |
| 85 | 14. Checkbox enabling/disabling guard policy for this operational policy |
| 86 | 15. Guard Policy type (frequency limited or min max) |
| 87 | 16. 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 | |
| 90 | Micro-service policy properties |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 91 | ------------------------------- |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 92 | Boxes between `VES` and `OperationalPolicy` are generated from blueprint. They can be one of ONAP predefined analytic microservices or custom analytics. |
| 93 | Each of the boxes is clickable. Microservice configuration view is generated using Policy Type assigned to selected microservice. |
| 94 | Clamp by default assumes that microservices have policy type **onap.policies.monitoring.cdap.tca.hi.lo.app**. |
| 95 | |
| 96 | After clicking microservice box Clamp opens popup dialog. Example popup dialog for microservice with default type looks like: |
| 97 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 98 | |clamp-config-policy-tca1| |
| 99 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 100 | |clamp-config-policy-tca2| |
| 101 | |
| 102 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 103 | Saving Closed loop |
| 104 | ------------------ |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 105 | Policies are saved localy in Clamp after each configuration change |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 106 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 107 | |
| 108 | Submitting the Closed loop to policy |
| 109 | ------------------------------------ |
| 110 | In the "Manage Menu", the submit action can be used to send the configuration to policy engine. |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 111 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 112 | |
| 113 | |clamp-submit-cl| |
| 114 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 115 | If everything is successful, this changes the status to "Submitted". Clamp should also show proper logs in logs view. |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 116 | |
| 117 | |clamp-distributed| |
| 118 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 119 | After Policies are submitted they should be visible in Policy PAP component. |
| 120 | Please check `Policy GUI <https://docs.onap.org/en/dublin/submodules/policy/engine.git/docs/platform/policygui.html>`_ |
| 121 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 122 | Deploy/undeploy the Closed loop to DCAE |
| 123 | --------------------------------------- |
| 124 | Once sent to policy engine, Clamp can ask to DCAE to deploy the micro service |
| 125 | |
| 126 | |clamp-deploy| |
| 127 | |
| 128 | This opens a window where the parameters of the DCAE micro service can be configured/tuned. |
| 129 | The policy_id is automatically generated by Clamp in the previous steps. |
| 130 | |
| 131 | |clamp-deploy-params| |
| 132 | |
| 133 | Once deployed on DCAE the status Closed loop status goes to ACTIVE, it can then be Undeployed/Stopped or even Updated (this is to push new policies on policy engine) |
| 134 | |
| 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 |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 142 | .. |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 Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 144 | .. |clamp-config-policy-tca2| image:: images/user-guide/config-policy-tca2.png |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 145 | .. |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 Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame^] | 149 | .. |clamp-undeploy| image:: images/user-guide/undeploy.png |
| 150 | .. |blueprint-node| image:: images/user-guide/blueprint_node_type.png |