clean up some sphinx warnings
[dcaegen2.git] / docs / sections / services / son-handler / installation-helm.rst
1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. _sonhandler-installation-helm:
4
5
6 Helm Installation
7 =================
8
9 SON handler microservice can be deployed using helm charts in oom repository.
10
11
12 Deployment Prerequisites
13 ~~~~~~~~~~~~~~~~~~~~~~~~
14
15 - SON-Handler service requires config-binding-service, policy, dmaap and aaf componenets to be running.
16
17 - The following topics must be created in dmaap:
18
19              .. code-block:: bash
20
21                  curl --header "Content-type: application/json" --request POST --data '{"topicName": "DCAE_CL_RSP"}' http://<DMAAP_IP>:3904/events/DCAE_CL_RSP
22                  curl --header "Content-type: application/json" --request POST --data '{"topicName": "unauthenticated.SEC_FAULT_OUTPUT"}' http://<DMAAP_IP>:3904/events/unauthenticated.SEC_FAULT_OUTPUT
23                  curl --header "Content-type: application/json" --request POST --data '{"topicName": "unauthenticated.VES_MEASUREMENT_OUTPUT"}' http://<DMAAP_IP>:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT
24                  curl --header "Content-type: application/json" --request POST --data '{"topicName": "unauthenticated.DCAE_CL_OUTPUT"}' http://<DMAAP_IP>:3904/events/unauthenticated.DCAE_CL_OUTPUT
25
26
27
28 - Policies required for SON-handler service should be created and pushed to the policy component. Steps for creating and pushing policy models:
29
30      1.Login to policy-drools-pdp-0 container
31
32              .. code-block:: bash
33
34                kubectl exec -ti --namespace <namespace> policy-pdp-0 bash
35
36
37      2. Create Modify Config policy:
38
39              .. code-block:: bash
40
41                curl -k --silent --user 'healthcheck:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"tosca_definitions_version":"tosca_simple_yaml_1_1_0","topology_template":{"policies":[{"operational.pcihandler":{"type":"onap.policies.controlloop.operational.common.Drools","type_version":"1.0.0","name":"operational.pcihandler","version":"1.0.0","metadata":{"policy-id":"operational.pcihandler"},"properties":{"controllerName":"usecases","id":"ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459","timeout":900,"abatement":false,"trigger":"unique-policy-id-123-modifyconfig","operations":[{"id":"unique-policy-id-123-modifyconfig","description":"Modify the packet generator","operation":{"actor":"SDNR","operation":"ModifyConfig","target":{"targetType":"PNF"}},"timeout":300,"retries":0,"success":"final_success","failure":"final_failure","failure_timeout":"final_failure_timeout","failure_retries":"final_failure_retries","failure_exception":"final_failure_exception","failure_guard":"final_failure_guard"}]}}}]}}'
42
43      3. Push Modify Config policy:
44
45             .. code-block:: bash
46
47                 curl --silent -k --user 'healthcheck:zb!XztG34' -X POST "https://policy-pap:6969/policy/pap/v1/pdps/policies" -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"policies":[{"policy-id":"operational.pcihandler","policy-version":1}]}'
48
49
50      4. Create Modify Config ANR policy:
51
52              .. code-block:: bash
53
54                curl -k --silent --user 'healthcheck:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"tosca_definitions_version":"tosca_simple_yaml_1_1_0","topology_template":{"policies":[{"operational.sonhandler":{"type":"onap.policies.controlloop.operational.common.Drools","type_version":"1.0.0","name":"operational.sonhandler","version":"1.0.0","metadata":{"policy-id":"operational.sonhandler"},"properties":{"controllerName":"usecases","id":"ControlLoop-vSONH-7d4baf04-8875-4d1f-946d-06b874048b61","timeout":900,"abatement":false,"trigger":"unique-policy-id-123-modifyconfig","operations":[{"id":"unique-policy-id-123-modifyconfig","description":"Modify the packet generator","operation":{"actor":"SDNR","operation":"ModifyConfigANR","target":{"targetType":"PNF"}},"timeout":300,"retries":0,"success":"final_success","failure":"final_failure","failure_timeout":"final_failure_timeout","failure_retries":"final_failure_retries","failure_exception":"final_failure_exception","failure_guard":"final_failure_guard"}]}}}]}}'
55
56
57
58      6. Push Modify Config ANR policy:
59
60            .. code-block:: bash
61
62              curl --silent -k --user 'healthcheck:zb!XztG34' -X POST "https://policy-pap:6969/policy/pap/v1/pdps/policies" -H "Accept: application/json" -H "Content-Type: application/json" '{"policies":[{"policy-id":"operational.sonhandler","policy-version":1}]}'
63
64
65      7. Create policy type:
66
67              .. code-block:: bash
68
69                 curl -k --silent --user 'healthcheck:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes" -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"policy_types":{"onap.policies.monitoring.docker.sonhandler.app":{"derived_from":"onap.policies.Monitoring:1.0.0","description":"son handler policy type","properties":{"PCI_MODCONFIGANR_POLICY_NAME":{"required":true,"type":"string"},"PCI_MODCONFIG_POLICY_NAME":{"required":true,"type":"string"},"PCI_NEIGHBOR_CHANGE_CLUSTER_TIMEOUT_IN_SECS":{"required":true,"type":"string"},"PCI_OPTMIZATION_ALGO_CATEGORY_IN_OOF":{"required":true,"type":"string"},"PCI_SDNR_TARGET_NAME":{"required":true,"type":"string"}},"version":"1.0.0"}},"tosca_definitions_version":"tosca_simple_yaml_1_1_0"}'
70
71
72      8. Create monitoring policy:
73
74              .. code-block:: bash
75
76                curl -k --silent --user 'healthcheck:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.monitoring.docker.sonhandler.app/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"name":"ToscaServiceTemplateSimple","topology_template":{"policies":[{"com.Config_PCIMS_CONFIG_POLICY":{"metadata":{"policy-id":"com.Config_PCIMS_CONFIG_POLICY","policy-version":"1"},"name":"com.Config_PCIMS_CONFIG_POLICY","properties":{"PCI_MODCONFIGANR_POLICY_NAME":"ControlLoop-vSONH-7d4baf04-8875-4d1f-946d-06b874048b61","PCI_MODCONFIG_POLICY_NAME":"ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459","PCI_NEIGHBOR_CHANGE_CLUSTER_TIMEOUT_IN_SECS":60,"PCI_OPTMIZATION_ALGO_CATEGORY_IN_OOF":"OOF-PCI-OPTIMIZATION","PCI_SDNR_TARGET_NAME":"SDNR"},"type":"onap.policies.monitoring.docker.sonhandler.app","type_version":"1.0.0","version":"1.0.0"}}]},"tosca_definitions_version":"tosca_simple_yaml_1_1_0","version":"1.0.0"}'
77
78      9. Push monitoring policy:
79
80              .. code-block:: bash
81
82                curl --silent -k --user 'healthcheck:zb!XztG34' -X POST "https://policy-pap:6969/policy/pap/v1/pdps/policies" -H "Accept: application/json" -H "Content-Type: application/json" --data-raw '{"policies":[{"policy-id":"com.Config_PCIMS_CONFIG_POLICY","policy-version":1}]}'
83
84 Deployment Steps
85 ~~~~~~~~~~~~~~~~
86
87 - Default app config values can be updated in oom/kubernetes/dcaegen2-services/components/dcae-son-handler/values.yaml
88
89 - Update monitoring policy ID in below configuration which is used to enable Policy-Sync Side car container to be deployed and retrieves active policy configuration.
90
91   .. code-block:: yaml
92
93     dcaePolicySyncImage: onap/org.onap.dcaegen2.deployments.dcae-services-policy-sync:1.0.1
94     policies:
95       policyID: |
96        '["com.Config_PCIMS_CONFIG_POLICY"]'
97
98 - Update Config db IP address:
99
100   .. code-block:: yaml
101
102     sonhandler.configDb.service: http://<configDB-IPAddress>:8080
103
104 - Enable sonhandler component in oom/kubernetes/dcaegen2-services/values.yaml
105
106   .. code-block:: yaml
107
108     dcae-son-handler:
109         enabled: true
110
111 - Make the chart and deploy using the following command:
112
113   .. code-block:: bash
114
115     cd oom/kubernetes/
116     make dcaegen2-services
117     helm install dev-dcaegen2-services dcaegen2-services --namespace <namespace> --set global.masterPassword=<password>
118
119 - To deploy only son-handler:
120
121   .. code-block:: bash
122
123     helm install dev-son-handler dcaegen2-services/components/dcae-son-handler --namespace <namespace> --set global.masterPassword=<password>
124
125 - To uninstall:
126
127   .. code-block:: bash
128
129     helm uninstall dev-son-handler
130
131
132
133 Application Configurations
134 --------------------------
135 +-------------------------------+------------------------------------------------+
136 |Configuration                  | Description                                    |
137 +===============================+================================================+
138 |streams_subscribes             | Dmaap topics that the MS will consume messages |
139 +-------------------------------+------------------------------------------------+
140 |streams_publishes              | Dmaap topics that the MS will publish messages |
141 +-------------------------------+------------------------------------------------+
142 |postgres.host                  | Host where the postgres database is running    |
143 +-------------------------------+------------------------------------------------+
144 |postgres.port                  | Host where the postgres database is running    |
145 +-------------------------------+------------------------------------------------+
146 |postgres.username              | Postgres username                              |
147 +-------------------------------+------------------------------------------------+
148 |postgres.password              | Postgres password                              |
149 +-------------------------------+------------------------------------------------+
150 |sonhandler.pollingInterval     | Polling Interval for consuming dmaap messages  |
151 +-------------------------------+------------------------------------------------+
152 |sonhandler.pollingTimeout      | Polling timeout for consuming dmaap messages   |
153 +-------------------------------+------------------------------------------------+
154 |sonhandler.numSolutions        | Number for solutions for OOF optimization      |
155 +-------------------------------+------------------------------------------------+
156 |sonhandler.minCollision        | Minimum collision criteria to trigger OOF      |
157 +-------------------------------+------------------------------------------------+
158 |sonhandler.minConfusion        | Minimum confusion criteria to trigger OOF      |
159 +-------------------------------+------------------------------------------------+
160 |sonhandler.maximumClusters     | Maximum number of clusters MS can process      |
161 +-------------------------------+------------------------------------------------+
162 |sonhandler.badThreshold        | Bad threshold for Handover success rate        |
163 +-------------------------------+------------------------------------------------+
164 |sonhandler.poorThreshold       | Poor threshold for Handover success rate       |
165 +-------------------------------+------------------------------------------------+
166 |sonhandler.namespace           | Namespace where MS is going to be deployed     |
167 +-------------------------------+------------------------------------------------+
168 |sonhandler.namespace           | Namespace where MS is going to be deployed     |
169 +-------------------------------+------------------------------------------------+
170 |sonhandler.namespace           | Namespace where MS is going to be deployed     |
171 +-------------------------------+------------------------------------------------+
172 |sonhandler.sourceId            | Source ID of the Microservice (to OOF)         |
173 +-------------------------------+------------------------------------------------+
174 |sonhandler.dmaap.server        | Location of message routers                    |
175 +-------------------------------+------------------------------------------------+
176 |sonhandler.bufferTime          | Buffer time for MS to wait for notifications   |
177 +-------------------------------+------------------------------------------------+
178 |sonhandler.cg                  | DMAAP Consumer group for subscription          |
179 +-------------------------------+------------------------------------------------+
180 |sonhandler.cid                 | DMAAP Consumer id for subcription              |
181 +-------------------------------+------------------------------------------------+
182 |sonhandler.configDbService     | Location of config DB (protocol, host & port)  |
183 +-------------------------------+------------------------------------------------+
184 |sonhandler.oof.service         | Location of OOF (protocol, host & port)        |
185 +-------------------------------+------------------------------------------------+
186 |sonhandler.optimizers          | Optimizer to trigger in OOF                    |
187 +-------------------------------+------------------------------------------------+
188 |sonhandler.poorCountThreshold  | Threshold for number of times poorThreshold    |
189 |                               | can be recorded for the cell                   |
190 +-------------------------------+------------------------------------------------+
191 |sonhandler.badCountThreshold   | Threshold for number of times badThreshold can |
192 |                               | be recorded for the cell                       |
193 +-------------------------------+------------------------------------------------+
194 |sonhandler.                    | Timer for oof triggered count in minutes       |
195 |oofTriggerCountTimer           |                                                |
196 +-------------------------------+------------------------------------------------+
197 |sonhandler.policyRespTimer     | Timer to wait for notification from policy     |
198 +-------------------------------+------------------------------------------------+
199 |sonhandler.                    | Maximum number of negative acknowledgements    |
200 |policyNegativeAckThreshold     | from policy for a given cell                   |
201 +-------------------------------+------------------------------------------------+
202 |sonhandler.                    | Time interval to trigger OOF with fixed pci    |
203 |policyFixedPciTimeInterval     | cells                                          |
204 +-------------------------------+------------------------------------------------+
205 |sonhandler.nfNamingCode        | Parameter to filter FM and PM notifications    |
206 |                               | coming from ves                                |
207 +-------------------------------+------------------------------------------------+