Versions Compared

Key

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

...

where modifynssi.json is, 
SLA MS - Policy

{
    "tosca_definitions_version": "tosca_simple_yaml_1_1_0",
    "topology_template": {
        "policies": [
            {
            "operational.modifynssi": {
               "type": "onap.policies.controlloop.operational.common.Drools",
               "type_version": "1.0.0",
               "version": "1.0.0",
               "name": "operational.modifynssi",
               "metadata": {
                  "policy-id": "operational.modifynssi"
               },
               "properties": {
                  "id": "ControlLoop-Slicing-116d7b00-dbeb-4d03-8719-d0a658fa735b",
                  "timeout": 1200,
                  "abatement": false,
                  "trigger": "unique-policy-id-1-modify-nssi",
                  "operations": [
                     {
                        "id": "unique-policy-id-1-modify-nssi",
                        "description": "Modify resource allocation for a slice subnet instance",
                        "operation": {
                           "actor": "SO",
                           "operation": "Modify NSSI",
                           "target": {
                              "targetType": "VNF"
                           }
                        },
                        "timeout": 1200,
                        "retries": 0,
                        "success": "final_success",
                        "failure": "final_failure",
                        "failure_timeout": "final_failure_timeout",
                        "failure_retries": "final_failure_retries",
                        "failure_exception": "final_failure_exception",
                        "failure_guard": "final_failure_guard"
                     }
                  ],
                  "controllerName": "usecases"
               }
            }
         }
        ]
    }
}


To push the policy:

curl --silent -k --user 'healthcheck: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,
SLA MS - Push the Policy

{
  "policies": [
    {
      "policy-id": "operational.modifynssi",
      "policy-version": 1
    }
  ]
}

ConfigDB:

Refer the below link for configDB setup:

Config DB setup

RANSIM and Honeycomb setup:

RANSIM :

Follow the steps below to setup the Ransim environment:

  1. Clone the repo from : git clone Download the configDb source files from https://gerritlf-onap.onapatlassian.orgnet/rwiki/integrationdownload/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 : attachments/16444009/configdb.tar?version=2&modificationDate=1631095492000&api=v2
  4. cd configdb (after extracting the files)
  5. Setup and run maridb container
    1. 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
  6. Navigate to project directory
    1. cd configdb/Config-DB-API-App
  7. Build the application
    1. JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install
    -P docker
  8. 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
  9. 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 
  10. Setup honeycomb (Refer HONEYCOMB section)
  11. 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.
  12. Run the following command to generate Closed Loop PM data: 
        curl -X POST http://localhost:8081/ransim/api/generateClosedLoopPmData -i
  13. Access the DU honeycomb containers to view the logs:
    1. docker container logs -f 110
  14. Check the folder(where SFTP setup is done) to view the generated PM data files.
  15. Access VES, data file collector, dmaap-dr, PM mapper and slice-analysis logs to verify.

 

Honeycomb:

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

Pre-requisite: SDNC & Ransim controller should be up and running.

Build Steps:

...

Step 1: Go to directory ~/ran-sim/hcsim-content/gnbsim
Step 2: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install -Dcheckstyle.skip

...

To run the Netconf Servers:

  1. Update ransim and honeycom IP address at
  2. Run the application
    1. JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn spring-boot:run &

RANSIM and Honeycomb setup:

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. Run the following command to generate Closed Loop PM data: 
        curl -X POST http://localhost:8081/ransim/api/generateClosedLoopPmData -i
  9. Access the DU honeycomb containers to view the logs:
    1. docker container logs -f 110
  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 and slice-analysis logs to verify.


 

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

Step 1: Go to directory ~/ran-sim/hcsim-content/gnbsim

...

      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:

  1. 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.

CPS and CPS-TBDMT:

CPS:

  1. git clone "https://gerrit.onap.org/r/cps
  2. cd cps/
  3. mvn clean install
  4. cd docker-compose/
  5. docker-compose up

CPS:-TBDMT:

  1. git clone "https://gerrit.onap.org/r/cps/cps-tbdmt
  2. cd cps-tbdmt/
  3. mvn clean install
  4. cd docker-compose/
  5. update cps & ncmp ip-address in application.yml
  6. 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!  --
Step 2: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/ mvn clean install -Dcheckstyle.skip

Step 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:

  1. 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)

         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:

  1. 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.


CPS and CPS-TBDMT:

CPS:

  1. git clone "https://gerrit.onap.org/r/cps
  2. cd cps/
  3. mvn clean install
  4. cd docker-compose/
  5. docker-compose up

CPS:-TBDMT:

  1. git clone "https://gerrit.onap.org/r/cps/cps-tbdmt
  2. cd cps-tbdmt/
  3. mvn clean install
  4. cd docker-compose/
  5. update cps & ncmp ip-address in application.yml
  6. docker-compose up (use the image built using the above steps in the docker-compose file)


CPS CONFIGURATION (DB, SCHEMAS, INITIAL DATA)

For CPS configuration, please refer to RAN Slicing - TBDMT Templates

In addition, you need to upload the following 3 templates too:


curl --location --request POST \
http://$CPS_TBDMT_IP:8080/cps/api/v1/dataspaces/E2EDemo/anchors?schema-set-name=ran-network \
-d anchor-name=ran-network-anchor

Uploading cps payload:

payload-ran-network.json
curl --location --user cpsuser:cpsr0cks! :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}'

curl --location --request POST \
http://$CPS_TBDMT_IP:8080/cps/api/v1/dataspaces/E2EDemo/anchors/ran-network-anchor/nodes \
--header 'Content-Type: application/json' \
-d @payload-ran-network.jsonUploading tbdmt-templates: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}'

curl --location --request POST \
http://$CPS_TBDMT_IP:8080/templates \
--header 'Content-Type: application/json' \
--data-raw '{"templateId": "get-nrcelldu-nearrtricby-configsnssai","model": "ran-network","requestType": "query-cps-path","xpathTemplate": "//sNSSAIList[@sNssai='\''{{sNssai}}'\'']/ancestor::NearRTRIC","includeDescendants": true}'

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}'

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}''']/ancestor::NearRTRIC","includeDescendants": true}'


AAI Configuration for CPS option (if only closed-loop is being demonstrated without E2E service creation):

Preload the SliceProfile into ransim-honeycomb 11 [Near RTRIC]

curl -X POST "https://{{sdnc}}:30267/rests/data/network-topology:network-topology/topology=topology-netconf/node=11/yang-ext:mount/ran-network:ran-network/NearRTRIC=11/attributes/sliceProfilesList=878f32c0-3677-4dbd-95a3-1f01d6c763c1"
-H "accept: */*"
-H "Content-Type: application/json"
-d "{\"sNSSAI\":\"01-3C5C90\",\"maxNumberofUEs\":1000,\"latency\":20,\"uLThptPerSlice\":100,\"dLThptPerSlice\":1000,\"maxNumberofConns\":100000,\"uEMobilityLevel\":\"stationary\",\"coverageAreaList\":[\"\"],\"resourceSharingLevel\":\"Shared\"}"


Change sdnc ip, sliceprofileid, snssai according to your configuration.


Further References:

Issues faced during the RAN Simulator set up are documented in Setup related issues and Integration Test of Closed Loop for Network Slicing .


Demo data file(if only closed-loop is being demonstrated without E2E service creation):

...