Update PMSH Frankfurt docs
[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 .. _Installation:
5
6 Installation
7 ============
8
9 In Frankfurt, 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 a service
16 will need to be exposed. As well as this, the following components are required to be running. They can be verified by
17 running the health checks.
18
19     - DCAE Platform
20     - DMaaP
21     - A&AI
22     - AAF
23
24 The 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. The CONSUL
34 service must first be exposed.
35
36 .. code-block:: bash
37
38         kubectl expose svc -n onap consul-server-ui --name=x-consul-server-ui --type=NodePort
39
40 The monitoring policy can then be pushed with the following request, for information on creating a monitoring policy see
41 See :ref:`Subscription configuration<Subscription>`
42
43 .. code-block:: bash
44
45         curl -X PUT http://<k8s-node-ip>:<consul-port>/v1/kv/dcae-pmsh:policy \
46             -H 'Content-Type: application/json' \
47             -d @monitoring-policy.json
48
49 The following JSON is an example monitoring policy.
50
51 .. literalinclude:: resources/monitoring-policy.json
52     :language: json
53
54 To deploy the PMSH microservice using the deployment handler API, the ``serviceTypeId`` is needed, this can be retrieved
55 using the inventory API
56
57 .. code-block:: bash
58
59         curl https://<k8s-node-ip>:<inventory-port>/dcae-service-types
60
61 The ``serviceTypeId`` for the PMSH can be found under typeID. The PMSH can then be deployed.
62
63 .. code-block:: bash
64
65         curl https://<k8s-node-ip>:<dep-handler-port>/dcae-deployments/dcae-pmsh \
66             -H 'Content-Type: application/json' \
67             -d '{
68                 "inputs": (),
69                 "serviceTypeId": "<typeId>"
70             }'