Table of Contents |
---|
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
Bulk PM Flow:
- NF notifies VES Collector that a PM file is available for upload.
- Data File Collector downloads PM Files from the NF and publishes them to Data Router.
- PM-Mapper creates custom Performance events (VES) from the PM File data according to PM Mapping File.
- Analytics Applications (Slice Analysis MS) use these performance events for targeted analysis of network operations.
Slice Analysis MS Flow:
- Slice analysis ms consumes PM messages from PERFORMANCE_MEASUREMENTS topic
- For analysis Slice analysis MS consumes various data from Config DB
- List of Network Functions which serves the snssai
- List of RICs and its corresponding cell mappings of the snssai
- Current Configuration of the RICs
- Slice Profile of the snssai
- Subscriber details of the snssai (for sending the onset message to policy)
- 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.
- 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
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
DCAE and DMaaP pods should be up and running.
- DMaaP Bus Controller PostInstalls job should have completed successfully (executed as part of an OOM install).
- PM mapper service should be running.
- Config DB service should be running.
- Make sure that cfy is installed and configured to work with the Cloudify deployment.
Deployment Steps
Execute bash on the bootstrap Kubernetes pod.
Code Block language bash theme Emacs kubectl -n onap exec -it <dcaegen2-dcae-bootstrap> bash
Go to the /blueprints directory.
- 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
- 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
Create an input file.
Expand title Sample 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: 500006. 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 language bash theme Emacs $ cfy install k8s-slice-analysis-ms.yaml -i k8s-slice-input.yaml --blueprint-id sliceanalysisms
Expand title Sample 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:14.339 LOG <sliceanalysisms> [pgaasvm_pta423.create] 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'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'}, '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 ready2020-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/logs7. To un-deploy
Code Block language bash theme Emacs $ 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 | ||||
---|---|---|---|---|
| ||||
$ 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 | ||||
---|---|---|---|---|
| ||||
$ ./config_requests_script.sh 192.168.200.9 |
View file | ||||
---|---|---|---|---|
|
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 name input_files.zip height 250
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
Elite soft json viewer | ||||
---|---|---|---|---|
| ||||
{
"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"
}
} |