From ceaf6701059f7a1ac21d9ec93fc1116ea1676bd9 Mon Sep 17 00:00:00 2001 From: Kai Date: Fri, 5 Mar 2021 15:24:43 +0800 Subject: Add doc for kpi-ms Issue-ID: DCAEGEN2-2585 Signed-off-by: Kai Lu Change-Id: I5e47a58220e6253ff6148a8fa9b6204d149af2cb --- docs/sections/services/kpi-computation-ms/arch.PNG | Bin 0 -> 32610 bytes .../services/kpi-computation-ms/blueprint-list.png | Bin 0 -> 55773 bytes .../services/kpi-computation-ms/configuration.rst | 42 +++++++ .../sections/services/kpi-computation-ms/index.rst | 34 ++++++ .../services/kpi-computation-ms/installation.rst | 95 ++++++++++++++++ .../services/kpi-computation-ms/kpi-log.PNG | Bin 0 -> 179791 bytes .../kpi_computation_ms_overview.rst | 126 +++++++++++++++++++++ docs/sections/services/serviceindex.rst | 3 +- 8 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 docs/sections/services/kpi-computation-ms/arch.PNG create mode 100644 docs/sections/services/kpi-computation-ms/blueprint-list.png create mode 100644 docs/sections/services/kpi-computation-ms/configuration.rst create mode 100644 docs/sections/services/kpi-computation-ms/index.rst create mode 100644 docs/sections/services/kpi-computation-ms/installation.rst create mode 100644 docs/sections/services/kpi-computation-ms/kpi-log.PNG create mode 100644 docs/sections/services/kpi-computation-ms/kpi_computation_ms_overview.rst diff --git a/docs/sections/services/kpi-computation-ms/arch.PNG b/docs/sections/services/kpi-computation-ms/arch.PNG new file mode 100644 index 00000000..e6bee344 Binary files /dev/null and b/docs/sections/services/kpi-computation-ms/arch.PNG differ diff --git a/docs/sections/services/kpi-computation-ms/blueprint-list.png b/docs/sections/services/kpi-computation-ms/blueprint-list.png new file mode 100644 index 00000000..7c5875ac Binary files /dev/null and b/docs/sections/services/kpi-computation-ms/blueprint-list.png differ diff --git a/docs/sections/services/kpi-computation-ms/configuration.rst b/docs/sections/services/kpi-computation-ms/configuration.rst new file mode 100644 index 00000000..59fe784c --- /dev/null +++ b/docs/sections/services/kpi-computation-ms/configuration.rst @@ -0,0 +1,42 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Configuration +============= + +KPI Computation MS expects to be able to fetch configuration directly from consul service in following JSON format: + +.. code-block:: json + { + "pollingInterval": 20, + "aafUsername": "dcae@dcae.onap.org", + "streams_publishes": { + "kpi_topic": { + "type": "message-router", + "dmaap_info": { + "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_KPI_OUTPUT" + } + } + }, + "trust_store_pass_path": "/opt/app/kpims/etc/cert/trust.pass", + "cid": "kpi-cid", + "cg": "kpi-cg", + "streams_subscribes": { + "performance_management_topic": { + "aaf_password": "demo123456!", + "type": "message-router", + "dmaap_info": { + "topic_url": "https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS" + }, + "aaf_username": "dcae@dcae.onap.org" + } + }, + "trust_store_path": "/opt/app/kpims/etc/cert/trust.jks", + "pollingTimeout": 60, + "cbsPollingInterval": 60, + "aafPassword": "demo123456!", + "kpi.policy": "{\"domain\":\"measurementsForKpi\",\"methodForKpi\":[{\"eventName\":\"perf3gpp_CORE-AMF_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"AMFRegNbr\",\"operation\":\"SUM\",\"operands\":\"RM.RegisteredSubNbrMean\"}]},{\"eventName\":\"perf3gpp_AcmeNode-Acme_pmMeasResult\",\"controlLoopSchemaType\":\"SLICE\",\"policyScope\":\"resource=networkSlice;type=configuration\",\"policyName\":\"configuration.dcae.microservice.kpi-computation\",\"policyVersion\":\"v0.0.1\",\"kpis\":[{\"measType\":\"UpstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.InDataOctN3UPF\"},{\"measType\":\"DownstreamThr\",\"operation\":\"SUM\",\"operands\":\"GTP.OutDataOctN3UPF\"}]}]}", + "dmaap.server": ["message-router"] + } + +During ONAP OOM/Kubernetes deployment this configuration is created from KPI Computation MS Cloudify blueprint. diff --git a/docs/sections/services/kpi-computation-ms/index.rst b/docs/sections/services/kpi-computation-ms/index.rst new file mode 100644 index 00000000..fb93564b --- /dev/null +++ b/docs/sections/services/kpi-computation-ms/index.rst @@ -0,0 +1,34 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + + +Kpi Computation MS +================== + +.. Add or remove sections below as appropriate for the platform component. + + +Kpi Computation MS overview and functions +----------------------------------------- + +.. toctree:: + :maxdepth: 1 + + ./kpi_computation_ms_overview.rst + + +Kpi Computation MS Installation Steps +------------------------------------- + +.. toctree:: + :maxdepth: 1 + + ./installation.rst + +Kpi Computation MS Configurations +--------------------------------- + +.. toctree:: + :maxdepth: 1 + + ./configuration.rst diff --git a/docs/sections/services/kpi-computation-ms/installation.rst b/docs/sections/services/kpi-computation-ms/installation.rst new file mode 100644 index 00000000..eda1ae82 --- /dev/null +++ b/docs/sections/services/kpi-computation-ms/installation.rst @@ -0,0 +1,95 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. _kpi-installation: + + +Installation +============ + +Kpi Computation MS can be deployed using cloudify blueprint using bootstrap container of an existing DCAE deployment. + +Deployment Pre-requisites +~~~~~~~~~~~~~~~~~~~~~~~~~ +- DCAE and DMaaP pods should be up and running. + +- PM mapper 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. + + kubectl -n onap exec -it bash + +Validate Blueprint +------------------ +Before the blueprints uploading to Cloudify manager, the blueprints shoule be validated first through the following command. + .. code-block :: bash + + #cfy blueprint validate /bluerints/k8s-kpi-ms.yaml + +Upload the Blueprint to Cloudify Manager. +----------------------------------------- +After validating, we can start to proceed blueprints uploading. + .. code-block :: bash + + #cfy blueprint upload -b kpi-ms /bluerints/k8s-kpi-ms.yaml + +Verify Uploaded Blueprints +-------------------------- +Using "cfy blueprint list" to verify your work. + .. code-block :: bash + + #cfy blueprint list + +You can see the following returned message to show the blueprints have been correctly uploaded. + .. image :: ./blueprint-list.png + + +Verify Plugin Versions +---------------------- +If the version of the plugin used is different, update the blueprint import to match. + .. code-block :: bash + + #cfy plugins list + +Create Deployment +----------------- +Here we are going to create deployments for both feeder and admin UI. + .. code-block :: bash + + #cfy deployments create -b kpi-ms kpi-ms + +Launch Service +-------------- +Next, we are going to launch the KPI-MS. + .. code-block :: bash + + #cfy executions start -d kpi-ms install + + +Verify the Deployment Result +---------------------------- +The following command can be used to list the kpi-ms logs. + + .. code-block :: bash + + #kubectl logs -n onap + +The output should looks like. + .. image :: ./kpi-log.PNG + +Uninstall +--------- +Uninstall running component and delete deployment + .. code-block :: bash + + #cfy uninstall kpi-ms + +Delete Blueprint +---------------- + .. code-block :: bash + + #cfy blueprints delete kpi-ms \ No newline at end of file diff --git a/docs/sections/services/kpi-computation-ms/kpi-log.PNG b/docs/sections/services/kpi-computation-ms/kpi-log.PNG new file mode 100644 index 00000000..e8584bc6 Binary files /dev/null and b/docs/sections/services/kpi-computation-ms/kpi-log.PNG differ diff --git a/docs/sections/services/kpi-computation-ms/kpi_computation_ms_overview.rst b/docs/sections/services/kpi-computation-ms/kpi_computation_ms_overview.rst new file mode 100644 index 00000000..9e733e0f --- /dev/null +++ b/docs/sections/services/kpi-computation-ms/kpi_computation_ms_overview.rst @@ -0,0 +1,126 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 + International License. http://creativecommons.org/licenses/by/4.0 + +.. _docs_kpi_computation_ms_overview: + +Introduction +"""""""""""" + +**Kpi Computation MS** is a software component of ONAP that does calucaltion in accordance with the formula defined dynamically. The service include the features: + Subscribe original PM data from DMaaP. + Do KPI computation based on KPI formula which can be got from config policies and the formula can be configued dynamically. + Publish KPI results on DMaaP. + Receive request for specific KPI computation (future scope) on specific ‘objects’ (e.g., S-NSSAI, Service). + +Architecture +------------ +The internal architecture of Kpi Computation MS is shown below. + +.. image:: ./arch.PNG + +Functionality +""""""""""""" +Kpi Computation MS will do calculation based on the PM data that is VES format. publish KPI result as VES events on a DMaaP Message Router topic for consumers that prefer such data in VES format. +Kpi Computation MS receives PM data by subscribing to a Message Router topic. + +Flows: +1. KPI Computation MS will get PM data VES format from DMaaP +2. Other modules (e.g., SO/OOF/Slice Analysis MS) can also request KPI-MS for KPI calculation (Future scope beyond H-release). +3. KPI Computation MS will support for periodical KPI Computation. Period may be specified by a requestor optionally, if nothing is specified, KPI computation MS will continue computation until an explicit stop trigger is received. +4. The KPI result which genertate by kpi computation will be published to DMaaP. + +Verification +"""""""""""" +Publish a file to the PM-Mapper using the following example curl: + curl -k -X PUT https://dcae-pm-mapper:8443/delivery/ -H 'X-DMAAP-DR-META:{"productName": "AcmeNode","vendorName": "Acme","lastEpochMicrosec": "1538478000000","sourceName": "oteNB5309","startEpochMicrosec": "1538478900000","timeZoneOffset": "UTC+05:00","location": "ftpes://127.0.0.1:22/ftp/rop/A20161224.1045-1100.bin.gz","compression": "gzip","fileFormatType": "org.3GPP.32.435#measCollec","fileFormatVersion": "V9"}' -H "Content-Type:application/xml" --data-binary @ -H 'X-ONAP-RequestID: 12345' -H 'X-DMAAP-DR-PUBLISH-ID: 12345' + +Example type A file: + + + + + + + + + + + + + GTP.InDataOctN3UPF.08_010101 + GTP.OutDataOctN3UPF.08_010101 + + 10 + 20 + false + + + + + + + GTP.InDataOctN3UPF.08_010101 + GTP.OutDataOctN3UPF.08_010101 + + 30 + 40 + false + + + + + + + + +Curl the topic on Message Router to retrieve the published event: + + curl -k https://message-router:3905/events/unauthenticated.DCAE_KPI_OUTPUT/$ConsumerGroup/$ID + +Example message output: + { + "event": { + "commonEventHeader": { + "domain": "perf3gpp", + "eventId": "432fa910-feed-4c64-9532-bd63201080d8", + "eventName": "perf3gpp_AcmeNode-Acme_pmMeasResult", + "lastEpochMicrosec": 1591100100000, + "priority": "Normal", + "reportingEntityName": "", + "sequence": 0, + "sourceName": "oteNB5309", + "startEpochMicrosec": 1591099200000, + "version": 4.0, + "vesEventListenerVersion": "7.1", + "timeZoneOffset": "UTC+05:00" + }, + "perf3gppFields": { + "perf3gppFieldsVersion": "1.0", + "measDataCollection": { + "granularityPeriod": 1591100100000, + "measuredEntityUserName": "", + "measuredEntityDn": "UPFMeasurement", + "measuredEntitySoftwareVersion": "r0.1", + "measInfoList": [{ + "measInfoId": { + "sMeasTypesList": "SLICE" + }, + "measTypes": { + "sMeasTypesList": ["UpstreamThr08_010101"] + }, + "measValuesList": [{ + "suspectFlag": false, + "measResults": [{ + "p": 1, + "sValue": "40" + }] + }] + }] + } + } + } + } + +Interaction +""""""""""" +Kpi Computation MS interacts with the Config Binding Service to get configuration information. \ No newline at end of file diff --git a/docs/sections/services/serviceindex.rst b/docs/sections/services/serviceindex.rst index 0a968c91..10c2bd1b 100644 --- a/docs/sections/services/serviceindex.rst +++ b/docs/sections/services/serviceindex.rst @@ -24,4 +24,5 @@ DCAE Service components ./restconf/index.rst ./tcagen2-docker/index.rst ./datalake-handler/index.rst - ./slice-analysis-ms/index.rst \ No newline at end of file + ./slice-analysis-ms/index.rst + ./kpi-computation-ms/index.rst \ No newline at end of file -- cgit 1.2.3-korg