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.
...
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:
create a new ccsdk/oranUpdate the existing oran/a1-policy-management/config/application_configuration.json 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.ymlany . 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
...
Build the code and create docker images
To build docker images of sdnc-a1-controller and policy-agentimage of the policy management service:
Code Block | ||
---|---|---|
| ||
cd ccsdk/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"
...
Code Block | ||
---|---|---|
| ||
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"
...
Code Block | ||
---|---|---|
| ||
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
Run A1 Controller Docker Container
A1 Controller must be started first to set up docker network
Change directory:
cd nonrtric/sdnc-a1-controller/oam/installation/src/main/yaml
Run docker container using the command 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 followed e.g. by using command
docker exec a1-controller-container sh -c "tail -f /opt/opendaylight/data/log/karaf.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
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 81858186: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 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 veriosn 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.
...