Merge "Add Helm installation guide for son-handler"
[dcaegen2.git] / docs / sections / services / pm-subscription-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
4 .. _pmsh-installation:
5
6 Installation
7 ============
8
9 In Guilin, the PMSH can be deployed using the DCAE Dashboard or via CLI. Steps to deploy using CLI will be shown
10 below.
11
12 Deployment Prerequisites
13 ^^^^^^^^^^^^^^^^^^^^^^^^
14
15 In order to successfully deploy the PMSH, one will need administrator access to the kubernetes cluster, as the following
16 procedure will be run from the dcae-bootstrap pod.
17 As well as this, the following components are required to be running. They can be verified by running the health checks.
18
19     - DCAE Platform
20     - DMaaP
21     - A&AI
22     - AAF
23
24 The robot healthcheck can be run from one of the Kubernetes controllers.
25
26 .. code-block:: bash
27
28         ./oom/kubernetes/robot/ete-k8s.sh onap health
29
30 Deployment Procedure
31 ^^^^^^^^^^^^^^^^^^^^
32
33 To deploy the PMSH in the Frankfurt release, the monitoring policy needs to be pushed directly to CONSUL.
34 To begin, kubectl exec on to the dcae-bootstrap pod and move to the /tmp directory.
35
36 .. code-block:: bash
37
38         kubectl exec -itn <onap-namespace> onap-dcae-bootstrap bash
39
40 For information on creating a monitoring policy see :ref:`Subscription configuration<Subscription>`.
41
42 The following JSON is an example monitoring policy.
43
44 .. literalinclude:: resources/monitoring-policy.json
45     :language: json
46
47 The monitoring-policy.json can then be PUT with the following curl request.
48
49 .. code-block:: bash
50
51         curl -X PUT http://consul:8500/v1/kv/dcae-pmsh:policy \
52             -H 'Content-Type: application/json' \
53             -d @monitoring-policy.json
54
55 To deploy the PMSH microservice using the deployment handler API, the ``serviceTypeId`` is needed. This can be retrieved
56 using the inventory API.
57
58 .. code-block:: bash
59
60         curl -k https://inventory:8080/dcae-service-types \
61             | grep k8s-pmsh | jq '.items[] | select(.typeName == "k8s-pmsh") | .typeId'
62
63 Finally, deploy the PMSH via dcae deployment handler.
64
65 .. code-block:: bash
66
67         curl -k https://deployment-handler:8443/dcae-deployments/dcae-pmsh \
68             -H 'Content-Type: application/json' \
69             -d '{
70                 "inputs": (),
71                 "serviceTypeId": "<k8s-pmsh-typeId>"
72             }'