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 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 5 | Control loop in CLAMP |
| 6 | --------------------- |
| 7 | There is 2 control loop levels in CLAMP: |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 8 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 9 | - 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 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 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 13 | There is no way to design a control loop from scratch in CLAMP, you can only configure it and manage its life-cycle. |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 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 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 16 | There is a specific menu to open distributed control loops in CLAMP UI. |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 17 | |
| 18 | |clamp-open-menu| |
| 19 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 20 | Please 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 |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 21 | |
| 22 | Once you click on "Open CL", this dialog box is shown |
| 23 | |
| 24 | |clamp-open-box| |
| 25 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 26 | Once the distributed control loop has been chosen, the control loop is shown to the user. |
| 27 | From this view user can start configure empty control 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 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 43 | Control Loop properties |
| 44 | ----------------------- |
| 45 | In Dublin release this view shows what are deployment parameters or control Loop. |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 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 |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [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 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 61 | There 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>`_. |
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 |
Krysiak Adam | 3122f72 | 2019-06-21 11:36:01 +0200 | [diff] [blame] | 77 | Child/parent policies are policies that depend on one another under certain circumstances (check point 12.) |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 78 | 6. Unique id of Policy. (Clamp internal) |
| 79 | 7. Recipe/Operation triggered on controller/orchestrator |
Krysiak Adam | 3122f72 | 2019-06-21 11:36:01 +0200 | [diff] [blame] | 80 | This recipe will be used by policy drools PDP when sending request to controller/orchestrator. |
| 81 | E.g. in case of *Health-Check* is selected here and *APPC* as actor PDP will trigger APPC LCM API triggering health-check operation. |
| 82 | |
| 83 | List of options is predefined in Clamp code and can't be modified. |
| 84 | Possible options: |
| 85 | * Restart |
| 86 | * Rebuild |
| 87 | * Migrate |
| 88 | * Health-Check |
| 89 | * ModifyConfig |
| 90 | * VF Module Create |
| 91 | * VF Module Delete |
| 92 | * Reroute |
| 93 | 8. Maximum amount of retries that policy takes when triggering action |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 94 | 9. Timeout for this operational policy |
| 95 | 10. Actor used to perform action. (Orchestrator/Controller) |
Krysiak Adam | 3122f72 | 2019-06-21 11:36:01 +0200 | [diff] [blame] | 96 | Actor that will be used by drools PDP to perform action. |
| 97 | Possible options: |
| 98 | * APPC |
| 99 | * SO |
| 100 | * VFC |
| 101 | * SDNC |
| 102 | * SDNR |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 103 | 11. Payload required by actor to perform an action |
Krysiak Adam | 3122f72 | 2019-06-21 11:36:01 +0200 | [diff] [blame] | 104 | 12. Set of fields describing child/parend policies dependency. |
| 105 | E.g. when health-check receives timeout failure restart could be called. |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 106 | 13. Set of fields specifying resource. On this resource Operational Policy should perform an action |
| 107 | 14. Checkbox enabling/disabling guard policy for this operational policy |
| 108 | 15. Guard Policy type (frequency limited or min max) |
| 109 | 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>`_. |
| 110 | |
| 111 | |
| 112 | Micro-service policy properties |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 113 | ------------------------------- |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 114 | Boxes between `VES` and `OperationalPolicy` are generated from blueprint. They can be one of ONAP predefined analytic microservices or custom analytics. |
| 115 | Each of the boxes is clickable. Microservice configuration view is generated using Policy Type assigned to selected microservice. |
| 116 | Clamp by default assumes that microservices have policy type **onap.policies.monitoring.cdap.tca.hi.lo.app**. |
| 117 | |
| 118 | After clicking microservice box Clamp opens popup dialog. Example popup dialog for microservice with default type looks like: |
| 119 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 120 | |clamp-config-policy-tca1| |
| 121 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 122 | |clamp-config-policy-tca2| |
| 123 | |
| 124 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 125 | Saving Control loop |
| 126 | ------------------- |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 127 | Policies are saved localy in Clamp after each configuration change |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 128 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 129 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 130 | Submitting the Control loop to policy |
| 131 | ------------------------------------- |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 132 | 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] | 133 | |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 134 | |
| 135 | |clamp-submit-cl| |
| 136 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 137 | 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] | 138 | |
| 139 | |clamp-distributed| |
| 140 | |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 141 | After Policies are submitted they should be visible in Policy PAP component. |
| 142 | Please check `Policy GUI <https://docs.onap.org/en/dublin/submodules/policy/engine.git/docs/platform/policygui.html>`_ |
| 143 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 144 | Deploy/undeploy the Control Loop to DCAE |
| 145 | ----------------------------------------- |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 146 | Once sent to policy engine, Clamp can ask to DCAE to deploy the micro service |
| 147 | |
| 148 | |clamp-deploy| |
| 149 | |
| 150 | This opens a window where the parameters of the DCAE micro service can be configured/tuned. |
| 151 | The policy_id is automatically generated by Clamp in the previous steps. |
| 152 | |
| 153 | |clamp-deploy-params| |
| 154 | |
osgn422w | 17f8fc6 | 2019-05-29 19:26:49 +0200 | [diff] [blame] | 155 | Once 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) |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 156 | |
| 157 | |clamp-undeploy| |
| 158 | |
| 159 | .. |clamp-open-menu| image:: images/user-guide/open-menu.png |
| 160 | .. |clamp-open-box| image:: images/user-guide/open-box.png |
| 161 | .. |clamp-opened-closed-loop| image:: images/user-guide/opened-closed-loop.png |
| 162 | .. |clamp-menu-prop| image:: images/user-guide/open-menu-prop.png |
| 163 | .. |clamp-prop-box| image:: images/user-guide/prop-box.png |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 164 | .. |clamp-op-policy-box-policy1| image:: images/user-guide/op-policy-box-policy1.png |
| 165 | .. |clamp-config-policy-tca1| image:: images/user-guide/config-policy-tca1.png |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 166 | .. |clamp-config-policy-tca2| image:: images/user-guide/config-policy-tca2.png |
sebdet | 5dea222 | 2019-01-11 13:11:03 +0100 | [diff] [blame] | 167 | .. |clamp-submit-cl| image:: images/user-guide/submit-menu.png |
| 168 | .. |clamp-distributed| image:: images/user-guide/distributed.png |
| 169 | .. |clamp-deploy| image:: images/user-guide/deploy.png |
| 170 | .. |clamp-deploy-params| image:: images/user-guide/deploy-params.png |
Krysiak Adam | d3a57d9 | 2019-05-28 15:35:09 +0200 | [diff] [blame] | 171 | .. |clamp-undeploy| image:: images/user-guide/undeploy.png |
| 172 | .. |blueprint-node| image:: images/user-guide/blueprint_node_type.png |