Versions Compared

Key

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

Table of Contents
Overview

Deployment Prerequisite/dependencies

  1. DCAE and DMaaP pods should be up and running. 

  2. DMaaP Bus Controller PostInstalls job should have completed successfully (executed as part of an OOM install).
  3. Make sure that cfy is installed and configured to work with the Cloudify deployment.

Deployment Steps

Slice analysis MS consumes PM message from PM-Mapper and analyze the slice PM data and triggers the closed-loop if needed. For analyzing the PM data, it consumes data from Config DB.

The PM data which the slice analysis MS consumes currently are:

SM.PrbUsedDl.snssai

SM.PrbUsedUl.snssai

Image Added

Bulk PM Flow:

  1. NF notifies VES Collector that a PM file is available for upload.
  2. Data File Collector downloads PM Files from the NF and publishes them to Data Router.
  3. PM-Mapper creates custom Performance events (VES) from the PM File data according to PM Mapping File.
  4. Analytics Applications (Slice Analysis MS) use these performance events for targeted analysis of network operations.

Slice Analysis MS Flow:

  1. Slice analysis ms consumes PM messages from PERFORMANCE_MEASUREMENTS topic
  2. For analysis Slice analysis MS consumes various data from Config DB
    1. List of Network Functions which serves the snssai
    2. List of RICs and its corresponding cell mappings of the snssai
    3. Current Configuration of the RICs
    4. Slice Profile of the snssai
    5. Subscriber details of the snssai (for sending the onset message to policy)
  3. With the help of pm data, Slice analysis MS computes the DLThptPerSlice and ULThptPerSlice for the RICs of the snssai, and the computed value is compared with the current configuration of the RICs.
  4. If the change in configuration exceeds the minimum percentage value which is kept as a configuration parameter, then the closed-loop will be triggered by posting the onset message to DMAAP

Architecture

 Image Added

DMAAP Client - creates a thread pool for every DMAAP topic consumer. The thread polls the DMAAP topic for every configured time interval and whenever a message is received it stores that message in the Postgres DB.

PM Thread - reads the PM event from the database and puts the PM sample in the internal queue in the format which is needed for further processing.

Consumer Thread - Consumes pm samples from the internal queue and make all the required Config DB calls, perform the analysis, and puts the onset message to the DMAAP topic

Deployment Prerequisite/dependencies

  1. DCAE and DMaaP pods should be up and running. 

  2. DMaaP Bus Controller PostInstalls job should have completed successfully (executed as part of an OOM install).
  3. PM mapper service should be running.
  4. Config DB service should be running.
  5. Make sure that cfy is installed and configured to work with the Cloudify deployment.

Deployment Steps

  1. Execute bash on the bootstrap Kubernetes pod. 

    Code Block
    languagebash
    themeEmacs
    kubectl -n onap exec -it <dcaegen2-dcae-bootstrap> bash


  2. Go to the /blueprints directory.

  3. Check that the tag_version in the slice-analysis-ms blueprint is correct for the release of ONAP that it is being installed on see Nexus link for slice-analysis-ms for tag_versions
  4. Refer blueprints for sliceanalysis ms: https://gerrit.onap.org/r/gitweb?p=dcaegen2%2Fplatform%2Fblueprints.git;hb=refs%2Fchanges%2F20%2F114120%2F3;f=blueprints%2Fk8s-slice-analysis-ms.yaml
  5. Create an input file.        

    Expand
    titleSample k8s-slice-input.yaml

    tag_version: nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.slice-analysis-ms:1.0.1
    config_db: http://<ip>:<port>
    initialDelaySeconds: 50000

    6. Run the Cloudify install command to install the slice-analysis-ms with the blueprint and the newly created input file k8s-slice-input.yaml.

    Code Block
    languagebash
    themeEmacs
    $ cfy install k8s-slice-analysis-ms.yaml -i  k8s-slice-input.yaml --blueprint-id sliceanalysisms


    Expand
    titleSample output
    $ cfy install k8s-slice-analysis-ms.yaml -i k8s-slice-input.yaml --blueprint-id sliceanalysisms

    /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
    from cryptography.hazmat.backends import default_backend
    Uploading blueprint k8s-slice-analysis-ms.yaml...
    k8s-slice-analysi... |################################################| 100.0%
    Blueprint uploaded. The blueprint's id is sliceanalysisms
    Creating new deployment from blueprint sliceanalysisms...
    Deployment created. The deployment's id is sliceanalysisms
    Executing workflow `install` on deployment `sliceanalysisms` [timeout=900 seconds]
    Deployment environment creation is pending...

  6. Execute bash on the bootstrap Kubernetes pod. 

    Code Block
    languagebash
    themeEmacs
    kubectl -n onap exec -it <dcaegen2-dcae-bootstrap> bash
  7. Go to the /blueprints directory.

  8. Check that the tag_version in the slice-analysis-ms blueprint is correct for the release of ONAP that it is being installed on see Nexus link for slice-analysis-ms for tag_versions
  9. Create an input file (see the configuration section for more information).
  10. Run the Cloudify install command to install the slice-analysis-ms with the blueprint and the newly created input file k8s-slice-input.yaml.

    Code Block
    languagebash
    themeEmacs
    $ cfy install k8s-slice-analysis-ms.yaml -i  k8s-slice-input.yaml --blueprint-id sliceanalysisms
    Expand
    titleSample output
    $ cfy install k8s-slice-analysis-ms.yaml -i k8s-slice-input.yaml --blueprint-id sliceanalysisms

    /usr/lib/python2.7/site-packages/paramiko/transport.py:33: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in a future release.
    from cryptography.hazmat.backends import default_backend
    Uploading blueprint k8s-slice-analysis-ms.yaml...
    k8s-slice-analysi... |################################################| 100.0%
    Blueprint uploaded. The blueprint's id is sliceanalysisms
    Creating new deployment from blueprint sliceanalysisms...
    Deployment created. The deployment's id is sliceanalysisms
    Executing workflow `install` on deployment `sliceanalysisms` [timeout=900 seconds]
    Deployment environment creation is pending...
    2020-10-30 12:54:03.595 CFY <sliceanalysisms> Starting 'create_deployment_environment' workflow execution
    2020-10-30 12:54:03.602 CFY <sliceanalysisms> Installing deployment and workflow plugins
    2020-10-30 12:54:03.701 CFY <sliceanalysisms> Sending task 'cloudify_agent.operations.install_plugins'
    2020-10-30 12:54:03.717 CFY <sliceanalysisms> Task started 'cloudify_agent.operations.install_plugins'
    2020-10-30 12:54:04.770 LOG <sliceanalysisms> INFO: Installing plugin: pgaas
    2020-10-30 12:54:05.691 LOG <sliceanalysisms> INFO: Using existing installation of managed plugin: 7feae746-63c9-4577-b6c4-d6ffdd00cb86 [package_name: pgaas, package_version: 1.3.0, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
    2020-10-30 12:54:05.693 LOG <sliceanalysisms> INFO: Installing plugin: k8s
    2020-10-30 12:54:06.473 LOG <sliceanalysisms> INFO: Using existing installation of managed plugin: 7cec7893-c2c5-4f32-8b2d-fbc810880503 [package_name: k8splugin, package_version: 3.4.2, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
    2020-10-30 12:54:06.474 CFY <sliceanalysisms> Task succeeded 'cloudify_agent.operations.install_plugins'
    2020-10-30 12:54:06.538 CFY <sliceanalysisms> Creating deployment work directory
    2020-10-30 12:54:06.879 CFY <sliceanalysisms> 'create_deployment_environment' workflow execution succeeded
    2020-10-30 12:54:11.036 CFY <sliceanalysisms> Starting 'install' workflow execution
    2020-10-30 12:54:11.669 CFY <sliceanalysisms> [pgaasvm_pta423] Validating node instance before creation: nothing to do
    2020-10-30 12:54:11.787 CFY <sliceanalysisms> [pgaasvm_pta423] Precreating node instance: nothing to do
    2020-10-30 12:54:12.001 CFY <sliceanalysisms> [pgaasvm_pta423] Creating node instance
    2020-10-30 12:54:12.235 CFY <sliceanalysisms> [pgaasvm_pta423.create] Sending task 'pgaas.pgaas_plugin.create_database'
    2020-10-30 12:54:1403.339 LOG <sliceanalysisms> [pgaasvm_pta423.create] WARNING: create_database(sliceanalysisms)595 CFY <sliceanalysisms> Starting 'create_deployment_environment' workflow execution
    2020-10-30 12:54:1603.408 LOG <sliceanalysisms> [pgaasvm_pta423.create] WARNING: All done602 CFY <sliceanalysisms> Installing deployment and workflow plugins
    2020-10-30 12:54:1703.259 701 CFY <sliceanalysisms> [pgaasvm_pta423.create] Task succeeded 'pgaas.pgaas_plugin.create_databaseSending task 'cloudify_agent.operations.install_plugins'
    2020-10-30 12:54:1703.364 717 CFY <sliceanalysisms> [pgaasvm_pta423] Node instance createdTask started 'cloudify_agent.operations.install_plugins'
    2020-10-30 12:54:1704.563 CFY <sliceanalysisms> [pgaasvm_pta423] Configuring node instance: nothing to do770 LOG <sliceanalysisms> INFO: Installing plugin: pgaas
    2020-10-30 12:54:1705.660 CFY <sliceanalysisms> [pgaasvm_pta423] Starting node instance: nothing to do
    2020-10-30 12:54:17.882 CFY <sliceanalysisms> [pgaasvm_pta423] Poststarting node instance: nothing to do
    2020-10-30 12:54:18.077 CFY <sliceanalysisms> [pgaasvm_pta423] Node instance started691 LOG <sliceanalysisms> INFO: Using existing installation of managed plugin: 7feae746-63c9-4577-b6c4-d6ffdd00cb86 [package_name: pgaas, package_version: 1.3.0, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
    2020-10-30 12:54:1805.920 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Validating node instance before creation: nothing to do693 LOG <sliceanalysisms> INFO: Installing plugin: k8s
    2020-10-30 12:54:1806.988 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Precreating node instance: nothing to do
    2020-10-30 12:54:19.263 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Creating node instance473 LOG <sliceanalysisms> INFO: Using existing installation of managed plugin: 7cec7893-c2c5-4f32-8b2d-fbc810880503 [package_name: k8splugin, package_version: 3.4.2, supported_platform: linux_x86_64, distribution: centos, distribution_release: core]
    2020-10-30 12:54:1906.498 474 CFY <sliceanalysisms> [sliceanalysisms_zuw2se.create] Sending task 'k8splugin.create_for_componentsTask succeeded 'cloudify_agent.operations.install_plugins'
    2020-10-30 12:54:2306.070 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.create] INFO: Added config for sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms
    2020-538 CFY <sliceanalysisms> Creating deployment work directory
    2020-10-30 12:54:2306.070 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.create] INFO: Done setting up: sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms879 CFY <sliceanalysisms> 'create_deployment_environment' workflow execution succeeded
    2020-10-30 12:54:2311.894 036 CFY <sliceanalysisms> [sliceanalysisms_zuw2se.create] Task succeeded 'k8splugin.create_for_components'Starting 'install' workflow execution
    2020-10-30 12:54:2311.937 669 CFY <sliceanalysisms> [sliceanalysismspgaasvm_zuw2septa423] Node instance createdValidating node instance before creation: nothing to do
    2020-10-30 12:54:2411.239 787 CFY <sliceanalysisms> [sliceanalysismspgaasvm_zuw2septa423] Configuring Precreating node instance: nothing to do
    2020-10-30 12:54:2412.347 001 CFY <sliceanalysisms> [sliceanalysismspgaasvm_zuw2septa423] Starting Creating node instance
    2020-10-30 12:54:2412.599 235 CFY <sliceanalysisms> [sliceanalysismspgaasvm_zuw2septa423.startcreate] Sending task 'k8spluginpgaas.pgaas_plugin.create_and_start_container_for_componentsdatabase'
    2020-10-30 12:54:2614.842 339 LOG <sliceanalysisms> [sliceanalysismspgaasvm_zuw2septa423.startcreate] INFO: Starting k8s deployment for sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms, image: nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.components.slice-analysis-ms:1.0.1-20201029T015040Z, env: {'DCAE_CA_CERTPATH': '/opt/app/sliceanalysisms/etc/cert//cacert.pem', 'CONSUL_HOST': u'consul-server.onap', u'STANDALONE': u'false', 'CONFIG_BINDING_SERVICE': 'config-binding-service', 'CBS_CONFIG_URL': 'https://config-binding-service:10443/service_component_all/sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms'}, kwargs: {'readiness': {u'endpoint': u'/healthcheck', u'type': u'http', u'timeout': u'1s', u'interval': u'15s'}, 'liveness': {}, 'tls_info': {u'use_tls': True, u'cert_directory': u'/opt/app/sliceanalysisms/etc/cert/'}, 'envs': {u'STANDALONE': u'false'}, 'labels': {'cfydeployment': u'sliceanalysisms', 'cfynodeinstance': u'sliceanalysisms_zuw2se', 'cfynode': u'sliceanalysisms'}, 'external_cert': {u'use_external_tls': False, u'external_certificate_parameters': {u'common_name': u'', u'sans': u''}, u'cert_type': u'P12', u'external_cert_directory': u'/opt/app/dcae-certificate/external', u'ca_name': u'RA'}, 'resource_config': {}, 'volumes': [{u'host': {u'path': u'/dockerdata-nfs/slice-analysis-ms'}, u'container': {u'bind': u'/home/sliceanalysisms/logs', u'mode': u'rw'}}], 'log_info': {}, 'ports': [u'8080:0'], 'k8s_location': u'central'}
    2020-10-30 12:54:26.843 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: Passing k8sconfig: {'filebeat': {u'config_map': u'dev-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'}, 'truststore_merger': {u'image_tag': u'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:2.1.0'}, 'cbs': {'base_url': 'https://config-binding-service:10443/service_component_all'WARNING: create_database(sliceanalysisms)
    2020-10-30 12:54:16.408 LOG <sliceanalysisms> [pgaasvm_pta423.create] WARNING: All done
    2020-10-30 12:54:17.259 CFY <sliceanalysisms> [pgaasvm_pta423.create] Task succeeded 'pgaas.pgaas_plugin.create_database'
    2020-10-30 12:54:17.364 CFY <sliceanalysisms> [pgaasvm_pta423] Node instance created
    2020-10-30 12:54:17.563 CFY <sliceanalysisms> [pgaasvm_pta423] Configuring node instance: nothing to do
    2020-10-30 12:54:17.660 CFY <sliceanalysisms> [pgaasvm_pta423] Starting node instance: nothing to do
    2020-10-30 12:54:17.882 CFY <sliceanalysisms> [pgaasvm_pta423] Poststarting node instance: nothing to do
    2020-10-30 12:54:18.077 CFY <sliceanalysisms> [pgaasvm_pta423] Node instance started
    2020-10-30 12:54:18.920 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Validating node instance before creation: nothing to do
    2020-10-30 12:54:18.988 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Precreating node instance: nothing to do
    2020-10-30 12:54:19.263 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Creating node instance
    2020-10-30 12:54:19.498 CFY <sliceanalysisms> [sliceanalysisms_zuw2se.create] Sending task 'k8splugin.create_for_components'
    2020-10-30 12:54:23.070 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.create] INFO: Added config for sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms
    2020-10-30 12:54:23.070 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.create] INFO: Done setting up: sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms
    2020-10-30 12:54:23.894 CFY <sliceanalysisms> [sliceanalysisms_zuw2se.create] Task succeeded 'k8splugin.create_for_components'
    2020-10-30 12:54:23.937 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Node instance created
    2020-10-30 12:54:24.239 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Configuring node instance: nothing to do
    2020-10-30 12:54:24.347 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Starting node instance
    2020-10-30 12:54:24.599 CFY <sliceanalysisms> [sliceanalysisms_zuw2se.start] Sending task 'k8splugin.create_and_start_container_for_components'
    2020-10-30 12:54:26.842 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: Starting k8s deployment for sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms, image: nexus3.onap.org:10003/onap/org.onap.dcaegen2.services.components.slice-analysis-ms:1.0.1-20201029T015040Z, env: {'DCAE_CA_CERTPATH': '/opt/app/sliceanalysisms/etc/cert//cacert.pem', 'CONSUL_HOST': u'consul-server.onap', u'STANDALONE': u'false', 'CONFIG_BINDING_SERVICE': 'config-binding-service', 'CBS_CONFIG_URL': 'https://config-binding-service:10443/service_component_all/sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms'}, kwargs: {'readiness': {u'endpoint': u'/healthcheck', u'type': u'http', u'timeout': u'1s', u'interval': u'15s'}, 'liveness': {}, 'tls_info': {u'use_tls': True, u'cert_directory': u'/opt/app/sliceanalysisms/etc/cert/'}, 'envs': {u'STANDALONE': u'false'}, 'labels': {'cfydeployment': u'sliceanalysisms', 'cfynodeinstance': u'sliceanalysisms_zuw2se', 'cfynode': u'sliceanalysisms'}, 'external_cert': {u'countryuse_external_tls': u'US'False, u'truststoreexternal_certificate_passwordparameters': {u'secret', u'cert_secretcommon_name': u'oom-cert-service-client-tls-secret', u'statesans': u'California'}, u'organizationalcert_unittype': u'ONAPP12', u'locationexternal_cert_directory': u'San-Francisco/opt/app/dcae-certificate/external', u'timeoutca_name': u'30000RA'}, u 'keystoreresource_passwordconfig': u'secret', u'organization{}, 'volumes': [{u'Linux-Foundation', host': {u'request_urlpath': u'https:/dockerdata-nfs/oomslice-cert-service:8443/v1/certificate/'analysis-ms'}, u'image_tagcontainer': {u'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.1.0'}, 'default_k8s_locationbind': u'/home/sliceanalysisms/logs', u'mode': u'centralrw'}}], 'tlslog_info': {u'component_cert_dir}, 'ports': [u'/opt/dcae/cacert', u'cert_path': u'/opt/app/osaaf', u'image': u'nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0', u'ca_cert_configmap': u'dev-dcae-bootstrap-dcae-cacert', u'component_ca_cert_8080:0'], 'k8s_location': u'central'}
    2020-10-30 12:54:26.843 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: Passing k8sconfig: {'filebeat': {u'config_map': u'dev-dcae-filebeat-configmap', u'config_path': u'/usr/share/filebeat/filebeat.yml', u'log_path': u'/optvar/dcae/cacert/cacert.pem'}, 'consul_host': 'consul-server:8500', 'consul_dns_name': u'consul-server.onap', 'max_wait': 1800, 'image_pull_secrets': [u'onap-docker-registry-key'], 'namespace': u'onap'}
    2020-10-30 12:54:26.853 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: Creating init container: TLS
    * [nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0]
    2020-10-30 12:54:27.071 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: k8s deployment initiated successfully for sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms: {'services': ['sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms'], 'namespace': u'onap', 'location': u'central', 'deployment': 'dep-sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms'}
    2020-10-30 12:54:27.071 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: Waiting up to 1800 secs for sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms to become ready

    2020-10-30 12:55:32.167 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: k8s deployment is ready for: sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms
    2020-10-30 12:55:32.168 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: Done starting: sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms
    2020-10-30 12:55:33.027 CFY <sliceanalysisms> [sliceanalysisms_zuw2se.start] Task succeeded 'k8splugin.create_and_start_container_for_components'
    2020-10-30 12:55:33.063 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Poststarting node instance: nothing to do
    Execution ended, waiting 3 seconds for additional log messages
    2020-10-30 12:55:33.343 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Node instance started
    2020-10-30 12:55:33.684 CFY <sliceanalysisms> 'install' workflow execution succeeded
    Finished executing workflow install on deployment sliceanalysisms
    * Run 'cfy events list f6af3e5e-95b9-42d4-8b27-c920c824b3f1' to retrieve the execution's events/logs

    To un-deploy

    Code Block
    languagebash
    themeEmacs
    $ cfy uninstall sliceanalysisms

    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'}, 'truststore_merger': {u'image_tag': u'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:2.1.0'}, 'cbs': {'base_url': 'https://config-binding-service:10443/service_component_all'}, 'external_cert': {u'country': u'US', u'truststore_password': u'secret', u'cert_secret_name': u'oom-cert-service-client-tls-secret', u'state': u'California', u'organizational_unit': u'ONAP', u'location': u'San-Francisco', u'timeout': u'30000', u'keystore_password': u'secret', u'organization': u'Linux-Foundation', u'request_url': u'https://oom-cert-service:8443/v1/certificate/', u'image_tag': u'nexus3.onap.org:10001/onap/org.onap.oom.platform.cert-service.oom-certservice-client:2.1.0'}, 'default_k8s_location': u'central', 'tls': {u'component_cert_dir': u'/opt/dcae/cacert', u'cert_path': u'/opt/app/osaaf', u'image': u'nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0', u'ca_cert_configmap': u'dev-dcae-bootstrap-dcae-cacert', u'component_ca_cert_path': u'/opt/dcae/cacert/cacert.pem'}, 'consul_host': 'consul-server:8500', 'consul_dns_name': u'consul-server.onap', 'max_wait': 1800, 'image_pull_secrets': [u'onap-docker-registry-key'], 'namespace': u'onap'}
    2020-10-30 12:54:26.853 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: Creating init container: TLS
    * [nexus3.onap.org:10001/onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0]
    2020-10-30 12:54:27.071 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: k8s deployment initiated successfully for sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms: {'services': ['sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms'], 'namespace': u'onap', 'location': u'central', 'deployment': 'dep-sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms'}
    2020-10-30 12:54:27.071 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: Waiting up to 1800 secs for sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms to become ready

    2020-10-30 12:55:32.167 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: k8s deployment is ready for: sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms
    2020-10-30 12:55:32.168 LOG <sliceanalysisms> [sliceanalysisms_zuw2se.start] INFO: Done starting: sc652a898306f402bbbab77a97fec30bd-dcae-slice-analysis-ms
    2020-10-30 12:55:33.027 CFY <sliceanalysisms> [sliceanalysisms_zuw2se.start] Task succeeded 'k8splugin.create_and_start_container_for_components'
    2020-10-30 12:55:33.063 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Poststarting node instance: nothing to do
    Execution ended, waiting 3 seconds for additional log messages
    2020-10-30 12:55:33.343 CFY <sliceanalysisms> [sliceanalysisms_zuw2se] Node instance started
    2020-10-30 12:55:33.684 CFY <sliceanalysisms> 'install' workflow execution succeeded
    Finished executing workflow install on deployment sliceanalysisms
    * Run 'cfy events list f6af3e5e-95b9-42d4-8b27-c920c824b3f1' to retrieve the execution's events/logs


    7. To un-deploy

    Code Block
    languagebash
    themeEmacs
    $ cfy uninstall sliceanalysisms


Logging

 Since, the MS is deployed as a pod in the kubernetes, we can check the logs by using the command

Code Block
languagebash
themeEmacs
$ kubectl logs <pod-name> –namespace onap


Functional Tests

1. Before performing the functional tests, test data has to be populated in Config DB service. For populating the test data run the config_requests_script.sh passing the IP of the Config DB service as an argument.

Example

Code Block
languagebash
themeEmacs
$ ./config_requests_script.sh 192.168.200.9


View file
nameconfig_requests_script
height250

2. The zip file contains six PM files (3 sample files for one network function and the other 3 sample files for another network function of an S-NSSAI) and a script. Once the Slice analysis MS is up and running, run the script which will trigger PM mapper with these files and PM mapper outputs the corresponding PM messages in the PERFORMANCE_MEASUREMENTS topic which the slice analysis MS will consume and process further.

View file
nameinput_files.zip
height250

3. The slice analysis MS after analyzing the PM messages, outputs the policy onset message to unauthenticated.DCAE_CL_OUTPUT topic. For the above given input, the output would be

JSON Viewer
width500
height500
{
   "closedLoopControlName":"ControlLoop-Slicing-116d7b00-dbeb-4d03-8719-d0a658fa735b",
   "closedLoopAlarmStart":1604390747153,
   "closedLoopEventClient":"microservice.sliceAnalysisMS",
   "closedLoopEventStatus":"ONSET",
   "requestID":"6ff79078-45d9-40c8-b7dc-2d17f14bdf19",
   "target":"vserver.vserver-name",
   "payload":{
      "name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82",
      "serviceInstanceID":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82",
      "globalSubscriberId":"Customer-001",
      "subscriptionServiceType":"Premium",
      "networkType":"AN",
      "additionalProperties":{
         "modifyAction":"reconfigure",
         "snssaiList":[
            "001-010000"
         ],
         "sliceProfileId":"878f32c0-3699-4dbd-95a3-1f01d6c763fd",
         "resourceConfig":{
            "22":{
               "dLThptPerSlice":25,
               "uLThptPerSlice":28
            },
            "11":{
               "dLThptPerSlice":29,
               "uLThptPerSlice":32
            }
         },
         "nsiInfo":{
            "nsiName":"",
            "nsiId":"ab1676c4-8c7f-4d75-8ac1-d65f9b99b4e7"
         },
         "scriptName":"AN"
      }
   },
   "from":"DCAE",
   "version":"1.0.2",
   "target_type":"VNF",
   "AAI":{
      "vserver.is-closed-loop-disabled":"false",
      "vserver.prov-status":"ACTIVE",
      "vserver.vserver-name":"3f2f23fa-c567-4dd8-8f15-f95ae3e6fd82"
   }
}