...
Start the App Catalogue Enhanced Service by the following command.
docker run -- rm -p 9096:9096 -p 9196:9196 -e ALLOW_HTTP=true - -network=nonrtric-docker-net --name=rapp-catalogue-service-enhanced nexus3.o-ran-sc.org:10002 /o-ran-sc/nonrtric-plt-rappcatalogue-enhanced :1.0.1
|
Verify that the service is up and running
curl localhost:9096/rappcatalogue
|
Expected output:
Run the Helm Manager Docker Container
...
Start the helm manger in a separate shell by the following command:
$ docker run \
--rm \
-it \
-p 8112:8083 8083 \
--name helmmanagerservice \
--network nonrtric-docker-net \
-v $(pwd)/mnt/database:/var/helm-manager-service \
-v ~/.kube:/home/nonrtric/.kube \
-v ~/.helm:/home/nonrtric/.helm \
-v ~/.config/helm:/home/nonrtric/.config/helm \
-v ~/.cache/helm:/home/nonrtric/.cache/helm \
-v $(pwd)/config/application.yaml:/etc/app/helm-manager/application.yaml \
nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-plt-helmmanager:1.2.0
|
...
Start a chartmuseum chart repository in a separate shell
$ 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:
$ docker exec -it helmmanagerservice helm repo add cm http://chartmuseum:8080 "cm" has been added to your repositories
|
...
$ helm create simple-app
Creating simple-app$ helm package simple-appSuccessfully packaged chart and saved it to: <path- in -current- dir > /helm-manager/tmp app
$ helm package simple-app
Successfully packaged chart and saved it to: <path> /simple-app-0 .1.0.tgz
$ curl --data-binary @simple-app-0.1.0.tgz -X POST http: //localhost :8222 /api/charts {"saved":true}
|
The commands below show examples of operations towards the helm manager using the dummy chart.
...
$ . /test .sh docker
Start test
================
Get apps - empty
================
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/charts
Curl OK
Response: 200
Body: { "charts" :[]}
================
Add repo
================
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/repo -X POST -H Content-Type:application /json -d @cm-repo.json
Curl OK
Response: 201
Body:
============
Onboard app
===========
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/onboard/chart -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:
=====================
Get apps - simple-app
=====================
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/charts
Curl OK
Response: 200
Body: { "charts" :[{ "releaseName" : "simpleapp" , "chartId" :{ "name" : "simple-app" , "version" : "0.1.0" }, "namespace" : "ckhm" , "repository" :{ "repoName" : "cm" , "protocol" :null, "address" :null, "port" :null, "userName" :null, "password" :null}, "overrideParams" :null}]}
===========
Install app
===========
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/install -X POST -H Content-Type:application /json -d @simple-app-installation.json
Curl OK
Response: 201
Body:
=====================
Get apps - simple-app
=====================
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/charts
Curl OK
Response: 200
Body: { "charts" :[{ "releaseName" : "simpleapp" , "chartId" :{ "name" : "simple-app" , "version" : "0.1.0" }, "namespace" : "ckhm" , "repository" :{ "repoName" : "cm" , "protocol" :null, "address" :null, "port" :null, "userName" :null, "password" :null}, "overrideParams" :null}]}
=================================================================
helm ls to list installed app - simpleapp chart should be visible
=================================================================
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
simpleapp ckhm 1 2022-06-27 21:18:27.407666475 +0000 UTC deployed simple-app-0.1.0 1.16.0
==========================================
sleep 30 - give the app some time to start
==========================================
============================
List svc and pod of the app
============================
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
simpleapp-simple-app ClusterIP 10.98.120.189 <none> 80 /TCP 30s
NAME READY STATUS RESTARTS AGE
simpleapp-simple-app-675f44fc99-qsxr6 1 /1 Running 0 30s
========================
Uninstall app simple-app
========================
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/uninstall/simple-app/0 .1.0 -X DELETE
Curl OK
Response: 204
Body:
===========================================
sleep 30 - give the app some time to remove
===========================================
============================================================
List svc and pod of the app - should be gone or terminating
============================================================
No resources found in ckhm namespace.
No resources found in ckhm namespace.
=====================
Get apps - simple-app
=====================
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/charts
Curl OK
Response: 200
Body: { "charts" :[{ "releaseName" : "simpleapp" , "chartId" :{ "name" : "simple-app" , "version" : "0.1.0" }, "namespace" : "ckhm" , "repository" :{ "repoName" : "cm" , "protocol" :null, "address" :null, "port" :null, "userName" :null, "password" :null}, "overrideParams" :null}]}
============
Delete chart
===========
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/chart/simple-app/0 .1.0 -X DELETE
Curl OK
Response: 204
Body:
================
Get apps - empty
================
curl -sw %{http_code} http: //helmadmin :itisasecret@localhost:8112 /helm/charts
Curl OK
Response: 200
Body: { "charts" :[]}
Test result All tests ok
End of test
|
...
Run the Dmaap Adapter Service Docker Container
...