...
All components of the Non-RT RIC run as docker containers and communicate via a private docker network with container ports, ports also available on localhost. Details of the architecture can be found from Release E page. FIXME: Page content?
Table of Contents |
---|
Project Requirements
Docker and docker-compose (latest)
- kubectl with admin access to kubernetes (minikube, docker-desktop kubernetes etc) - this is only applicable when running the Helm Manager
- helm with access to kubernetes - this is only applicable when running the Helm Manager example operations
Images
The images used for running the Non-RT RIC can be selected from the table below depending on if the images are built manually (snapshot image) or if staging or release images shall be used.
...
Component | Port exposed to localhost (http/https) |
---|---|
Policy Management Service | 8081/8443 |
Near-RT RIC A1 Simulator | 8085/8185, 8086/8186, 8087/8187 |
Information Coordinator Service | 8083/8434 |
Non-RT RIC Control Panel | 8080/8880 |
SDNC A1-Controller | 8282/8443 |
Gateway | 9090 |
App Catalogue Service | 8680/8633 |
Helm Manager | FIXME |
Dmaap Mediator Producer | FIXME9085/9185 |
Dmaap Adaptor Service | FIXME9087/9187 |
Prerequisites
The containers need to be connected to docker network in order to communicate with each other.
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker run --rm -v <absolute-path-to-file>/application_configuration.json:/opt/app/policy-agent/data/application_configuration.json -p 8081:8081 -p 8433:8433 --network=nonrtric-docker-net --name=policy-agent-container nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-policy-agent:2.23.10 |
Wait 1 minute to allow the container to start and to read the configuration. Then run the command below another terminal. The output should match the configuration in the file - all three rics (ric1, ric2 and ric3) should be included in the output. Note that each ric has the state "UNAVAILABLE" until the simulators are started.
...
For troubleshooting/verification purposes you can view/access the full swagger API from url: http://localhost:8081/swagger-ui/index.html?configUrl=/v3/api-docs/swagger-config
Run the SDNC A1 Controller Docker Container (ONAP SDNC)
This step is only applicable if the configuration for the Policy Management Service include the SDNC A1 Controller (second config option), see Draft - Release E - Run.
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker run --rm -p 8085:8085 -p 8185:8185 -e A1_VERSION=OSC_2.1.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric1 nexus3.o-ran-sc.org:10002/o-ran-sc/a1-simulator:2.12.03 |
Ric2
Code Block | ||||
---|---|---|---|---|
| ||||
docker run --rm -p 8086:8085 -p 8186:8185 -e A1_VERSION=STD_1.1.3 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric2 nexus3.o-ran-sc.org:10002/o-ran-sc/a1-simulator:2.12.0 |
Ric3
Code Block | ||||
---|---|---|---|---|
| ||||
docker run --rm -p 8087:8085 -p 8187:8185 -e A1_VERSION=STD_2.0.0 -e ALLOW_HTTP=true --network=nonrtric-docker-net --name=ric3 nexus3.o-ran-sc.org:10002/o-ran-sc/a1-simulator:2.12.0 |
Wait at least one minute to let the policy management service synchronise the rics. Then run the command below another terminal. The output should match the configuration in the file. Note that each ric now has the state "AVAILABLE".
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker run --rm -p 8083:8083 -p 8434:8434 --network=nonrtric-docker-net --name=information-service-container nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-information-coordinator-service:1.12.0 |
Verify that the Information Coordinator Service is started and responding (response is an empty array).
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker run --rm -v <absolute-path-to-config-file>/application.yaml:/opt/app/nonrtric-gateway/config/application.yaml -p 9090:9090 --network=nonrtric-docker-net --name=nonrtric-gateway nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-gateway:1.01.0 |
Run the following two commands to check that the services can be reached through the gateway
...
Code Block | ||||
---|---|---|---|---|
| ||||
docker run --rm -v <absolute-path-to-config-file>/nginx.conf:/etc/nginx/nginx.conf -p 8080:8080 --network=nonrtric-docker-net --name=control-panel nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-controlpanel:2.23.0 |
The webbased UI can be accessed by pointing the web-browser to this URL:
...
Start the App Catalogue Service by the following command.Ric1
Code Block | ||||
---|---|---|---|---|
| ||||
docker run --rm -p 8680:8680 -p 8633:8633 --network=nonrtric-docker-net --name=rapp-catalogue-service nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-r-app-catalogue:1.1.0.1 |
Verify that the service is up and running
...
Code Block | ||||
---|---|---|---|---|
| ||||
[ ] |
Run the Helm Manager
Note: Access to kubernetes is required as stated the requirements on the top of this page.
Change dir to 'helm-manger' in the downloaded nonrtric repo
Code Block | ||||
---|---|---|---|---|
| ||||
$ cd <path-repos>/nonrtric/helm-manager |
Start the helm manger in a separate shell by the following command:
Code Block | ||||
---|---|---|---|---|
| ||||
docker run \
--rm \
-it \
-p 8112:8083 \
--name helmmanagerservice \
--network nonrtric-docker-net \
-v $(pwd)/mnt/database:/var/helm-manager/database \
-v ~/.kube:/root/.kube \
-v ~/.helm:/root/.helm \
-v ~/.config/helm:/root/.config/helm \
-v ~/.cache/helm:/root/.cache/helm \
-v $(pwd)/config/KubernetesParticipantConfig.json:/opt/app/helm-manager/src/main/resources/config/KubernetesParticipantConfig.json \
-v $(pwd)/config/application.yaml:/opt/app/helm-manager/src/main/resources/config/application.yaml \
nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-helm-manager:1.1.0 |
Make sure the app has started by listing the current charts - response should be empty json array.
Code Block | ||||
---|---|---|---|---|
| ||||
$ curl localhost:8112/helm/charts
{"charts":[]} |
To test the app further, start a helm chart repo and create a dummy helm chart
Start a. chartmuseum chart repository in a separate shell
Code Block | ||||
---|---|---|---|---|
| ||||
$ docker run --rm -it \
-p 8222:8080 \
--name chartmuseum \
--network nonrtric-docker-net \
-e DEBUG=1 \
-e STORAGE=local \
-e STORAGE_LOCAL_ROOTDIR=/charts \
-v $(pwd)/charts:/charts \
ghcr.io/helm/chartmuseum:v0.13.1 |
Add the chart repo to the helm manager by the following command:
Code Block | ||||
---|---|---|---|---|
| ||||
$ docker exec -it helmmanagerservice sh
# helm repo add cm http://chartmuseum:8080$ helm package simple-app"cm" has been added to your repositories
$ exit |
Create a dummy helm chart for test and package the chart
Code Block | ||||
---|---|---|---|---|
| ||||
$ helm create simple-app
Creating simple-app$ helm package simple-appSuccessfully packaged chart and saved it to: <path-in-current-dir>/helm-manager/tmp |
The commands below show examples of operations towards the helm manager using the dummy chart:
Code Block | ||||
---|---|---|---|---|
| ||||
// Get charts
$ curl -sw %{http_code} http://localhost:8112/helm/charts
{"charts":[]}200
// Onboard the chart
curl -sw %{http_code} http://localhost:8112/helm/charts -X POST -F chart=@simple-app-0.1.0.tgz -F values=@simple-app-values.yaml -F "info=<simple-app.json"
Curl OK
Response: 200
Body:
// List the chart(s)
$ curl -sw %{http_code} http://localhost:8112/helm/charts
{"charts":[{"releaseName":"simpleapp","chartName":"simple-app","version":"0.1.0","namespace":"ckhm","repository":"cm"}]}200
// Install the chart (app) - note: the namespace ckhm is created in kubernetes
$curl -sw %{http_code} http://localhost:8112/helm/install -X POST -H Content-Type:application/json -d @simple-app-installation.json
201
=====================
Get apps - simple-app
=====================
$curl -sw %{http_code} http://localhost:8112/helm/charts
Curl OK
Response: 200
Body: {"charts":[{"releaseName":"simpleapp","chartName":"simple-app","version":"0.1.0","namespace":"ckhm","repository":"cm"}]}
//List the installed chart using helm ls
// helm ls -A
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
simpleapp ckhm 1 2021-12-02 20:53:21.52883025 +0000 UTC deployed simple-app-0.1.0 1.16.0
// List the service and pods in kubernetes - may take a few seconds until the object are created in kubernetes
$ kubectl get svc -n ckhm
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
simpleapp-simple-app ClusterIP 10.107.86.92 <none> 80/TCP 30s
$ kubectl get pods -n ckhm
NAME READY STATUS RESTARTS AGE
simpleapp-simple-app-675f44fc99-wpd6g 1/1 Running 0 31s
|
To run in the helm manager in kubernetes see this See this sub- page: Build/Run Helm Manager
...