This page describes how to get the release B version of NonRTRIC up and running locally with two separate NearRT-RIC simulator docker containers providing OSC_2.1.0 version of A1 interface.
All four components of the NonRTRIC (from three different repos) run inside docker containers and communicate via a docker network. Details of the architecture can be found from Release B page.
Java 11 (make sure that JAVA_HOME environment variable points to correct Java version)
Maven 3.6
Docker and docker-compose (latest)
git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
To support local test with two separate NearRT-RIC simulator instances the following modifications must be done:
{ "config": { "//description": "Application configuration", "ric": [ { "name": "ric1", "baseUrl": "http://ric1:8085/", "managedElementIds": [ "kista_1", "kista_2" ] }, { "name": "ric2", "baseUrl": "http://ric2:8085/", "managedElementIds": [ "kista_3", "kista_4" ] } ] } } |
To build docker images of sdnc-a1-controller and policy-agent:
cd nonrtric mvn clean install -Dmaven.test.skip=true |
Download the near-rt-ric-simulator repo (defaults to master branch):
git clone "https://gerrit.o-ran-sc.org/r/sim/a1-interface"
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 . |
Download the nonrtric repo (defaults to master branch):
git clone "https://gerrit.o-ran-sc.org/r/portal/nonrtric-controlpanel"
Note that nonrtric/dashboard/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)!
cd nonrtric-controlpanel mvn clean install -Dmaven.test.skip=true |
cd nonrtric/sdnc-a1-controller/oam/installation/src/main/yaml
docker-compose up a1-controller
docker exec -it a1-controller-container sh
cd opt/opendaylight/data/log/
tail -f karaf.log
Run Near-RT-RIC Simulator Docker Containers
docker run -p 8085:8085 -e A1_VERSION=OSC_2.1.0 --network=nonrtric-docker-net --name=ric1 near-rt-ric-simulator:latest
docker run -p 8086:8085 -e A1_VERSION=OSC_2.1.0 --network=nonrtric-docker-net --name=ric2 near-rt-ric-simulator:latest
cd a1-interface/near-rt-ric-simulator/test/OSC_2.1.0/jsonfiles
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
docker run -p 8081:8081 --network=nonrtric-docker-net --name=policy-agent-container o-ran-sc/nonrtric-policy-agent:1.0.0-SNAPSHOT
Once policy-agent is up and running, it establishes connections to all configured NearRT-RICs. It has multiple A1 clients to select from and selection is done dynamically based on connectivity. Selection of A1 client is not clearly visible for user, but policy-agent logs can be grepped to see which client was selected.
The two grepping examples below show how either SDNC_OSC A1 client or STD A1 client was selected - these translate into options A and B described on the Testing End to End call in release B page.
$ docker logs policy-agent | grep "protocol version" 2020-04-03 12:20:00.239 DEBUG 1 --- [or-http-epoll-1] o.o.policyagent.clients.A1ClientFactory : Established protocol version:OSC_V1 for Ric: ric1 2020-04-03 12:20:00.248 DEBUG 1 --- [or-http-epoll-2] o.o.policyagent.clients.A1ClientFactory : Established protocol version:OSC_V1 for Ric: ric2 |
$ docker logs policy-agent | grep "protocol version" 2020-04-03 12:20:00.239 DEBUG 1 --- [or-http-epoll-1] o.o.policyagent.clients.A1ClientFactory : Established protocol version:STD_V1 for Ric: ric1 2020-04-03 12:20:00.248 DEBUG 1 --- [or-http-epoll-2] o.o.policyagent.clients.A1ClientFactory : Established protocol version:STD_V1 for Ric: ric2 |
Run docker container using this command:
docker run -p 8080:8080 --network=nonrtric-docker-net o-ran-sc/nonrtric-controlpanel:1.0.0-SNAPSHOT
Dashboard UI can be accessed by pointing the web-browser to this URL:
http://localhost:8080/