Smart Intent Guarantee based on Closed-loop
Manual Configuration:
This configuration is required to enable the ranSlice features in SDN-R.
SDNC:
Create the below environment variable in the helm chart at kubernetes/sdnc/templates/statefulset.yaml (for sdnc container).
+ - name: SDNR_NORTHBOUND
+ value: "{{ .Values.config.sdnr.enabled | default "false"}}"
Make the SDNC chart and then deploy.
Execute the following command to log into the sdnc container
kubectl exec -it dev-sdnc-0 bash
Once in the docker container, edit the properties file /opt/onap/ccsdk/data/properties/ran-slice-api-dg.properties
update the following flag to true.
ransim-mounted=true
configdb-deployed=false (set to true if configDB is used)
cps-deployed=true (set to true if cps is used)
Update IP address for ConfigDB:
configdb.url=${CONFIG_DB_URL:-http://<IPAddress>:8086/api/sdnc-config-db/v4}
Update IP address for CPS-TBDMT:
restapi.cps.anchors.endpoint=${CPS_URL:-http://<IPAddress>:8883}/cps/api/v1/dataspaces/E2EDemo/anchors
POLICY:
Login to the policy-drools-pdp container and check if the value 'actor.service.SO.operations.Modify\ NSSI.path=3gppservices/v1/modify' is present in the below file:
kubectl exec -ti -n onap dev-policy-drools-pdp-0 sh
/opt/app/policy/config/event-manager.properties
If value not present update the policy-drools-pdp-image to this version'/onap/policy-pdpd-cl:1.10.2-20220413T1305' or any version after '1.10.2'
Policies needed:
Execute these curl requests from any of the running pods.
Policy Creation:
curl -k --silent --user 'policyadmin:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.controlloop.operational.common.Drools/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @modifynssi.json
where modifynssi.json is,
|
To push the policy:
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 @push_modifynssi.json
where push_modifynssi.json is,
|
Deployment Prerequisite/dependencies
DMaaP, Policy, SO and SDNC pods should be up and running.
VES, PM mapper and DataFile Collector service, slice-analysis-ms should be running.
ConfigDB container should be running(if configDb is disabled in slice-analysis, CPS and CPS-TBDMT containers should be running).
ConfigDB:
Download the configDb source files from configdb-3.0.0.zip
cd configdb (after extracting the files)
Setup and run maridb container
sudo docker run -p 3306:3306 -v $PWD/SDNC_ConfigDB_SchemaV4.sql:/docker-entrypoint-initdb.d/SDNC_ConfigDB_SchemaV4.sql --name mariadb -e MYSQL_ROOT_PASSWORD=password -d mariadb
Navigate to project directory
cd configdb/Config-DB-API-App
Build the application
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install
Run the application
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn spring-boot:run &
Run this script to load sample data config_requests_script_intelligent_slicing.sh
CPS and CPS-TBDMT:
CPS:
git clone "https://gerrit.onap.org/r/cps"
cd cps/
mvn clean install
cd docker-compose/
docker-compose up
CPS-TBDMT:
git clone "https://gerrit.onap.org/r/cps/cps-tbdmt"
cd cps-tbdmt/
mvn clean install
cd docker-compose/
update cps & ncmp ip-address in application.yml
cps-tbdmt/docker-compose/application.yml should have the below mapping under the section schemaToAnchor:
schemaToAnchor:
ran-coverage-area: coverage-area-onap
e2e-cavsta-schemaset: e2e-cavsta1
CSIT-SchemaSet: CSIT-Anchor
ns-schemaset: ns-anchor
ran-network: 11
ran-inventory: ran-inventory-anchor
docker-compose up (use the image built using the above steps in the docker-compose file)
Creating dataspace:
curl --location --user cpsuser:cpsr0cks! -H "Accept: application/json" -H "Content-Type: application/json" \
--request POST \
http://$CPS_IP:8080/cps/api/v1/dataspaces?dataspace-name=E2EDemo
Creating schema set:
ran-network.zip
curl --location --user cpsuser:cpsr0cks! \
--request POST \
http://$CPS_IP:8080/cps/api/v1/dataspaces/E2EDemo/schema-sets --form 'file=@"ran-network.zip"' --form 'schema-set-name="ran-network"'
Creating anchor:
curl --location --user cpsuser:cpsr0cks! --request POST \
http://$CPS_IP:8080/cps/api/v1/dataspaces/E2EDemo/anchors?schema-set-name=ran-network \
-d anchor-name=11
Uploading cps sample data:
payload-ran-network.json
curl --location --user cpsuser:cpsr0cks! --request POST \
http://$CPS_IP:8080/cps/api/v1/dataspaces/E2EDemo/anchors/11/nodes \
--header 'Content-Type: application/json' \
-d @payload-ran-network.json
ran-inventory-sample-data.json
curl --location --user cpsuser:cpsr0cks! --request POST \
http://$CPS_IP:8080/cps/api/v1/dataspaces/E2EDemo/anchors/ran-inventory-anchor/nodes \
--header 'Content-Type: application/json' \
-d @ran-inventory-sample-data.json
Uploading tbdmt-templates:
curl --location --request POST \
http://$CPS_TBDMT_IP:8080/templates \
--header 'Content-Type: application/json' \
--data-raw '{"templateId": "get-nearrtric-config","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::NearRTRIC","includeDescendants": true,"transformParam":"NearRTRIC"}'
curl --location --request POST \
http://$CPS_TBDMT_IP:8080/templates \
--header 'Content-Type: application/json' \
--data-raw '{"templateId": "get-gnbdufunction-by-snssai","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::GNBDUFunction","includeDescendants": true,"transformParam":"GNBDUFunction"}'
curl --location --request POST \
http://$CPS_TBDMT_IP:8080/templates \
--header 'Content-Type: application/json' \
--data-raw '{"templateId": "get-nrcelldu-by-snssai","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::NearRTRIC","includeDescendants": true,"transformParam":"NearRTRIC"}'
curl --location --request POST\
http://$CPS_TBDMT_IP:8080/templates \
--header 'Content-Type: application/json'\
--data-raw '{
"templateId": "get-plmnid","model": "ran-inventory","requestType": "query-cps-path","xpathTemplate":
"//sliceProfilesList[@sliceProfileId='\''{{sliceProfileId}}'\'']","includeDescendants": true,"transformParam":"sliceProfilesList,pLMNIdList"}'
curl --location --request POST\
http://$CPS_TBDMT_IP:8080/templates\
--header 'Content-Type: application/json'\
--data-raw '{"templateId": "patch-configData","model": "ran-network","requestType": "put","xpathTemplate":
"/ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/attributes/pLMNInfoList[@mcc='\''{{mcc}}'\'' and @mnc='\''{{mnc}}'\'']/sNSSAIList[@sNssai='\''{{sNssai}}'\'']","includeDescendants": true}'
curl --location --request POST 'http:///$CPS_TBDMT_IP:8080templates' \
--header 'Content-Type: application/json' \
--data-raw '{
"templateId": "patch-cell-configData","model": "ran-network","requestType": "patch","xpathTemplate": "/ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBCUCPFunction[@idGNBCUCPFunction='\''{{idGNBCUCPFunction}}'\'']/NRCellCU[@idNRCellCU='\''{{idNRCellCU}}'\'']/attributes/pLMNInfoList[@mcc='\''{{mcc}}'\'' and @mnc='\''{{mnc}}'\'']/sNSSAIList[@sNssai='\''{{sNssai}}'\'']","includeDescendants": true}'
RANSIM and Honeycomb setup:
RANSIM :
Follow the steps below to setup the Ransim environment:
Clone the repo from : git clone https://gerrit.onap.org/r/integration/simulators/ran-simulator
Import the latest SDNC certificate into ransim
Download the SDNC cacerts from browser.
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
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
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
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.logSetup honeycomb (Refer HONEYCOMB section)
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.
Sample data to be loaded: ransim-intelligent-slicing-data.txt
After starting the ml-prediction-ms container access the below logs to view the generated Intelligent slicing PM data.
To view the CUCP honeycomb containers logs:
docker exec -ti cucpserver1 bash
tail -f var/log/honeycomb/honeycomb.log
docker exec -ti cucpserver2 bash
tail -f var/log/honeycomb/honeycomb.log
Check the folder(where SFTP setup is done) to view the generated PM data files.
Access VES, data file collector, dmaap-dr, PM mapper, ml-prediction-ms and slice-analysis logs to verify.
To manually generate PM data:
curl -X POST -H "Content-Type: text/plain" http://localhost:8081/ransim/api/GenerateIntelligentSlicingPmData -i
To Stop PM data:
curl -X POST -H "Content-Type: text/plain" http://localhost:8081/ransim/api/stopIntelligentSlicingPmData -i
Honeycomb:
Repo URL: https://github.com/onap-oof-pci-poc/ran-sim
Pre-requisite: SDNC & Ransim controller should be up and running.
Build Steps:
If there is a new yang model, build the gnbsim-api with new yang model
Step 1: copy the new yang model to ~/ran-sim/hcsim-content/gnbsim/gnbsim-api/src/main/yang
Step 2: Go to directory ~/ran-sim/hcsim-content/gnbsim/gnbsim-api/
Step 3: Issue the build command "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install -Dcheckstyle.skip"
For code changes in gnbsim-impl directory
Step 1: Do necessary code changes in gnbsim-impl
Step 2: Issue the build command "JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install -Dcheckstyle.skip"
Once the mvn build is done, build the docker image
Go to directory ~/ran-sim/hcsim-content/gnbsim
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install -Dcheckstyle.skip
Import the latest VES certificate into this directory gnbsim-distribution/
Download certificate from VES url https://<ipAddress>30417/eventListener/v7
cd gnbsim/gnbsim-distribution/
keytool -import -noprompt -trustcacerts -alias dcae -file <certsfile downloaded from VES URL> -keystore jssecacerts -storepass changeit
keytool -importkeystore -srckeystore jssecacerts -srcstoretype pkcs12 -srcalias dcae -destkeystore jssecacerts -deststoretype jks -deststorepass changeit -destalias dcae
cp -r gnbsim-distribution/jssecacerts gnbsim-distribution/target/gnbsim-distribution-1.19.08-SNAPSHOT-hc/gnbsim-distribution-1.19.08-SNAPSHOT/
cp -r gnbsim-distribution/honeycomb gnbsim-distribution/target/gnbsim-distribution-1.19.08-SNAPSHOT-hc/gnbsim-distribution-1.19.08-SNAPSHOT/
cp -r gnbsim-distribution/Dockerfile gnbsim-distribution/target/gnbsim-distribution-1.19.08-SNAPSHOT-hc/gnbsim-distribution-1.19.08-SNAPSHOT/
docker build -t gn gnbsim-distribution/target/gnbsim-distribution-1.19.08-SNAPSHOT-hc/gnbsim-distribution-1.19.08-SNAPSHOT/
Cross check the docker image
docker images | grep gn
To run the Netconf Servers:
cd ran-sim/hcsim-content/gnbsim/honeycomb
Update Ransim(ransimIp), honeycomb(hcIp) and VES IP address at hc/config/gnbsim.json
{
"ransimIp": "<IPAddress>",
"ransimPort": 8081,
"hcIp": "<IPAddress>",
"hcPort": 2850,
"endpoint": "ransim/RansimAgent",
"vesEventListenerUrl": "https://<IPAddress>:30417/eventListener/v7"
}
Update honeycomb IP address at hc/docker-compose.yml file.
Step 2(Updating IP Address in config/gnbsim.json) and Step 3(Updating IP Address in docker-compose.yml file) is repeated for all folders (hc, hc-1, cucp1, cucp2, cuup1,cuup2, du1, du2, du3, du4, du5, du6)
2. Run the up.sh script in ran-sim/hcsim-content/gnbsim/honeycomb. (wait for all the honeycomb servers to come up)
After execution of the above script, these servers will be mounted in SDNC(check ransim and SDNR logs if the mount request is successful for all the servers).
Access the restconf page to view the mounted servers: https://<WorkerVMIpAddress>:30267/apidoc/explorer/index.html
Setup SFPT:
Run the below docker command in the VM where you have setup the netconf servers:
docker run -v /home/$USER/upload:/home/$USER/sftptest/upload -p 2222:22 -d atmoz/sftp $USER:pass:1001
2. Give chmod 777 to upload folder which will be created automatically in the home dir.
ML-prediction-ms:
git clone "https://gerrit.onap.org/r/dcaegen2/services"(use patchset ml-prediction-ms if code not merged)
cd services/components/ml-prediction-ms
Update Ransim, Dmaap and ConfigDB IPAddress/Port details in ml-prediction-ms.config
Build docker image using: 'docker build -t ml-prediction-ms:latest .'
Run the ml-prediction-ms container.
docker run -d --name ml-prediction-ms -p "5000:5000" ml-prediction-ms:latest
To view the logs:
docker exec -ti ml-prediction-ms bash
tail -f IntelligentSliceMl.log
NOTE: Use sample data attached under CONFIGDB, RANSIM and CPS if E2E communication service is not done.