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
(Note: make sure you have setup up your maven config as described here.) - From docker folder, run the following after building the images locally : docker-compose up
- Access the GUI using the following url in the web browser: http://localhost:8081/ransimui/index.html
- Click ‘Start’ button to start the simulation and choose the "sample.json" file and click Configure. Wait till you see success message either in the logs or in the UI. (Might take 5-10 minutes to load data)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 - Refresh the page to see the cells.
- Setup honeycomb (Refer HONEYCOMB section). Click ‘Netconf Details’ to see the running netconf servers.
- Right click on cell Chn0005 (scroll to the very top right on the cell map to find it) and click Show Neighbors to view the neighboring cells.
- To trigger collision/confusion , right click on Chn0005 and click Modify Neighbors option. Add ‘,Chn0012,Chn0116,Chn0071’ as neighbours and submit. Refresh page.
Check netconf server ncserver1 logs to see FM notification. - To generate PM data: Click ‘Start’ button under PM data with the below values:
Bad HO metrics leading to neighbor blacklist
bad : Chn0009
poor : Chn0005
HONEYCOMB :
Follow the steps below to setup the honeycomb environment:
- Clone the repo from : git clone https://github.com/onap-oof-pci-poc/ran-sim
- Go to the ran-sim/hcsim-content/gnbsim directory and build the project : JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install -Dcheckstyle.skip
(Note: the project comes with it's own maven settings in ran-sim/hcsim-content/m2_settings.xml, that are required on top of the standard ONAP settings to build this. 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 imageStep 1: Go to directory ~/ran-sim/hcsim-content/gnbsim
Step 2: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install -Dcheckstyle.skipStep 3: Import the latest VES certificate into this directory gnbsim-distribution/ rename it as "jssecacerts"
Step 3: cp -r gnbsim-distribution/jssecacerts gnbsim-distribution/target/gnbsim-distribution-1.19.08-SNAPSHOT-hc/gnbsim-distribution-1.19.08-SNAPSHOT/
Step 4: cp -r gnbsim-distribution/honeycomb gnbsim-distribution/target/gnbsim-distribution-1.19.08-SNAPSHOT-hc/gnbsim-distribution-1.19.08-SNAPSHOT/
Step 5: cp -r gnbsim-distribution/Dockerfile gnbsim-distribution/target/gnbsim-distribution-1.19.08-SNAPSHOT-hc/gnbsim-distribution-1.19.08-SNAPSHOT/
Step 6: 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:
- Update ransim and honeycom IP address at ~/ran-sim/hcsim-content/gnbsim/honeycomb/hc/config/gnbsim.json and docker-compose files(step repeated for all hc, cucp, cuup, du folders)
2. Run the up.sh script in ran-sim/hcsim-content/gnbsim/honeycomb. (wait for all the honeycomb servers to come up)
3. Run the mount.sh script in ran-sim/hcsim-content/gnbsim/honeycomb.
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.htm
Troubleshooting Common Errors:
- Check if the hcIP(IPAddress of Honeycomb), hcPort(Port of Honeycomb), ransimIp(IPAddress of Ransim) and ransimPort(Ransim Port) in gnbsim.json and in mount.sh is accurate.
- After running honeycomb check ransim logs to see successful ping message, data sent to honeycomb or check SDNC restconf page if honeycomb is successfully mounted.
- http://localhost:8081/ransimui/index.html check the Netconf Details page in the UI to get the list of all honeycombs running(port to name mapping).
- To check honeycomb data:
- docker exec -ti <honecombContainerName> bash
- cat var/lib/honeycomb/persist/config/data.json
To bring down the containers give the commands delete-mounted-data.sh and then down.sh.
SDNC:
Check if all the pods are running using the cmd: kubectl get pods -n onap | grep sdnc
sdnc-oofpcipoc-api-dg.properties
- change the ransim-mounted to true
- restapi.cps.anchors.endpoint=${CPS_URL}/cps/api/v1/dataspaces/sondataspace/anchors
- restapi.cps.tbdmt.execute.endpoint=${CPS_TBDMT_URL}/execute/{schemaSet}/{templateId}
Give the cmd: kubectl exec -it dev-sdnc-0 -n onap bash
- Check if the dg's are loaded in /opt/onap/sdnc/svclogic/graphs/ranSliceapi
- Check the dg's logs in /opt/opendaylight/current/data/log/
CPS :
Follow the steps below to setup the CPS environment:
- Clone the repo from : https://gerrit.onap.org/r/admin/repos/cps
- Build the project – When building the project run from the root cps folder : mvn clean install
- From docker-compose folder, run the following after building the images locally : VERSION=latest DB_USERNAME=cps DB_PASSWORD=cps docker-compose up -d
- Create the dataspace, schemaset, anchor and datanode using the following CPS APIs.
Create Dataspace :
curl --location --user cpsuser:cpsr0cks! -H "Accept: application/json" -H "Content-Type: application/json" --request POST 'http://localhost:8883/cps/api/v1/dataspaces?dataspace-name=sondataspace'
Create Schemaset :
curl --location --user cpsuser:cpsr0cks! --request POST 'http://localhost:8883/cps/api/v1/dataspaces/sondataspace/schema-sets' --form 'file=@"ran-network.zip"' --form 'schema-set-name="ran-network-schemaset"'
curl --location --user cpsuser:cpsr0cks! --request POST 'http://localhost:8883/cps/api/v1/dataspaces/sondataspace/schema-sets' --form 'file=@"cps-ran-updated.zip"' --form 'schema-set-name="cps-ran-schemaset"'
Create Anchor :
curl --location --user cpsuser:cpsr0cks! --request POST 'http://localhost:8883/cps/api/v1/dataspaces/sondataspace/anchors?schema-set-name=ran-network-schemaset&anchor-name=ran-network-anchor'
curl --location --user cpsuser:cpsr0cks! --request POST 'http://localhost:8883/cps/api/v1/dataspaces/sondataspace/anchors?schema-set-name=cps-ran-schemaset&anchor-name=ran-cps-anchor'
Get all created anchors :
curl --location --user cpsuser:cpsr0cks! --request GET 'http://localhost:8883/cps/api/v1/dataspaces/sondataspace/anchors'
Create Datanode :
curl --location --user cpsuser:cpsr0cks! --request POST 'http://localhost:8883/cps/api/v1/dataspaces/sondataspace/anchors/ran-network-anchor/nodes' --header 'Content-Type: application/json' -d @ran-network.json
curl --location --user cpsuser:cpsr0cks! --request POST 'http://localhost:8883/cps/api/v1/dataspaces/sondataspace/anchors/ran-cps-anchor/nodes' --header 'Content-Type: application/json' -d @updated-csit-ran-data.json
CPS-TBDMT :
Follow the steps below to setup the CPS-TBDMT environment:
- Clone the repo from : cps/cps-tbdmt · Gerrit Code Review (onap.org)
Build the project – mvn clean install
Change the docker image name to avoid docker login issues : docker tag nexus3.onap.org:10003/onap/cps-tbdmt:latest cps-tbdmt:latest
From the docker-compose folder, edit the application.yml file
cpsCoreConfiguration url – change to VM's IP and the created dataspace's name (sondataspace)
schemaToAnchor mapping – provide the created schemaset and anchor name ( ran-network-schemaset : ran-network-anchor , cps-ran-schemaset : ran-cps-anchor )
- From the docker-compose folder, run the following to bring up the containers : docker-compose up -d
- Once the docker container is up, execute the following TBDMT-APIs
get-cell API :
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "get-cell",
"model": "cps-ran-schemaset",
"requestType": "get",
"xpathTemplate": "/cps-ran-schema/Regions[@regionId='\''{{regionId}}'\'']/cps-region-cell-mapping",
"includeDescendants": true
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/cps-ran-schemaset/get-cell' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"regionId":"10000000"
}
}' -i
get-nbr-list API :
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "get-nbr-list",
"model": "cps-ran-schemaset",
"requestType": "get",
"xpathTemplate": "/cps-ran-schema/Regions[@regionId='\''{{netw1000}}'\'']/cps-region-cell-mapping/NRCellCU[@idNRCellCU='\''{{cellId}}'\'']",
"includeDescendants": true, "transformParam":"NRCellCU"
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/cps-ran-schemaset/get-nbr-list' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"cellId":"13999"
}
}' -i
get-nbr-list1 API : (OOF)
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "get-nbr-list1",
"model": "cps-ran-schemaset",
"requestType": "get",
"xpathTemplate": "/cps-ran-schema/Regions[@regionId='\''{{regionId}}'\'']/cps-region-cell-mapping/NRCellCU[@idNRCellCU='\''{{idNRCellCU}}'\'']",
"includeDescendants": true, "transformParam":"NRCellCU"
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/cps-ran-schemaset/get-nbr-list1' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"regionId":"10000000",
"idNRCellCU":"13999"
}
}' -i
get-pci API :
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "get-pci",
"model": "ran-network-schemaset",
"requestType": "query-cps-path",
"xpathTemplate": "//NRCellDU[@idNRCellDU='\''{{cellId}}'\'']",
"includeDescendants": true,
"transformParam":"NRCellDU,attributes"
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/ran-network-schemaset/get-pci' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"cellId":"14427"
}
}' -i
get-pnf API :
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "get-pnf",
"model": "ran-network-schemaset",
"requestType": "query-cps-path",
"xpathTemplate": "//NRCellDU[@idNRCellDU='\''{{cellId}}'\'']/ancestor::GNBDUFunction",
"includeDescendants": true,
"transformParam":"GNBDUFunction"
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/ran-network-schemaset/get-pnf' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"cellId":"14427"
}
}' -i
get-nearrtric-by-idgnbdufunction :
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "get-nearrtric-by-idgnbdufunction",
"model": "ran-network-schemaset",
"requestType": "query-cps-path",
"xpathTemplate": "//GNBDUFunction/idGNBDUFunction[text()='\''{{idGNBDUFunction}}'\'']/ancestor::NearRTRIC",
"includeDescendants": true,
"transformParam":"NearRTRIC,idNearRTRIC"
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/ran-network-schemaset/get-nearrtric-by-idgnbdufunction' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"idGNBDUFunction": "22"
}
}' -i
get-nearrtric-by-idgnbcucpfunction :
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "get-nearrtric-by-idgnbcucpfunction",
"model": "ran-network-schemaset",
"requestType": "query-cps-path",
"xpathTemplate": "//GNBCUCPFunction/idGNBCUCPFunction[text()='\''{{idGNBCUCPFunction}}'\'']/ancestor::NearRTRIC",
"includeDescendants": true,
"transformParam":"NearRTRIC,idNearRTRIC"
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/ran-network-schemaset/get-nearrtric-by-idgnbcucpfunction' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"idGNBCUCPFunction": "cucpserver1"
}
}' -i
put-nrpci-nrcelldu :
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "put-nrpci-nrcelldu",
"model": "ran-network-schemaset",
"requestType": "patch",
"xpathTemplate": "/ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBDUFunction[@idGNBDUFunction='\''{{idGNBDUFunction}}'\'']/NRCellDU[@idNRCellDU='\''{{idNRCellDU}}'\'']",
"includeDescendants": true
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/ran-network-schemaset/put-nrpci-nrcelldu' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"idNearRTRIC":"11",
"idGNBDUFunction":"22",
"idNRCellDU":"Chn0005"
},
"payload": {
"attributes":{"nRPCI":3}
}
}' -i
put-nrpci-nrcelldu :
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "put-nrpci-nrcelldu",
"model": "ran-network-schemaset",
"requestType": "patch",
"xpathTemplate": "/ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBDUFunction[@idGNBDUFunction='\''{{idGNBDUFunction}}'\'']/NRCellDU[@idNRCellDU='\''{{idNRCellDU}}'\'']",
"includeDescendants": true
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/ran-network-schemaset/put-nrpci-nrcelldu' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"idNearRTRIC":"11",
"idGNBDUFunction":"22",
"idNRCellDU":"Chn0005"
},
"payload": {
"attributes":{"nRPCI":3}
}
}' -i
put-ho-nrcellrelation :
curl --location --request POST 'http://localhost:8080/templates' --header 'Content-Type: application/json' --data-raw '{
"templateId": "put-ho-nrcellrelation",
"model": "ran-network-schemaset",
"requestType": "patch",
"xpathTemplate": "/ran-network/NearRTRIC[@idNearRTRIC='\''{{idNearRTRIC}}'\'']/GNBCUCPFunction[@idGNBCUCPFunction='\''{{idGNBCUCPFunction}}'\'']/NRCellCU[@idNRCellCU='\''{{idNRCellCU}}'\'']/NRCellRelation[@idNRCellRelation='\''{{idNRCellRelation}}'\'']",
"includeDescendants": true
}' -i
To verify the created template :
curl --location --request POST 'http://localhost:8080/execute/ran-network-schemaset/put-ho-nrcellrelation' --header 'Content-Type: application/json' --data-raw '{
"inputParameters": {
"idNearRTRIC":"11",
"idGNBCUCPFunction":"ncserver1",
"idNRCellCU":"Chn0003",
"idNRCellRelation":"Chn0008"
},
"payload": {
"attributes":{"nRTCI":2,"isHOAllowed":true}
}
}' -i
POLICY :
There following control policies that are being used in the usecase. They have to be created and pushed into the policy.
Log in to policy-pdp container.
Execute the following commands:
Create and push Modify Config policy.
Modify Config policy |
---|
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 @pci.json 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 @pci_push.json |
Create and push Modify Config ANR policy.
Modify Config ANR policy |
---|
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 @son.json 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 @son_push.json |
Create and push PCI-controlloop-guard(Controlloop-denial) policy:
PCI-guard |
---|
curl -k --silent --user 'policyadmin:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @pciBson.json 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 @pciBson_push.json |
Create and push ANR-controlloop-guard policy:
ANR-guard |
---|
curl -k --silent --user 'policyadmin:zb!XztG34' -X POST "https://policy-api:6969/policy/api/v1/policytypes/onap.policies.controlloop.guard.coordination.FirstBlocksSecond/versions/1.0.0/policies" -H "Accept: application/json" -H "Content-Type: application/json" -d @sonBpci.json 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 @sonBpci_push.json |
SON-HANDLER :
Configure the SON-Handler with the below CPS details and then deploy.
Edit this file oom/kubernetes/dcaegen2-services/components/dcae-son-handler.values.yaml
- cps.username: cpsuser
- cps.password: cpsr0cks!
- sonhandler.clientType: CPS
- cps.service.url: http://<cps-tbdmt-ip>:8080
- cps.get.cell.data.url: execute/cps-ran-schemaset/get-cell-data
- cps.get.nbr.list.url: execute/cps-ran-schemaset/get-nbr-list
- cps.get.pci.url: execute/ran-network-schemaset/get-pci
- cps.get.pnf.url: execute/ran-network-schemaset/get-pnf
DMAAP :
Steps for creating dmaap topics
The following dmaap topics need to be present in the running DMAAP instance:
1.PCI-NOTIF-TOPIC-NGHBR-LIST-CHANGE-INFO
2.unauthenticated.SEC_FAULT_OUTPUT
3.unauthenticated.SEC_MEASUREMENT_OUTPUT
4.DCAE_CL_RSP
The topics can be added by logging into the message-router-kafka container and executing the following command:
Create Topic |
---|
curl --header "Content-type: application/json" --request POST --data '{"owner": "","txenabled": false,"topicName": "<topic-name>"}' http://<message-router-ip>:3904/topics/create |
OOF :
Configure the OOF with the below CPS details and then deploy.
Edit this file - oom/kubernetes/oof/values.yaml
- configClientType: cps
- # cps api
cps:
cpsUsername: cpsuser
cpsPassword: cpsr0cks!
cpsUrl: http://<cps-tbdmt-ip>:8080/execute
cpsCellListUrl: 'cps-ran-schemaset/get-cell'
cpsNbrListUrl: 'cps-ran-schemaset/get-nbr-list1'
1 Comment
Paulo Duarte
Hi,
I am getting some errors during the ran-sim/hcsim-content/gnbsim build. I have used the settings.xml provided but seems the repository is unavailable.
This is the error I am getting during the build:
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.wipro.www:gnbsim-aggregator:1.19.08-SNAPSHOT: Could not transfer artifact io.fd.honeycomb:honeycomb-aggregator:pom:1.19.08-SNAPSHOT from/to fd.io-snapshot- (https://nexus.fd.io/content/repositories/fd.io.snapshot/): transfer failed for https://nexus.fd.io/content/repositories/fd.io.snapshot/io/fd/honeycomb/honeycomb-aggregator/1.19.08-SNAPSHOT/honeycomb-aggregator-1.19.08-SNAPSHOT.pom, status: 502 Bad Gateway and 'parent.relativePath' points at wrong local POM @ line 19, column 11
Any suggestion how to solve this?
Thanks,