Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Overview

PmPM-mapper Mapper provides ONAP Operators with the ability to define flexible, customizable Performance events. VES Events are generated from PM XML Files and are targeted for analytics applications in ONAP.

...

  1. Execute bash on the Cloudify manager Kubernetes pod. 

    Code Block
    languagebash
    kubectl -n onap exec -it <dev-dcaegen2-dcae-cloudify-manager> bash


  2. Download the pm-mapper blueprint.

  3. Create an inputs file (see the configuration section for more information).
  4. Run the Cloudify Install command to install the pm-mapper with the recently downloaded blueprints, and the newly created inputs files.

    Code Block
    languagebash
    cfy install --blueprint-id pm-mapper --deployment-id pm-mapper -i inputs.yaml <pm-mapper-blueprint-path>


    Expand
    titleSample output
    $ cfy install k8s-pm-mapper.yaml --blueprint-id pm-mapper --deployment-id pm-mapper

    Uploading blueprint k8s-pm-mapper.yaml...
    k8s-pm-mapper.yaml |###################################################| 100.0%
    Blueprint uploaded. The blueprint's id is pm-mapper
    Creating new deployment from blueprint pm-mapper...
    Deployment created. The deployment's id is pm-mapper
    Executing workflow install on deployment pm-mapper [timeout=900 seconds]
    Deployment environment creation is pending...
    2019-04-11 16:00:37.497 CFY <pm-mapper> Starting 'create_deployment_environment' workflow execution
    2019-04-11 16:00:38.692 CFY <pm-mapper> Installing deployment plugins
    2019-04-11 16:00:38.692 CFY <pm-mapper> [,] Sending task 'cloudify_agent.operations.install_plugins'
    2019-04-11 16:00:38.692 CFY <pm-mapper> [,] Task started 'cloudify_agent.operations.install_plugins'
    2019-04-11 16:00:38.354 LOG <pm-mapper> [,] INFO: Installing plugin: k8s
    2019-04-11 16:00:39.654 LOG <pm-mapper> [,] INFO: Using existing installation of managed plugin: 29023340-17d9-4737-886a-abba002334cd [package_name: k8splugin, package_version: 1.4.5, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
    2019-04-11 16:00:39.810 CFY <pm-mapper> [,] Task succeeded 'cloudify_agent.operations.install_plugins'
    2019-04-11 16:00:40.717 CFY <pm-mapper> Skipping starting deployment policy engine core - no policies defined
    2019-04-11 16:00:41.725 CFY <pm-mapper> Creating deployment work directory
    2019-04-11 16:00:41.725 CFY <pm-mapper> 'create_deployment_environment' workflow execution succeeded
    2019-04-11 16:00:45.447 CFY <pm-mapper> Starting 'install' workflow execution
    2019-04-11 16:00:46.733 CFY <pm-mapper> [pm-mapper_twszsn] Creating node
    2019-04-11 16:00:46.733 CFY <pm-mapper> [pm-mapper_twszsn.create] Sending task 'k8splugin.create_for_platforms'
    2019-04-11 16:00:46.733 CFY <pm-mapper> [pm-mapper_twszsn.create] Task started 'k8splugin.create_for_platforms'
    2019-04-11 16:00:47.563 LOG <pm-mapper> [pm-mapper_twszsn.create] INFO: Added config for dcae-pm-mapper
    2019-04-11 16:00:48.675 LOG <pm-mapper> [pm-mapper_twszsn.create] INFO: Done setting up: dcae-pm-mapper
    2019-04-11 16:00:48.470 CFY <pm-mapper> [pm-mapper_twszsn.create] Task succeeded 'k8splugin.create_for_platforms'
    2019-04-11 16:00:48.745 CFY <pm-mapper> [pm-mapper_twszsn] Configuring node
    2019-04-11 16:00:49.759 CFY <pm-mapper> [pm-mapper_twszsn] Starting node
    2019-04-11 16:00:49.759 CFY <pm-mapper> [pm-mapper_twszsn.start] Sending task 'k8splugin.create_and_start_container_for_platforms'
    2019-04-11 16:00:49.759 CFY <pm-mapper> [pm-mapper_twszsn.start] Task started 'k8splugin.create_and_start_container_for_platforms'
    2019-04-11 16:00:51.693 LOG <pm-mapper> [pm-mapper_twszsn.start] INFO: Passing k8sconfig: {'tls': {u'cert_path': u'/opt/tls/shared', u'image': u'nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:1.0.1-STAGING-latest'}, 'consul_host': 'consul-server:8500', 'consul_dns_name': u'consul-server.onap', 'image_pull_secrets': [u'onap-docker-registry-key'], 'namespace': u'onap', 'filebeat': {u'config_map': u'dcae-filebeat-configmap', u'config_path': u'/usr/share/filebeat/filebeat.yml', u'log_path': u'/var/log/onap', u'image': u'docker.elastic.co/beats/filebeat:5.5.0', u'data_path': u'/usr/share/filebeat/data', u'config_subpath': u'filebeat.yml'}}
    2019-04-11 16:00:51.339 LOG <pm-mapper> [pm-mapper_twszsn.start] INFO: Starting k8s deployment for dcae-pm-mapper, image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.pm-mapper:1.0.0, env: {'CONSUL_HOST': u'consul-server.onap', 'CONFIG_BINDING_SERVICE': 'config-binding-service'}, kwargs: {'tls_info': {}, 'replicas': 1, 'labels': {'cfydeployment': u'pm-mapper', 'cfynodeinstance': u'pm-mapper_twszsn', 'cfynode': u'pm-mapper'}, 'ctx': <cloudify.context.CloudifyContext object at 0x7f5fb5bb7710>, 'always_pull_image': False, u'ports': [u'6162:0']}
    2019-04-11 16:00:52.705 LOG <pm-mapper> [pm-mapper_twszsn.start] INFO: k8s deployment initiated successfully for dcae-pm-mapper: {'services': ['dcae-pm-mapper'], 'namespace': u'onap', 'deployment': 'dep-dcae-pm-mapper'}
    2019-04-11 16:00:52.705 LOG <pm-mapper> [pm-mapper_twszsn.start] INFO: Waiting up to 300 secs for dcae-pm-mapper to become ready
    2019-04-11 16:02:18.873 LOG <pm-mapper> [pm-mapper_twszsn.start] INFO: k8s deployment ready for: dcae-pm-mapper
    2019-04-11 16:02:19.621 CFY <pm-mapper> [pm-mapper_twszsn.start] Task succeeded 'k8splugin.create_and_start_container_for_platforms'
    2019-04-11 16:02:20.893 CFY <pm-mapper> 'install' workflow execution succeeded
    Finished executing workflow install on deployment pm-mapper
    * Run 'cfy events list -e 37da3f5f-a06b-4ce8-84d3-8b64ccd81c33' to retrieve the execution's events/logs

    Expand
    titleInstall with custom inputs
    Code Block
    languagebash
    cfy install k8s-pm-mapper.yaml -i inputs.yaml --blueprint-id pm-mapper --deployment-id pm-mapper

    The contents of inputs.yaml is any k,v configuration under node_templates → pm-mapper→ properties of the pm-mapper blueprint.

    Code Block
    languageyml
    titleSample inputs.yaml
    pm-mapper-filter: []
    enable_http: false
    More information on Filter


...

Configuration

Configuration of the service consists of generating an inputs file which will be used as part of the Cloudify install. The PM-Mapper blueprints were designed with sane defaults for the majority of the fields.
Below you will find some examples of fields which can be configured, and some of the fields which must be configured.

In the Dublin release information about the AAF user must be provided to enable publishing to authenticated topics. An Inputs file with this information included can look like:

Code Block
aaf_username: dcae@dcae.onap.org
aaf_password: <dcae_password>

where <dcae_password> is replaced with a real value.


By default, the PM-Mapper will only allow inbound queries over HTTPS, however its possible to configure it to enable HTTP also. This configuration can look like:

Code Block
enable_http: true


The default behavior of the PM-Mapper is to map all measType in the received PM XML files, however, it's possible to provide filtering configuration which will reduce the VES event to the counters that the designer has expressed interest in. An example of this configuration:

Code Block
pm-mapper-filter: {"filters":[{"pmDefVsn":"targetVersion","nfType":"targetNodeType","vendor":"targetVendor","measTypes":["targetMeasType"]}]}

In this provided example a VES event containing the "targetMeasType" will only be generated and published if the following conditions are true:

  • The type of the node sending the file is "targetNodeType"
  • The vendor of the node sending the file is "targetVendor"

More information on Filter Configuration


...

Validation

  1. curl <dcaegen2-dcae-healthcheck> and check if pm-mapper is in 'ready' state. 

    Expand
    titleSee example
    $ curl 10.42.181.66 | jq

    {
    "type": "summary",
    "count": 12,
    "ready": 11,
    "items": [
    {
    "name": "dev-dcaegen2-dcae-pm-mapper",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dev-dcaegen2-dcae-config-binding-service",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dev-dcaegen2-dcae-inventory-api",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dev-dcaegen2-dcae-servicechange-handler",
    "ready": 0,
    "unavailable": 1
    },
    {
    "name": "dev-dcaegen2-dcae-deployment-handler",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dev-dcaegen2-dcae-policy-handler",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dep-dcae-ves-collector",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dep-dcae-tca-analytics",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dep-dcae-prh",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dep-dcae-hv-ves-collector",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dep-dcae-datafile-collector",
    "ready": 1,
    "unavailable": 0
    },
    {
    "name": "dep-dcae-snmptrap-collector",
    "ready": 1,
    "unavailable": 0
    }
    ]
    }


...