Copied from Release A, not updated to B level yet!
This page describes how to get the release A B version of NonRTRIC 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.
locally. All four components of the NonRTRIC repo 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 in the link: from Release B page.
Table of Contents |
---|
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 (defaults to master branch):
git clone "https://gerrit.o-ran-sc.org/r/nonrtric" -b Amber
...
Configure policy-agent
To support local test with two separate Near-RT RIC simulator instances:
- create a new nonrtric/policy-agent/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
- any defined ric names must match the given docker container names in near-RT RIC simulator startup - port is always the simulator's internal 8085
Code Block | ||||
---|---|---|---|---|
| ||||
{ "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"
]
}
]
}
} |
update policy-agent/Dockerfile:
ADD /config/application_configuration.json /opt/app/policy-agent/data/application_configuration.json_example
to
ADD /config/application_configuration.json /opt/app/policy-agent/data/application_configuration.json
...
Build the code and create docker images
To build docker images of sdnc-a1-controller and policy-agent:
Code Block | ||
---|---|---|
| ||
cd nonrtric mvn clean install -Dmaven.test.skip=true |
Build near-rt-ric-simulator container
Download the near-rt-ric-simulator repo (defaults to master branch):
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):
Code Block | ||
---|---|---|
| ||
cd a1-interface/near-rt-ric-simulator docker build -t near-rt-ric-simulator:latest . |
Build NONRTRIC / A1 Policy control panel container
Download the nonrtric repo (defaults to master branch):
git clone "https://gerrit.o-ran-sc.org/r/portal/nonrtric-controlpanel"
Verify controlpanel configuration
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
Code Block | ||
---|---|---|
| ||
cd nonrtric-controlpanel mvn clean install -Dmaven.test.skip=true |
Run A1 Controller Docker Container
- A1 Controller must be started first to set up docker network
- 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: followed e.g. by using command
docker exec -it a1-controller-container sh
cd -c "tail -f /opt/opendaylight/data/log/
tail -f karaf.logkaraf.log"
Open Daylight GUI
- For troubleshooting/verification purposes the Open Daylight GUI can be accessed by pointing web-browser to this URL:
http://localhost:8282/apidoc/explorer/index.html
Username/password: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
Run Near-RT
...
RIC A1 Simulator Docker
...
Containers
- Run docker container using this commandStart 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 8181:80858085:8085 -p 8185:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric1 o-ran-sc/near-rt-ric-simulator:1.0.0-SNAPSHOT
latest
docker run -p 8086:8085 -p 8185:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric2 near-rt-ric-simulator:latest - Change directoryChange directory to:
cd nonrtrica1-interface/near-rt-ric-simulator/ric-plt/a1test/OSC_2.1.0/jsonfiles
- Put an example policy_type inside into the started near-rt-ric-simulator instances by running these curl commands (in this curl command: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:81818086/a1-p/policytypes/STD_QoSNudging_0.2.0123" -H "accept: application/json" \
-H "Content-Type: application/json" --data-binary @policy_type_STD_QoSNudging_0.2.0@pt1.json
Run Policy-agent Docker Container
- Run docker container using this command once A1 Controller and simulators have been fully started:
docker run -p 8081:8081 --network=nonrtric-docker-net --name=policy-agent-container o-ran-sc/nonrtric-policy-agent:12.0.0-SNAPSHOT
- Once policy-agent is up and running, it establishes connections to all configured Near-RT RICs
- (Note: In Bronze Maintenance veriosn 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.
Code Block | ||||
---|---|---|---|---|
| ||||
$ 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/