Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Clone the nonrtric repo from gerrit and change dir. Make sure to use the correct branch when cloning.

All needed scripts for start and run the helm manager, in docker or kubernetes are in this directory.

Code Block
languagebash
git clone "https://gerrit.o-ran-sc.org/r/nonrtric" -b <branch>

cd helm-manager

Build image

...

Instruction to build the image:

Code Block
languagebash
$ mvn clean package

The  built image should be named: o-ran-sc/nonrtric-helm-manager:1.0.0-SNAPSHOT

...

Create a private docker network for the containers to run in

Code Block
languagebash
$ docker network create nonrtric-docker-net

Start the chartmuseum container. Make note of the port, 8222, which will be available on local host. Charts uploaded to the chartmuseum container will be availed in the dir 'charts' on your host.ls

Code Block
languagebash
$ ./docker-cm.sh


Code Block
languagebash
titledocker-chcm.sh
linenumberstrue
collapsetrue
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, created in the section 'Create helm for test', to the repo

Code Block
languagebash
$ curl --data-binary "@simple-app-0.1.0.tgz" -X POST http://localhost:

...

8222/api/charts


Start the helm manager. Make note of the port, 8112, which will be available on local host. This is the port to the Helm manager REST API.

Code Block
languagebash
$ ./docker-cm.sh


Code Block
languagebash
titledocker-hm.sh
collapsetrue
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 \
    o-ran-sc/nonrtric-helm-manager:1.0.0-SNAPSHOT

The chartmusem repo need to added to helm. This operation must be called with an url accessable from the container.

Go into the helm manger manager container and add the chartrepo

...

rep

Code Block
languagebash
$ docker exec -it helmmanagerservice sh
$ repo add cm http://

...

chartmuseum:8080
$ exit


The helm manager is now running and configured with a chart repo.cmd prompt: exit

Run the script test script.

This script will onboard chart, install an application based on the chart, unstall the application and finally remove the chart.

sh to execute a the sequence:

  • Onboard chart
  • Install chart
  • Uninstall chart
  • Remove (the onboarded) chart

All operations should report "OK".

Code Block
languagebash
$ ./test.sh

...

 docker


Run in kubernetes

This instruction is valid for running both in a local kubernetes and in a kubernetes ccluster

...