Versions Compared

Key

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

...

2. MSB Configuration

Register so-orchestrationTasks and so-serviceInstances datalake interface to MSB.

Interface registration can be done through portal.

...

    Input IP Address and Port then click the 'SAVE' button. (Use cmd ’kubectl get svc n onap | grep dl-des‘ to confirm IP and port.)

Deployment Prerequisite/dependencies for DCAE:

  1. VES, PM mapper and DataFile Collector, dcae-mongodb, Datalake Extraction Service(DES) and Datalake-feeder services should be running.

3. DCAE-MONGO DB:

...

to load sample data:

...

3. AAI Configuration:

Please find below curl commands with required data to be populated in AAI, provide the worker vm ip for nfsServer. however, you do not need to create these service profiles manually because SO creates them for you in the e2e slice allocation. You only need to do it manually if you are not testing with SO and instead, you are calling UUI & KPI-MS directly (no SO involved)

Code Block
themeEmacs
titlePopulateAAIdata
linenumberstrue
collapsetrue

...

curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H  "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://'$nfsServer':30233/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/11a9195f-c060-49dd-8f1b-6a4c8ab5d01n -d '{ 
  "service-instance-name": "e2eService1",
	"service-type": "embb",
	"service-role": "service-profile",
	"environment-context": "01-B989BD",
	"orchestration-status": "deactivated"}'

curl --user AAI:AAI -X PUT -H "X-FromAppId:AAI" -H  "X-TransactionId:get_aai_subscr" -H "Accept:application/json" -H "Content-Type:application/json" -k https://'$nfsServer':30233/aai/v21/business/customers/customer/5GCustomer/service-subscriptions/service-subscription/5G/service-instances/service-instance/259fa29d-d589-4142-a4f0-a689a5061878 -d '{ 
    "service-instance-name": "e2eService2",
	"service-type": "embb",
	"service-role": "service-profile",
	"environment-context": "01-497651",
	"orchestration-status": "deactivated"}'


Deployment Prerequisite/dependencies for DCAE:

  1. VES, PM mapper and DataFile Collector, dcae-mongodb, Datalake Extraction Service(DES) and Datalake-feeder services should be running.

4. DCAE-MONGO DB:

  1. Login to dcae-mongodb container and execute following commands to check if PM data was saved in DB:
    1. mongo
    2. use datalake
    3. db.unauthenticatedperformancemeasurements.find({})
    4. to load sample data:

      Code Block
      titlemongodb sample data 1
      linenumberstrue
      collapsetrue
      db.unauthenticatedperformancemeasurements.insert({
        "event": {
          "commonEventHeader": {
            "domain": "perf3gpp",
            "sMeasTypesListeventId": "SLICE"dfe43a5c-0868-4275-b1c9-e45945b6a38c",
                  }"eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
                  "measTypes"lastEpochMicrosec": {1610689590387,
            "priority": "Normal",
            "sMeasTypesListreportingEntityName": ["",
            "sequence": 1,
             "sourceName": "PDUSessionEstSR.01-B989BDcucpserver2",
            "startEpochMicrosec": 1610689590387,
            ]
      "version": 4,
                 }"vesEventListenerVersion": "7.1",
            "timeZoneOffset": "UTC+05:00"
          "measValuesList": [},
          "perf3gppFields": {
            "perf3gppFieldsVersion": "1.0",
       {     "measDataCollection": {
                "suspectFlaggranularityPeriod": false900,
              "measuredEntityUserName": "",
              "measResultsmeasuredEntityDn": ["cucpserver2",
              "measuredEntitySoftwareVersion": "r0.1",
              {"measInfoList": [
                  {
            "p": 1,     "measInfoId": {
                    "sValuesMeasTypesList": "166SLICE"
                  },
           }       "measTypes": {
              ]      "sMeasTypesList": [
             }         "PDUSessionEstSR.01-B989BD"
         ]           }]
              ]      },
      }     }   } })
      Code Block
      titlemongodb sample data 2
      linenumberstrue
      collapsetrue
      db.unauthenticatedperformancemeasurements.insert({   "eventmeasValuesList": {[
             "commonEventHeader": {      {
      "domain": "perf3gpp",       "eventId": "4ad683e3-40d0-47f5-8ba0-a8da51ff1ab5",       "eventNamesuspectFlag": "perf3gpp_RnNode-Slicing_pmMeasResult"false,
            "lastEpochMicrosec": 1606743157915,          "prioritymeasResults": [
      "Normal",       "reportingEntityName": "",       "sequence": 1,  {
          "sourceName": "cucpserver2",       "startEpochMicrosec": 1606743157914,       "versionp": 41,
             "vesEventListenerVersion": "7.1",             "timeZoneOffsetsValue": "UTC+05:00166"
          },     "perf3gppFields": {       "perf3gppFieldsVersion": "1.0", }
            "measDataCollection": {         "granularityPeriod": 900,]
              "measuredEntityUserName": "",      }
        "measuredEntityDn": "cucpserver2",         "measuredEntitySoftwareVersion": "r0.1",]
               "measInfoList": [}
              ]
       {     }
          }
        "measInfoId": {
          }
      })


      Code Block
      titlemongodb sample data 2
      linenumberstrue
      collapsetrue
      db.unauthenticatedperformancemeasurements.insert({
        "event": {
          "commonEventHeader": {
            "sMeasTypesListdomain": "SLICEperf3gpp",
            "eventId": "4ad683e3-40d0-47f5-8ba0-a8da51ff1ab5",
          },  "eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
               "measTypeslastEpochMicrosec": {1606743157915,
            "priority": "Normal",
            "sMeasTypesListreportingEntityName": ["",
            "sequence": 1,
            "sourceName":  "PDUSessionEstSR.01-B989BDcucpserver2",
            "startEpochMicrosec": 1606743157914,
            ] "version": 4,
            "vesEventListenerVersion": "7.1",
          },  "timeZoneOffset": "UTC+05:00"
          },
          "measValuesListperf3gppFields": [{
            "perf3gppFieldsVersion": "1.0",
            "measDataCollection": {
              "granularityPeriod": 900,
              "suspectFlagmeasuredEntityUserName": false"",
              "measuredEntityDn": "cucpserver2",
              "measResults"measuredEntitySoftwareVersion": "r0.1",
              "measInfoList": [
                {
             {     "measInfoId": {
                    "psMeasTypesList": 1, "SLICE"
                  },
                  "sValuemeasTypes": "188"{
                    "sMeasTypesList": [
        }              "PDUSessionEstSR.01-B989BD"
        ]            ]
        }          },
         ]         "measValuesList": [
      }         ]     {
       }     }   }
      })
      Code Block
      titlemongodb sample data 3
      linenumberstrue
      collapsetrue
      db.unauthenticatedperformancemeasurements.insert({       "eventsuspectFlag": false,
         {     "commonEventHeader": {       "domainmeasResults": "perf3gpp", [
              "eventId": "5105bf0e-f157-455f-b1eb-d686ddf39aa9",       "eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
       {
           "lastEpochMicrosec": 1606753197538,       "priority": "Normal",       "reportingEntityNamep": ""1,
               "sequence": 1,           "sourceNamesValue": "cucpserver2188",
             "startEpochMicrosec": 1606753197537,       "version": 4,  }
          "vesEventListenerVersion": "7.1",       "timeZoneOffset": "UTC+05:00"   ]
       },     "perf3gppFields": {       "perf3gppFieldsVersion": "1.0",}
             "measDataCollection": {    ]
          "granularityPeriod": 900,     }
         "measuredEntityUserName": "",    ]
          "measuredEntityDn": "cucpserver2", }
          }
        "measuredEntitySoftwareVersion": "r0.1",
         }
      })


      Code Block
      titlemongodb sample data 3
      linenumberstrue
      collapsetrue
      db.unauthenticatedperformancemeasurements.insert({
        "event": {
          "measInfoListcommonEventHeader": [{
                {
      "domain": "perf3gpp",
                 "measInfoIdeventId": {"5105bf0e-f157-455f-b1eb-d686ddf39aa9",
            "eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
            "sMeasTypesListlastEpochMicrosec": "SLICE"1606753197538,
            "priority": "Normal",
          },      "reportingEntityName": "",
            "measTypessequence": {1,
            "sourceName": "cucpserver2",
            "sMeasTypesListstartEpochMicrosec": [1606753197537,
            "version": 4,
             "vesEventListenerVersion": "PDUSessionEstSR7.01-B989BD1",
            "timeZoneOffset": "UTC+05:00"
            ]},
          "perf3gppFields": {
            "perf3gppFieldsVersion": "1.0",
            "measDataCollection": {
           },   "granularityPeriod": 900,
              "measValuesListmeasuredEntityUserName": ["",
              "measuredEntityDn": "cucpserver2",
              "measuredEntitySoftwareVersion": "r0.1",
       {                 "suspectFlag": false,
                      "measResults": [
                        {
                   "measInfoList": [
                {
                  "measInfoId": {
                    "sMeasTypesList": "SLICE"
                  },
                  "measTypes": {
                    "sMeasTypesList": [
                      "PDUSessionEstSR.01-B989BD"
                    ]
                  },
                  "measValuesList": [
                    {
                      "suspectFlag": false,
                      "measResults": [
                        {
                          "p": 1,
                          "sValue": "61"
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          }
        }
      })


      Code Block
      titlemongodb sample data 4
      linenumberstrue
      collapsetrue
      db.unauthenticatedperformancemeasurements.insert({
      	"event": {
      		"commonEventHeader": {
      			"domain": "perf3gpp",
      			"eventId": "24cf31f7-3def-43c1-85d8-4ad8041c5e08",
      			"eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
      			"lastEpochMicrosec": 1610689590387,
      			"priority": "Normal",
      			"reportingEntityName": "",
      			"sequence": 1,
      			"sourceName": "cucpserver1",
      			"startEpochMicrosec": 1610689590387,
      			"version": 4.0,
      			"vesEventListenerVersion": "7.1",
      			"timeZoneOffset": "UTC+05:30"
      		},
      		"perf3gppFields": {
      			"perf3gppFieldsVersion": "1.0",
      			"measDataCollection": {
      				"granularityPeriod": 900,
      				"measuredEntityUserName": "",
      				"measuredEntityDn": "cucpserver1",
      				"measuredEntitySoftwareVersion": "r0.1",
      				"measInfoList": [{
      					"measInfoId": {
      						"sMeasTypesList": "SLICE"
      					},
      					"measTypes": {
      						"sMeasTypesList": ["PDUSessionEstSR.01-497651"]
      					},
      					"measValuesList": [{
      						"suspectFlag": false,
      						"measResults": [{
      							"p": 1,
      							"sValue": "228"
      						}]
      					}]
      				}]
      			}
      		}
      	}
      })


      Code Block
      titlemongodb sample data 5
      linenumberstrue
      collapsetrue
      db.unauthenticatedperformancemeasurements.insert({
      	"event": {
      		"commonEventHeader": {
      			"domain": "perf3gpp",
      			"eventId": "22ad0df1-958b-4136-9053-57c3967a6207",
      			"eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
      			"lastEpochMicrosec": 1606743157915,
      			"priority": "Normal",
      			"reportingEntityName": "",
      			"sequence": 1,
      			"sourceName": "cucpserver1",
      			"startEpochMicrosec": 1606743157914,
      			"version": 4.0,
      			"vesEventListenerVersion": "7.1",
      			"timeZoneOffset": "UTC+05:30"
      		},
      		"perf3gppFields": {
      			"perf3gppFieldsVersion": "1.0",
      			"measDataCollection": {
      				"granularityPeriod": 900,
      				"measuredEntityUserName": "",
      				"measuredEntityDn": "cucpserver1",
      				"measuredEntitySoftwareVersion": "r0.1",
      				"measInfoList": [{
      					"measInfoId": {
      						"sMeasTypesList": "SLICE"
      					},
      					"measTypes": {
      						"sMeasTypesList": ["PDUSessionEstSR.01-497651"]
      					},
      					"measValuesList": [{
      						"suspectFlag": false,
      						"measResults": [{
      							"p": 1,
      							"sValue": "137"
      						}]
      					}]
      				}]
      			}
      		}
      	}
      })


      Code Block
      titlemongodb sample data 6
      linenumberstrue
      collapsetrue
      db.unauthenticatedperformancemeasurements.insert({
      	"event": {
      		"commonEventHeader": {
      			"domain": "perf3gpp",
      			"eventId": "c01bf72b-d4a3-42d6-a0bb-3d96bdacc503",
      			"eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
      			"lastEpochMicrosec": 1606753197538,
      			"priority": "Normal",
      			"reportingEntityName": "",
      			"sequence": 1,
      			"sourceName": "cucpserver1",
      			"startEpochMicrosec": 1606753197537,
      			"version": 4.0,
      			"vesEventListenerVersion": "7.1",
      			"timeZoneOffset": "UTC+05:30"
      		},
      		"perf3gppFields": {
      			"perf3gppFieldsVersion": "1.0",
      			"measDataCollection": {
      				"granularityPeriod": 900,
      				"measuredEntityUserName": "",
      				"measuredEntityDn": "cucpserver1",
      				"measuredEntitySoftwareVersion": "r0.1",
      				"measInfoList": [{
      					"measInfoId": {
      						"sMeasTypesList": "SLICE"
      					},
      					"measTypes": {
      						"sMeasTypesList": ["PDUSessionEstSR.01-497651"]
      					},
      					"measValuesList": [{
      						"suspectFlag": false,
      						"measResults": [{
      							"p": 1,
      							"sValue": "199"
      						}]
      					}]
      				}]
      			}
      		}
      	}
      })


5. Datalake Extraction Service(DES):

  1. Build presto image and push the images to a exsting repository
    1. Download and extract presto package version v0.0.2: presto-v0.0.2.tar.gz
    2. docker build -t presto:v0.0.2 .
    3. docker tag presto:v0.0.2 registry.baidubce.com/onap/presto:v0.0.2
    4. docker push registry.baidubce.com/onap/presto:v0.0.2
    5. Note: Replace the repository path with your own repository.
  2. Install presto service
    1. kubectl -n onap run dl-presto --image=presto:v0.0.2 --env="MongoDB_IP=dcae-mongohost" --env="MongoDB_PORT=27017" --image-pull-policy=IfNotPresent
    2. kubectl expose pod dl-presto --name=dl-presto --port=9000 --target-port=9000 --type=NodePort -n onap
  3. Login to the dev-dcae-datalake-postgres-primary container and execute following sql commands:

    Code Block
    titledatalake-db init_data
    linenumberstrue
    collapsetrue
    psql -Udatalake -ddatalake
    \dt
    delete from map_db_topic;
    delete from map_db_design;
    delete from db;
    delete from data_exposure ;
    insert into db (id, db_type_id, enabled, encrypt, name,host,port,database_name) values (2, 'MONGO', true, true, 'MongoDB 1','dcae-mongohost',27017,'datalake');
    insert into map_db_topic(db_id,topic_id) select db.id, topic.id from db_type, db, topic where db.db_type_id=db_type.id and db_type.tool=false;
    update kafka set secure=true, pass='admin_secret' where id=1;
    insert into topic_name (id) values ('unauthenticated.PERFORMANCE_MEASUREMENTS'); insert into data_exposure(id, note,sql_template,db_id) values ('pDUSessionEstSR','pm_message', 'SELECT event.perf3gppFields.measDataCollection.measInfoList[1].measValuesList[1].measResults[1].sValue AS pDUSessionEstSR, from_unixtime(event.commonEventHeader.startEpochMicrosec/1000) AS timeStamp FROM unauthenticatedperformancemeasurements WHERE any_match(event.perf3gppFields.measDataCollection.measInfoList[1].measTypes.sMeasTypesList, e -> e like ''${id}'') AND event.commonEventHeader.startEpochMicrosec >= ${timeStamp}',2);


  4. Execute below request to verify: 

    curl --header "Content-type: application/json" --request POST --data '{"hours":4,"id":"PDUSessionEstSR.00110010","timeStamp":"1606743157914"}' http://dl-des:1681/datalake/v1/exposure/pDUSessionEstSR -i 

6. KPI - MS :

Deployment Prerequisite/dependencies
  - DCAE and DMaaP pods should be up and running. 
  - PM mapper service should be running.

Deployment steps ::

 - Clone the OOM repo - git clone "https://gerrit.onap.org/r/oom"
 - Go to the oom/kubernetes/dcaegen2-services/components directory, which has kpi component charts
 - Execute the command : make dcae-kpi-ms ( This will push the charts to the local repo)
 - Install the component using the following command : helm install dev-kpi-ms dcae-kpi-ms --namespace onap --set global.masterPassword=guilin2021

To load policies into the pdp container ::

  1.  curl -k --silent --user 'policyadmin:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes" -H "Accept: application/json" -H "Content-Type: application/json" -d @kpipolicytype.json
  2.  curl -k --silent --user 'policyadmin:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.monitoring.docker.kpims.app/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @kpipolicyinstance.json
  3. curl --silent -k --user 'policyadmin:zb!XztG34' -X POST "https://policy-pap:6969/policy/pap/v1/pdps/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @deploykpipolicy.json


kpipolicytype.json

Elite soft json viewer
{
  "policy_types": {
    "onap.policies.monitoring.docker.kpims.app": {
      "derived_from": "onap.policies.Monitoring:1.0.0",
      "

...

description": 

...

"KPI ms policy type",
      "properties": 

...

{
        "

...

domain": 

...

{
          "required": true,
      

...

    "type": "string"
        },
		"methodForKpi":{
  

...

       "type":"list",
       

...

  "required":true,
         "entry_schema":{

...

         "type":"policy.data.methodForKpi_properties"
 

...

         

...

       

...

   

...

}
 

...

 

...

titlemongodb sample data 4
linenumberstrue
collapsetrue

...

 

...

 

...

 

...

 

...

    }
       
      },
      "version": "1.0.0"
    }
  },
    "data_types": {
    "policy.data.methodForKpi_properties": {
      "derived_from": "tosca.nodes.Root",
      "properties": {
		

...

     "eventName":{
                    "type":"string",
                    "required":true
                },
			

...

 "

...

controlLoopSchemaType":

...

{
                    "type":"string",
                    "required":true
                },
			

...

"

...

policyScope":

...

titlemongodb sample data 5
linenumberstrue
collapsetrue

...

{
                    "type":"string",
                    "required":true
                },
			"

...

policyName":

...

{
                    "type":"string",
                    "required":true
                },
			"

...

policyVersion":

...

{
                    "type":"string",
                    "required":true
                },
			"

...

kpis":{
      

...

Code Block
titlemongodb sample data 6
linenumberstrue
collapsetrue
db.unauthenticatedperformancemeasurements.insert({
	"event": {
		"commonEventHeader": {
			"domain": "perf3gpp",
			"eventId": "c01bf72b-d4a3-42d6-a0bb-3d96bdacc503",
			"eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
			"lastEpochMicrosec": 1606753197538,
			"priority": "Normal",
			"reportingEntityName": "",
			"sequence": 1,
			"sourceName": "cucpserver1",
			"startEpochMicrosec": 1606753197537,
			"version": 4.0,
			"vesEventListenerVersion": "7.1",
			"timeZoneOffset": "UTC+05:30"
		},
		"perf3gppFields": {
			"perf3gppFieldsVersion": "1.0",
			"measDataCollection": {
				"granularityPeriod": 900,
				"measuredEntityUserName": "",
				"measuredEntityDn": "cucpserver1",
				"measuredEntitySoftwareVersion": "r0.1",
				"measInfoList": [{
					"measInfoId": {
						"sMeasTypesList": "SLICE"
					},
					"measTypes": {
						"sMeasTypesList": ["PDUSessionEstSR.01-497651"]
					},
					"measValuesList": [{
						"suspectFlag": false,
						"measResults": [{
							"p": 1,
							"sValue": "199"
						}]
					}]
				}]
			}
		}
	}
})

4. Datalake Extraction Service(DES):

...

  1. Download and extract presto package version v0.0.2: presto-v0.0.2.tar.gz
  2. docker build -t presto:v0.0.2 .
  3. docker tag presto:v0.0.2 registry.baidubce.com/onap/presto:v0.0.2
  4. docker push registry.baidubce.com/onap/presto:v0.0.2
  5. Note: Replace the repository path with your own repository.

...

  1. kubectl -n onap run dl-presto --image=presto:v0.0.2 --env="MongoDB_IP=dcae-mongohost" --env="MongoDB_PORT=27017" --image-pull-policy=IfNotPresent
  2. kubectl expose pod dl-presto --name=dl-presto --port=9000 --target-port=9000 --type=NodePort -n onap

Login to the dev-dcae-datalake-postgres-primary container and execute following sql commands:

Code Block
titledatalake-db init_data
linenumberstrue
collapsetrue
psql -Udatalake -ddatalake
\dt
delete from map_db_topic;
delete from map_db_design;
delete from db;
delete from data_exposure ;
insert into db (id, db_type_id, enabled, encrypt, name,host,port,database_name) values (2, 'MONGO', true, true, 'MongoDB 1','dcae-mongohost',27017,'datalake');
insert into map_db_topic(db_id,topic_id) select db.id, topic.id from db_type, db, topic where db.db_type_id=db_type.id and db_type.tool=false;
update kafka set secure=true, pass='admin_secret' where id=1;
insert into topic_name (id) values ('unauthenticated.PERFORMANCE_MEASUREMENTS'); insert into data_exposure(id, note,sql_template,db_id) values ('pDUSessionEstSR','pm_message', 'SELECT event.perf3gppFields.measDataCollection.measInfoList[1].measValuesList[1].measResults[1].sValue AS pDUSessionEstSR, from_unixtime(event.commonEventHeader.startEpochMicrosec/1000) AS timeStamp FROM unauthenticatedperformancemeasurements WHERE any_match(event.perf3gppFields.measDataCollection.measInfoList[1].measTypes.sMeasTypesList, e -> e like ''${id}'') AND event.commonEventHeader.startEpochMicrosec >= ${timeStamp}',2);

...

curl --header "Content-type: application/json" --request POST --data '{"hours":4,"id":"PDUSessionEstSR.00110010","timeStamp":"1606743157914"}' http://dl-des:1681/datalake/v1/exposure/pDUSessionEstSR -i 

5. KPI - MS :

Deployment Prerequisite/dependencies
  - DCAE and DMaaP pods should be up and running. 
  - PM mapper service should be running.

Deployment steps ::

 - Clone the OOM repo - git clone "https://gerrit.onap.org/r/oom"
 - Go to the oom/kubernetes/dcaegen2-services/components directory, which has kpi component charts
 - Execute the command : make dcae-kpi-ms ( This will push the charts to the local repo)
 - Install the component using the following command : helm install dev-kpi-ms dcae-kpi-ms --namespace onap --set global.masterPassword=guilin2021

To load policies into the pdp container ::

...

             "type":"list",
                   "required":true,
                   "entry_schema":{
                   "type":"policy.data.kpis_properties"
                    }
                }
		  
	  }
	},
	"policy.data.kpis_properties": {
      "derived_from": "tosca.nodes.Root",
      "properties": {
		     "measType":{
                    "type":"string",
                    "required":true
                },
			 "operation":{
                    "type":"string",
                    "required":true
                },
			"operands":{
                    "type":"string",
                    "required":true
                }
	  }
	}
	},
  "tosca_definitions_version": "tosca_simple_yaml_1_1_0"
}

kpipolicyinstance.json


Elite soft json viewer
{
  "name": "ToscaServiceTemplateSimple",
  "topology_template": {
    "policies": [
      {
        "com.Config_KPIMS_CONFIG_POLICY": {
		  "type": "onap.policies.monitoring.docker.kpims.app",
          "type_version": "1.0.0",
          "version": "1.0.0",
          "metadata": {
            "policy-id": "com.Config_KPIMS_CONFIG_POLICY",
            "policy-version": "1"
          },
          "name": "com.Config_KPIMS_CONFIG_POLICY",
          "properties": {
           "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": "RATIO",
				 "operands": ["RM.RegisteredSubNbrMean"]}
				 ]
			}, 
			{
			 "eventName": "perf3gpp_RnNode-Slicing_pmMeasResult",
			 "controlLoopSchemaType": "SLICE",
			 "policyScope": "resource=networkSlice;type=configuration",
			 "policyName": "configuration.dcae.microservice.kpi-computation",
			 "policyVersion": "v0.0.1",
			 "kpis": [{
				 "measType": "PDUSessionEstSR",
				 "operation": "RATIO",
				 "operands": ["SM.PDUSessionSetupSucc","SM.PDUSessionSetupReq"]}
				 ]
			}
			]
        }
      }
	  }
    ]
     },
  "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
  "version": "1.0.0"
}

deploykpipolicy.json

Elite soft json viewer
{
   "policies":[
      {
         "policy-id":"com.Config_KPIMS_CONFIG_POLICY",
         "policy-version":1
      }
   ]
}


To create the dmaap topic - unauthenticated.DCAE_KPI_OUTPUT ::

...

 curl -k https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_KPI_OUTPUT/c1/g1

...

7. RANSIM :

Follow the steps below to setup the Ransim environment:

  1. Clone the repo from : git clone https://gerrit.onap.org/r/integration/simulators/ran-simulator
  2. Import the latest SDNC certificate into ransim

    1. Download the SDNC cacerts from browser.

    2. Import the cacert file into the directory ran-simulator/ransim/docker/config/ransim/ and name it as 'jssecacerts'.(Sample step to import shown below)

      • keytool -import -noprompt -trustcacerts -alias SDNC -file <certsfile> -keystore /ransim/docker/config/ransim/jssecacerts -storepass changeit

  3. Go to the ran-simulator/ransim directory and build the project : JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install -P docker
  4. From docker folder, run the following after building the image locally and updating the SDNR IP address in the docker-compose file : docker-compose up
  5. Run the following command to start the RAN network slice simulation

    curl -X POST http://localhost:8081/ransim/api/StartRanSliceSimulation -i

    To access the logs:
    docker exec –ti ransim bash
    policy@ransim:/tmp/ransim-install$ tail -f /opt/app/policy/servers/ransim/logs/ransim-rest.log 
  6. Setup honeycomb (Refer HONEYCOMB section)
  7. You can update/add/delete data(throughput, PRBs, maxNoConns etc) in mariadb container(credentials in docker-compose file) if required before generation of PM data.
  8. Sample data to be loaded: ransim-intelligent-slicing-data.txt
  9. To view the CUCP honeycomb containers  logs:
    1. docker exec -ti cucpserver1 bash
    2. tail -f var/log/honeycomb/honeycomb.log
    3. docker exec -ti cucpserver2 bash
    4. tail -f var/log/honeycomb/honeycomb.log
  10. Check the folder(where SFTP setup is done) to view the generated PM data files.
  11. Access VES, data file collector, dmaap-dr, PM mapper, ml-prediction-ms and slice-analysis logs to verify.
  12. To manually generate PM data:
    1. curl -X POST -H "Content-Type:  text/plain" http://localhost:8081/ransim/api/GenerateIntelligentSlicingPmData -i
  13. To Stop PM data:
    1. curl -X POST -H "Content-Type:  text/plain" http://localhost:8081/ransim/api/stopIntelligentSlicingPmData -i

...

8. Honeycomb:

Repo URL: https://github.com/onap-oof-pci-poc/ran-sim

...

      2. Give chmod 777 to upload folder which will be created automatically in the home dir.

Demo Recording:

View file
nameUUi_Monitoring_new_KPI.mp4
height400