Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

This page is being edited.....


This page describes how to get the Guilin release version of Non-RT RIC up and running locally with two separate Near-RT RIC simulator docker containers providing OSC_2.1.0 version of A1 interface.

All four components of the Non-RT RIC (from three different repos) run inside docker containers and communicate via a docker network. Details of the architecture can be found from Guilin Release page.

  • Project Requirements

  • Build Code

    • Build nonrtric containers

      • Configure policy-agent

      • Build the code and create docker images

    • Build near-rt-ric-simulator container

      • Create docker image

    • Build NONRTRIC / A1 Policy control panel container

      • Verify controlpanel configuration

      • Build the code and create docker image

  • Run A1 Controller Docker Container

    • Open Daylight GUI

  • Run Near-RT RIC A1 Simulator Docker Containers

  • Run Policy-agent Docker Container

    • policy-agent Swagger API

  • Run Non-RT RIC Control Panel Docker Container

    • Open NONRTRIC / A1 Policy Control Panel UI

Project Requirements

  • Java 11 (make sure that JAVA_HOME environment variable points to correct Java version)

  • Maven 3.6

  • Docker and docker-compose (latest)

Build Code

Build nonrtric containers

  • Download the nonrtric repo, guilin branch: 

     git clone "https://gerrit.onap.org/r/ccsdk/oran" -b guilin

Configure policy-agent a.k.a Policy Management Service

To support local test with two separate Near-RT RIC simulator instances:  

  • Update the existing oran/a1-policy-management/config/application_configuration.json with the configuration below

  • The controller hostname and port values come from and must match those defined in nonrtric/sdnc-a1-controller/oam/installation/src/main/yaml/docker-compose.yml. The port for http is 8181 and for https XXXX

  • Any defined ric host names (in the name and baseUrl for each ric) must match the given docker container names in Near-RT RIC simulator startup - port is always the simulator's internal 8085 for http or 8185 for https

application_configuration.yaml


application-configuration.yaml
{
   "config": {
      "//description": "Application configuration",
      "controller": [
         {
            "name": "controller1",
            "baseUrl": "http://a1-controller-container:8181",
            "userName": "admin",
            "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
         }
      ],
      "ric": [
         {
            "name": "ric1",
            "baseUrl": "http://ric1:8085/",
            "controller": "controller1",
            "managedElementIds": [
               "kista_1",
               "kista_2"
            ]
         },
                  {
            "name": "ric2",
            "baseUrl": "http://ric2:8085/",
            "controller": "controller1",
            "managedElementIds": [
               "kista_3",
               "kista_4"
            ]
         }
      ]
   }
}


Build the code and create docker images

To build docker image of the policy management service:

cd oran
mvn clean install -Dmaven.test.skip=true
docker images

If the build is successfull an image with following name and tag shall be built, use the command 'docker images' to view the images in the local docker registry.

onap/ccsdk-oran-a1policymanagementservice:1.0.2-SNAPSHOT

Note, the image for the a1-controller cannot be built locally unless all the images it depends on are built, so the latest nexus available image from the nexus repository is used instead.

Build near-rt-ric-simulator container

Download the near-rt-ric-simulator repo (defaults to master branch - no guilin branch exists): 

     git clone "https://gerrit.o-ran-sc.org/r/sim/a1-interface"

Create docker image

To create docker image near-rt-ric-simulator (note that the given image name must match the name given in docker startup later):

cd a1-interface/near-rt-ric-simulator
docker build -t near-rt-ric-simulator:latest .
docker images

If the build is successfull an image with following name and tag shall be built, use the command 'docker images' to view the images in the local docker registry.

near-rt-ric-simulator:latest

Build NONRTRIC / A1 Policy control panel container

Download the nonrtric repo (defaults to master branch - no guilin branch exists): 

     git clone "https://gerrit.o-ran-sc.org/r/portal/nonrtric-controlpanel"

Verify controlpanel configuration

(warning) Note that nonrtric-controlpanel/webapp-backend/src/main/resources/application.properties default property value policycontroller.url.prefix = http://policy-agent-container:8081 assumes that policy agent is started with name policy-agent-container and exposes port 8081 (as is done below)! 

Build the code and create docker image

cd nonrtric-controlpanel
mvn clean install -Dmaven.test.skip=true
docker images

If the build is successfull an image with following name and tag shall be built, use the command 'docker images' to view the images in the local docker registry.

o-ran-sc/nonrtric-controlpanel:2.0.0-SNAPSHOT

Build A1 Controller

A1 Policy Adapter is a feature developed within CCSDK which is then installed in SDNC Karaf Server. To build & run the A1 Adapter, you need to build the ccsdk & sdnc repo's.

The A1 Policy provides a Northbound Interface for A1 operations to do policy management in Near-RealTime RICs.

After you download the ccsdk/oran repo, build the project.

cd a1-adapter

mvn clean install -Dmaven.test.skip=true

After you build the A1 adapter artefacts, down below CCSDK repo's and build it,

ProjectRepoGerrit LinkCommandNote
CCSDKccsdk/parentgit clone "https://gerrit.onap.org/r/ccsdk/parent" -b guilinmvn clean install -Dmaven.test.skip=trueIf the parent artefacts are not release you need to build this repo in order to build other ccsdk repo's (Including ccsdk/oran/a1-adapter)
CCSDKccsdk/featuregit clone "https://gerrit.onap.org/r/ccsdk/features" -b guilinmvn clean install -Dmaven.test.skip=true
CCSDKccsdk/distributiongit clone "https://gerrit.onap.org/r/ccsdk/distribution" -b guilinmvn clean install -Dmaven.test.skip=true -PdockerCreates the CCSDK docker image
SDNCsdnc/northboundgit clone "https://gerrit.onap.org/r/sdnc/northbound" -b guilinmvn clean install -Dmaven.test.skip=true
SDNCsdnc/oamgit clone "https://gerrit.onap.org/r/sdnc/oam" -b guilinmvn clean install -Dmaven.test.skip=true -PdockerCreates the SDNC docker image. Make sure you refer the right docker image version the pom file.(eg: you may need to update ccsdk.docker.version for onap/ccsdk-ansible-server-image from 1.0-STAGING-latest to 1.0-SNAPSHOT-latest)

Once you build all the projects, you will see the CCSDK & SDNC docker images,

onap/sdnc-image 2.1-SNAPSHOT-latest f902a050eead 7 weeks ago 2.44GB
onap/sdnc-image 2.1.0-SNAPSHOT-20200924T135831Z f902a050eead 7 weeks ago 2.44GB
onap/sdnc-image 2.1.0-SNAPSHOT-latest f902a050eead 7 weeks ago 2.44GB
onap/sdnc-image latest f902a050eead 7 weeks ago 2.44GB

Run A1 Policy Adapter

To view the A1 policy operations, you need to run the SDNC docker image. This image has few other docker image dependency but not all are important for A1 policy testing. To bring up the sdnc container for A1 Policy Management testing you can do below change to the docker compose file,

In sdnc/oam repo 

cd sdnc/oam/installation/src/main/yaml
docker-compose up 

Edit the docker compose file and keep only sdnc & maria db images. Rest of the images are not necessary for A1 Policy testing. However if you want to change the DG and run your own DG, you may need to keep the Directed Graph image.

The SDNC image will take a while to install all the features into Karaf Server. You can check the logs of the server at /opt/opendaylight/data/log/karaf.log

The A1 Policy in ODL GUI can be accessed by this URL,

http://localhost:8282/apidoc/explorer/index.html
Username/password: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U

Run Near-RT RIC A1 Simulator Docker Containers

  • Start docker containers for each ric defined in nonrtric/policy-agent/config/application_configuration.json in previous steps (in this example for ric1 and ric2) and providing A1 interface version OSC_2.1.0 with the following commands:: 

    docker run -p 8085:8085 -p 8185:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric1 near-rt-ric-simulator:latest
    docker run -p 8086:8085 -p 8186:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric2 near-rt-ric-simulator:latest
  • Change directory:  

    cd a1-interface/near-rt-ric-simulator/test/OSC_2.1.0/jsonfiles
  • Put an example policy_type into the started near-rt-ric-simulator instances by running these curl commands (in this example to ric1 exposed to port 8085 and ric2 exposed to port 8086):

    curl -X PUT -v "http://localhost:8085/a1-p/policytypes/123" -H "accept: application/json" \
     -H "Content-Type: application/json" --data-binary @pt1.json
    curl -X PUT -v "http://localhost:8086/a1-p/policytypes/123" -H "accept: application/json" \
     -H "Content-Type: application/json" --data-binary @pt1.json

Run Policy-agent Docker Container

  • Run docker container using this command once A1 Controller and simulators have been fully started and optionally set the logging to trace (debug)

    docker run -p 8081:8081 --network=nonrtric-docker-net --name=policy-agent-container o-ran-sc/nonrtric-policy-agent:2.0.0-SNAPSHOT
    curl -X POST  http://localhost:8081/actuator/loggers/org.onap.ccsdk.oran.a1policymanagementservice  -H "Content-Type:application/json" -d {\"configuredLevel\":\"trace\"}
  • Once policy-agent is up and running, it establishes connections to all configured Near-RT RICs

  • (Note: In Bronze Maintenance version it will be possible to point docker to use a different configuration file than the version included inside the container - e.g. to add additional near-RT-RICs)

  • If policy-agent-container is configured to log at DEBUG level, the following logs should appear to log to show that connection to the configured RICs has been established successfully via A1 Controller.

SDNC A1 Client

SDNC A1 Client
$ docker logs policy-agent-container | grep "protocol version" 
2020-04-17 11:10:11.357 DEBUG 1 --- [or-http-epoll-1] o.o.policyagent.clients.A1ClientFactory : Established protocol version:SDNC_OSC_OSC_V1 for Ric: ric1 
2020-04-17 11:10:11.387 DEBUG 1 --- [or-http-epoll-1] o.o.policyagent.clients.A1ClientFactory : Established protocol version:SDNC_OSC_OSC_V1 for Ric: ric2

 policy-agent Swagger API

For troubleshooting/verification purposes you can view/access the policy-agent swagger API from url: http://localhost:8081/swagger-ui.html

Run Non-RT RIC Control Panel Docker Container

Run docker container using this command: 

docker run -p 8080:8080 --network=nonrtric-docker-net o-ran-sc/nonrtric-controlpanel:2.0.0-SNAPSHOT

Open NONRTRIC / A1 Policy Control Panel UI

Dashboard UI can be accessed by pointing the web-browser to this URL: 

http://localhost:8080/
  • No labels