Installation

In Guilin, 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 the following procedure will be run from the dcae-bootstrap pod. 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 robot healthcheck can be run from one of the Kubernetes controllers.

./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. To begin, kubectl exec on to the dcae-bootstrap pod and move to the /tmp directory.

kubectl exec -itn <onap-namespace> onap-dcae-bootstrap bash

For information on creating a monitoring policy see Subscription configuration.

The following JSON is an example monitoring policy.

{
   "subscription":{
      "subscriptionName":"subscriptiona",
      "administrativeState":"UNLOCKED",
      "fileBasedGP":15,
      "fileLocation":"/pm/pm.xml",
      "nfFilter":{
         "nfNames":[
            "^pnf1.*"
         ],
         "modelInvariantIDs":[
            "5845y423-g654-6fju-po78-8n53154532k6",
            "7129e420-d396-4efb-af02-6b83499b12f8"
         ],
         "modelVersionIDs":[
            "e80a6ae3-cafd-4d24-850d-e14c084a5ca9"
         ]
      },
      "measurementGroups":[
         {
            "measurementGroup":{
               "measurementTypes":[
                  {
                     "measurementType":"countera"
                  },
                  {
                     "measurementType":"counterb"
                  }
               ],
               "managedObjectDNsBasic":[
                  {
                     "DN":"dna"
                  },
                  {
                     "DN":"dnb"
                  }
               ]
            }
         },
         {
            "measurementGroup":{
               "measurementTypes":[
                  {
                     "measurementType":"counterc"
                  },
                  {
                     "measurementType":"counterd"
                  }
               ],
               "managedObjectDNsBasic":[
                  {
                     "DN":"dnc"
                  },
                  {
                     "DN":"dnd"
                  }
               ]
            }
         }
      ]
   }
}

The monitoring-policy.json can then be PUT with the following curl request.

curl -X PUT http://consul:8500/v1/kv/dcae-pmsh:policy \
    -H 'Content-Type: application/json' \
    -d @monitoring-policy.json

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

curl -k https://inventory:8080/dcae-service-types \
    | grep k8s-pmsh | jq '.items[] | select(.typeName == "k8s-pmsh") | .typeId'

Finally, deploy the PMSH via dcae deployment handler.

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