summaryrefslogtreecommitdiffstats
path: root/docs/sections/services/pm-subscription-handler/installation.rst
blob: f858222a9d68b18497f70f34ff46b142a448bf36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.. This work is licensed under a Creative Commons Attribution 4.0 International License.
.. http://creativecommons.org/licenses/by/4.0

.. _Installation:

Installation
============

In Frankfurt, the PMSH can be deployed using the DCAE Dashboard or via CLI. Steps to deploy using CLI will be shown
below.

Deployment Prerequisites
^^^^^^^^^^^^^^^^^^^^^^^^

In order to successfully deploy the PMSH, one will need administrator access to the kubernetes cluster, as a service
will need to be exposed. As well as this, the following components are required to be running. They can be verified by
running the health checks.

    - DCAE Platform
    - DMaaP
    - A&AI
    - AAF

The healthcheck can be run from one of the Kubernetes controllers.

.. code-block:: bash

        ./oom/kubernetes/robot/ete-k8s.sh onap health

Deployment Procedure
^^^^^^^^^^^^^^^^^^^^

To deploy the PMSH in the Frankfurt release, the monitoring policy needs to be pushed directly to CONSUL. The CONSUL
service must first be exposed.

.. code-block:: bash

        kubectl expose svc -n onap consul-server-ui --name=x-consul-server-ui --type=NodePort

The monitoring policy can then be pushed with the following request, for information on creating a monitoring policy see
See :ref:`Subscription configuration<Subscription>`

.. code-block:: bash

        curl -X PUT http://<k8s-node-ip>:<consul-port>/v1/kv/dcae-pmsh:policy \
            -H 'Content-Type: application/json' \
            -d @monitoring-policy.json

The following JSON is an example monitoring policy.

.. literalinclude:: resources/monitoring-policy.json
    :language: json

To deploy the PMSH microservice using the deployment handler API, the ``serviceTypeId`` is needed, this can be retrieved
using the inventory API

.. code-block:: bash

        curl https://<k8s-node-ip>:<inventory-port>/dcae-service-types

The ``serviceTypeId`` for the PMSH can be found under typeID. The PMSH can then be deployed.

.. code-block:: bash

        curl https://<k8s-node-ip>:<dep-handler-port>/dcae-deployments/dcae-pmsh \
            -H 'Content-Type: application/json' \
            -d '{
                "inputs": (),
                "serviceTypeId": "<typeId>"
            }'