...
This page describes how to get the release A B version of NonRTRIC up and running locally. All four components of the NonRTRIC repo (from three different repos) run inside docker containers , and communicate via a docker network. Details of the architecture can be found in the link: from Release B page.
Project Requirements
- Java 11 (make sure that JAVA_HOME environment variable points to correct Java version)
- Maven 3.6
- Docker (latest)
Build Code
Build nonrtric containers
- Download the nonrtric repo (defaults to master branch):
git clone "https://gerrit.o-ran-sc.org/r/nonrtric" -b Amber
- For local testing,
- To support local test with two separate NearRT-RIC simulator instances the following modifications must be done:
- To support local test with two separate NearRT-RIC simulator instances the following modifications must be done:
- change the 'a1ControllerBaseUrl' in nonrtric/policy-agent/config/application.yaml file of policy-agent to http://a1-controller-container:8181
(The current URL cd - The above 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 default URL to be replaced (http://sdnc.onap:8282) is used in Kubernetes-based ONAP deployment
).- The following step is required only if you want to run more than the default ric1 nearRT-RIC simulator instance
- replace the content of
- nonrtric/policy-agent/config/application_configuration.yaml with the configuration below
- any defined ric names must match the given docker container names in nearRT-RIC simulator startup - port is always the simulator's internal 8085
Code Block language yml title application_configuration.yaml { "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" ] } ] } }
vi application.yaml
Build the code and create docker images.cd ../..
mvn clean install
Build near-rt-ric-simulator container
- Download the near repo (defaults to master branch):
git clone "https://gerrit.o-ran-sc.org/r/sim/a1-interface"
- Create docker image
cd a1-interface/near-rt-ric-simulator
docker build -t near-rt-ric-simulator:latest .
Build dashboard container
- Download the nonrtric repo (defaults to master branch):
git clone "https://gerrit.o-ran-sc.org/r/portal/nonrtric-controlpanel"
- Note also 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
Run A1 Controller Docker Container
- Change directory to:
cd nonrtric/sdnc-a1-controller/oam/installation/src/main/yaml
- Run docker container using the command below and wait until this message appears 'Healthcheck Passed in XX seconds'. below
docker-compose up a1-controller
- the container is ready once message "Healthcheck Passed in XX seconds." appears
- note that certificate-related errors "cp: can't stat '/opt/opendaylight/current/certs/*': No such file or directory" and "Error: File not found in path entered" can be ignored
- The Karaf logs of A1 controller can be seen using the following commands:
docker exec -it a1-controller-container sh
cd opt/opendaylight/data/log/
tail -f karaf.log
...
Run Near-RT-RIC Simulator Docker Container
- Run docker container using this command:
docker run -p 8181:8085 --network=nonrtric-docker-net --name=ric1 o-ran-sc/near-rt-ric-simulator:1.0.0-SNAPSHOT
- Change directory to:
cd nonrtric/near-rt-ric-simulator/ric-plt/a1
- Put an example policy_type inside the near-rt-ric-simulator by running this curl command:
curl -X PUT -v "http://localhost:8181/policytypes/STD_QoSNudging_0.2.0" -H "accept: application/json"
-H "Content-Type: application/json" --data-binary @policy_type_STD_QoSNudging_0.2.0.json
Containers
- TBD, the procedure is changed from release A
Run Policy-agent Docker Container
...
- Run docker container using this command:
docker run -p 8080:8080 --network=nonrtric-docker-net o-ran-sc/nonrtric-dashboardcontrolpanel:1.0.0-SNAPSHOT
Open Dashboard UI
...