Merge "[SLICEMS] Docs for SliceMS Kohn"
[dcaegen2.git] / docs / sections / services / son-handler / installation.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:
4
5
6 Installation
7 ============
8
9 SON handler microservice can be deployed using cloudify blueprint using bootstrap container of an existing DCAE deployment
10
11 Deployment Prerequisites
12 ~~~~~~~~~~~~~~~~~~~~~~~~
13
14 - SON-Handler service requires DMAAP and Policy components to be functional.
15
16 - SON-hadler service requires  the following dmaap topics to be present in the running DMAAP instance :
17
18         1.PCI-NOTIF-TOPIC-NGHBR-LIST-CHANGE-INFO
19
20         2.unauthenticated.SEC_FAULT_OUTPUT
21
22         3.unauthenticated.SEC_MEASUREMENT_OUTPUT
23
24         4.DCAE_CL_RSP
25
26 - Policy model required for SON-handler service should be created and pushed to policy component. Steps for creating and pushing the policy model:
27     
28         1.Login to PDP container and execute
29         
30             .. code-block:: bash
31
32                  kubectl exec -ti --namespace onap policy-pdp-0 bash
33             
34         2.Create policy model
35         
36             .. code-block:: bash
37             
38              curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
39               "policyName": "com.PCIMS_CONFIG_POLICY",
40               "configBody": "{ \"PCI_NEIGHBOR_CHANGE_CLUSTER_TIMEOUT_IN_SECS\":60, \"PCI_MODCONFIG_POLICY_NAME\":\"ControlLoop-vPCI-fb41f388-a5f2-11e8-98d0-529269fb1459\", \"PCI_OPTMIZATION_ALGO_CATEGORY_IN_OOF\":\"OOF-PCI-OPTIMIZATION\", \"PCI_SDNR_TARGET_NAME\":\"SDNR\" }",
41               "policyType": "Config", "attributes" : { "matching" : { "key1" : "value1" } },
42               "policyConfigType": "Base",
43               "onapName": "DCAE",
44               "configName": "PCIMS_CONFIG_POLICY",
45               "configBodyType": "JSON" }' 'https://pdp:8081/pdp/api/createPolicy'
46
47         3.Push policy model
48         
49             .. code-block:: bash
50             
51                curl -k -v --silent -X PUT --header 'Content-Type: application/json' --header 'Accept: text/plain' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{
52               "policyName": "com.PCIMS_CONFIG_POLICY",
53               "policyType": "Base"}' 'https://pdp:8081/pdp/api/pushPolicy'
54
55         4.Verify config policy is present
56
57             .. code-block:: bash
58         
59                  curl -k -v --silent -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'ClientAuth: cHl0aG9uOnRlc3Q=' --header 'Authorization: Basic dGVzdHBkcDphbHBoYTEyMw==' --header 'Environment: TEST' -d '{ "configName": "PCIMS_CONFIG_POLICY",    "policyName": "com.Config_PCIMS_CONFIG_POLICY1*",    "requestID":"e65cc45a-9efb-11e8-98d0-529269ffa459"  }' 'https://pdp:8081/pdp/api/getConfig' 
60
61 Deployment steps
62 ~~~~~~~~~~~~~~~~
63 1.Using DCAE Dashboard
64  - Login to DCAE Dashboard (https://{k8s-nodeip}:30418/ccsdk-app/login_external.htm)
65  - Go to Inventory --> Blueprints
66  - Click on Deploy Action for son-handler blueprint
67  - Override the value of 'tag_version' to 'nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.son-handler:2.1.5' and click deploy.
68  - Deployment logs can be viewed under Deployments section 
69
70 2.Using cloudify commands 
71
72 - Login to the bootstrap container
73         kubectl exec -ti --namespace onap <bootstrap pod name> bash
74 - The blueprint can be found under dcaegen2 blueprint repo and is part of bootstrap container. (https://gerrit.onap.org/r/dcaegen2/platform/blueprints)
75 - Deploy the microservice into the cloudify using the following command
76         cfy install -d sonhms -b sonhms <blueprint file path>
77 - Deployment status of the microservice can be found from kubernetes pods status (MS will be deployed as a k8s pod in the kubernetes environment under the same namespace as the DCAE environment).
78         kubectl get pods --namespace onap
79 - To uninstall the microservice
80         cfy uninstall sonhms
81 - To delete the blueprint from the cloudify instance
82         cfy blueprints delete sonhms
83
84
85 Application Configurations
86 --------------------------
87 +-------------------------------+------------------------------------------------+
88 |Configuration                  | Description                                    |
89 +===============================+================================================+
90 |Streams_subscribes             | Dmaap topics that the MS will consume messages |
91 +-------------------------------+------------------------------------------------+
92 |Streams_publishes              | Dmaap topics that the MS will publish messages |
93 +-------------------------------+------------------------------------------------+
94 |postgres.host                  | Host where the postgres database is running    |
95 +-------------------------------+------------------------------------------------+
96 |postgres.port                  | Host where the postgres database is running    |
97 +-------------------------------+------------------------------------------------+
98 |postgres.username              | Postgres username                              |
99 +-------------------------------+------------------------------------------------+
100 |postgres.password              | Postgres password                              |
101 +-------------------------------+------------------------------------------------+
102 |sonhandler.pollingInterval     | Polling Interval for consuming dmaap messages  |
103 +-------------------------------+------------------------------------------------+
104 |sonhandler.pollingTimeout      | Polling timeout for consuming dmaap messages   |
105 +-------------------------------+------------------------------------------------+
106 |sonhandler.numSolutions        | Number for solutions for OOF optimization      |
107 +-------------------------------+------------------------------------------------+
108 |sonhandler.minCollision        | Minimum collision criteria to trigger OOF      |
109 +-------------------------------+------------------------------------------------+
110 |sonhandler.minConfusion        | Minimum confusion criteria to trigger OOF      |
111 +-------------------------------+------------------------------------------------+
112 |sonhandler.maximumClusters     | Maximum number of clusters MS can process      |
113 +-------------------------------+------------------------------------------------+
114 |sonhandler.badThreshold        | Bad threshold for Handover success rate        |
115 +-------------------------------+------------------------------------------------+
116 |sonhandler.poorThreshold       | Poor threshold for Handover success rate       |
117 +-------------------------------+------------------------------------------------+
118 |sonhandler.namespace           | Namespace where MS is going to be deployed     |
119 +-------------------------------+------------------------------------------------+
120 |sonhandler.sourceId            | Source ID of the Microservice (to OOF)         |
121 +-------------------------------+------------------------------------------------+
122 |sonhandler.dmaap.server        | Location of message routers                    |
123 +-------------------------------+------------------------------------------------+
124 |sonhandler.bufferTime          | Buffer time for MS to wait for notifications   |
125 +-------------------------------+------------------------------------------------+
126 |sonhandler.cg                  | DMAAP Consumer group for subscription          |
127 +-------------------------------+------------------------------------------------+
128 |sonhandler.cid                 | DMAAP Consumer id for subcription              |
129 +-------------------------------+------------------------------------------------+
130 |sonhandler.configDbService     | Location of config DB (protocol, host & port)  |
131 +-------------------------------+------------------------------------------------+
132 |sonhandler.oof.service         | Location of OOF (protocol, host & port)        |
133 +-------------------------------+------------------------------------------------+
134 |sonhandler.optimizers          | Optimizer to trigger in OOF                    |
135 +-------------------------------+------------------------------------------------+
136 |sonhandler.poorCountThreshold  | Threshold for number of times poorThreshold    |
137 |                               | can be recorded for the cell                   |
138 +-------------------------------+------------------------------------------------+
139 |sonhandler.badCountThreshold   | Threshold for number of times badThreshold can |
140 |                               | be recorded for the cell                       |
141 +-------------------------------+------------------------------------------------+
142 |sonhandler.                    | Timer for oof triggered count in minutes       |
143 |oofTriggerCountTimer           |                                                |
144 +-------------------------------+------------------------------------------------+
145 |sonhandler.policyRespTimer     | Timer to wait for notification from policy     |
146 +-------------------------------+------------------------------------------------+
147 |sonhandler.                    | Maximum number of negative acknowledgements    |
148 |policyNegativeAckThreshold     | from policy for a given cell                   |
149 +-------------------------------+------------------------------------------------+
150 |sonhandler.                    | Time interval to trigger OOF with fixed pci    |
151 |policyFixedPciTimeInterval     | cells                                          |
152 +-------------------------------+------------------------------------------------+
153 |sonhandler.nfNamingCode        | Parameter to filter FM and PM notifications    |
154 |                               | coming from ves                                |
155 +-------------------------------+------------------------------------------------+
156