Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: fixed typos + title for codeblocks

...

1. Chartmuseum Installation


Clone the OOM repository and deploy optional Chartmuseum component


Code Block
languageyml
themeRDark
titleGlobal Ingress configurationChartmuseum Deployment
# git clone -b <BRANCH> http://gerrit.onap.org/r/oom --recurse-submodules
cd  ~/oom/kubernetes/platform/components/chartmuseum
helm install -name dev-chartmuseum -n onap . --set global.masterPassword=test1 --set global.pullPolicy=IfNotPresent

...

Code Block
languageyml
themeRDark
titleGlobal Ingress configurationNodeport Enablelment
			  ports:
			  - name: http
				nodePort: 30192
				port: 80
				protocol: TCP
				targetPort: http
			 selector:
				app.kubernetes.io/instance: chartmuseum
				app.kubernetes.io/name: chartmuseum
			  sessionAffinity: None
			  type: NodePort

...

 Once enabled, you can view the registry via browser - http://<k8snodeip>:30192/api/charts


Note: This chartmuseum registry is deployed internal to ONAP cluster and is different from the registry setup done part OOM (https://docs.onap.org/projects/onap-oom/en/latest/oom_quickstart_guide.html : step 6) to setup local helm server for serving chart and to push the charts generated from local make/build.

2. Chartmuseum initialization 

...

Code Block
languageyml
themeRDark
titleGlobal Ingress configurationChartmuseum initialization via demo-k8s.sh
cd ~/oom/kubernetes/robot
./demo-k8s.sh onap registrySynch

...

Code Block
languageyml
themeRDark
titleGlobal Ingress configurationChartmuseum initialization via registry-initialize script
cd ~/oom/kubernetes/contrib/tools	
./registry-initialize.sh -d ../../dcaegen2-services/charts/ -n onap -r dev-chartmuseum
./registry-initialize.sh -d ../../dcaegen2-services/charts/ -n onap -r dev-chartmuseum -p common
./registry-initialize.sh -h repositoryGenerator  -n onap -r dev-chartmuseum
./registry-initialize.sh -h readinessCheck   -n onap -r dev-chartmuseum
./registry-initialize.sh -h dcaegen2-services-common  -n onap -r dev-chartmuseum
./registry-initialize.sh -h postgres   -n onap -r dev-chartmuseum
./registry-initialize.sh -h serviceAccount   -n onap -r dev-chartmuseum
./registry-initialize.sh -h certInitializer  -n onap -r dev-chartmuseum
./registry-initialize.sh -h mongo -n onap -r dev-chartmuseum

...

Code Block
languageyml
themeRDark
titleGlobal Ingress configurationDeploy MOD
helm install dev-dcaemod local/dcaemod --namespace onap  -f ~/onap-override.yaml --set global.masterPassword=test1 --set global.pullPolicy=IfNotPresent							

...

Code Block
languageyml
themeRDark
titleGlobal Ingress configurationOnboard Specs and DF
HOST=dcaemod.simpledemo.onap.org
curl -X POST http://$HOST/onboarding/dataformats     -H "Content-Type: application/json" -d @ves-4.27.2-df.json
curl -X POST http://$HOST/onboarding/dataformats     -H "Content-Type: application/json" -d @ves-5.28.4-df.json
curl -X POST http://$HOST/onboarding/dataformats     -H "Content-Type: application/json" -d @ves-response-df.json
curl -X POST http://$HOST/onboarding/dataformats     -H "Content-Type: application/json" -d @VES-7.30.2_ONAP-dataformat_onboard.json
curl -X POST http://$HOST/onboarding/components -H "Content-Type: application/json" -d @vescollector-componentspec-v3-mod.json

curl -X POST  http://$HOST/onboarding/dataformats     -H "Content-Type: application/json" -d @dcaeCLOutput-resp.json
curl -X POST  http://$HOST/onboarding/dataformats     -H "Content-Type: application/json" -d @aai-resp.json
curl -X POST  http://$HOST/onboarding/components -H "Content-Type: application/json" -d @tcagen2-componentspec-v3-mod.json


You can download the Components Component Specification and Data Formats used for the demo from here -   demo.zip


Verify the resources were created using

...

If the flow was submitted successfully to the runtime api, you should get a pop up a success message like so -


Image RemovedImage Added

At this step, the design was packaged and sent to Runtime api.

The runtime is supposed to generate the Helmchart for components involved in the flow and push them to registry configured. The RuntimeAPI logs should looks like below for successful distribution

7. Validation and Deployment

Charts distributed by MOD/Runtime can be verified on Chartmuseum registry (http://<K8SNodeIp>:30192/api/charts)

...

(can be viewed through kubcel log -f command)


Code Block
languageyml
themeRDark
titleGlobal Ingress configurationMOD/RuntimeAPI Console logs
2022-03-07 18:13:25.865  INFO 1 --- [nio-9090-exec-8] o.o.d.r.web.controllers.GraphController  : org.onap.dcae.runtime.web.models.GraphRequest@65efc9d3
2022-03-07 18:13:26.119  INFO 1 --- [nio-9090-exec-1] o.o.d.r.web.controllers.GraphController  : [org.onap.dcae.runtime.web.models.Action@335a6cff, org.onap.dcae.runtime.web.models.Action@291687dd, org.onap.dcae.runtime.web.models.Action@36d57691]
2022-03-07 18:13:26.142  INFO 1 --- [nio-9090-exec-1] o.o.d.platform.helmchartgenerator.Utils  : cloning dir/file at : /tmp/chart17927059362260733428
2022-03-07 18:13:26.158  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : running: helm dep up /tmp/chart17927059362260733428
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "local" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 7 charts
Downloading common from repo http://chart-museum:80
Downloading repositoryGenerator from repo http://chart-museum:80
Downloading readinessCheck from repo http://chart-museum:80
Downloading dcaegen2-services-common from repo http://chart-museum:80
Downloading postgres from repo http://chart-museum:80
Downloading serviceAccount from repo http://chart-museum:80
Downloading mongo from repo http://chart-museum:80
Deleting outdated charts
2022-03-07 18:13:26.273  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : running: helm lint /tmp/chart17927059362260733428
2022-03-07 18:13:30.641  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : ==> Linting /tmp/chart17927059362260733428
2022-03-07 18:13:30.642  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : [INFO] Chart.yaml: icon is recommended
2022-03-07 18:13:30.642  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    :
2022-03-07 18:13:30.642  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : 1 chart(s) linted, 0 chart(s) failed
2022-03-07 18:13:30.646  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : running: helm package -d /tmp/chart13832736430918913290 /tmp/chart17927059362260733428
2022-03-07 18:13:30.737  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : Successfully packaged chart and saved it to: /tmp/chart13832736430918913290/dcae-ves-collector-1.10.1.tgz
2022-03-07 18:13:30.836  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.d.ChartMuseumDistributor       : {"saved":true}
2022-03-07 18:13:30.857  INFO 1 --- [nio-9090-exec-1] o.o.d.platform.helmchartgenerator.Utils  : cloning dir/file at : /tmp/chart7638328545634423550
2022-03-07 18:13:30.870  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : running: helm dep up /tmp/chart7638328545634423550
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "local" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 7 charts
Downloading common from repo http://chart-museum:80
Downloading repositoryGenerator from repo http://chart-museum:80
Downloading readinessCheck from repo http://chart-museum:80
Downloading dcaegen2-services-common from repo http://chart-museum:80
Downloading postgres from repo http://chart-museum:80
Downloading serviceAccount from repo http://chart-museum:80
Downloading mongo from repo http://chart-museum:80
Deleting outdated charts
2022-03-07 18:13:31.022  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : running: helm lint /tmp/chart7638328545634423550
2022-03-07 18:13:35.142  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : ==> Linting /tmp/chart7638328545634423550
2022-03-07 18:13:35.143  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : [INFO] Chart.yaml: icon is recommended
2022-03-07 18:13:35.143  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    :
2022-03-07 18:13:35.143  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : 1 chart(s) linted, 0 chart(s) failed
2022-03-07 18:13:35.148  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : running: helm package -d /tmp/chart14389934160290252569 /tmp/chart7638328545634423550
2022-03-07 18:13:35.238  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.chartbuilder.HelmClientImpl    : Successfully packaged chart and saved it to: /tmp/chart14389934160290252569/dcae-tcagen2-1.3.1.tgz
2022-03-07 18:13:35.303  INFO 1 --- [nio-9090-exec-1] o.o.d.p.h.d.ChartMuseumDistributor       : {"saved":true}

7. Validation and Deployment


Charts distributed by MOD/Runtime can be verified on Chartmuseum registry (http://<K8SNodeIp>:30192/api/charts)

For demo purpose, charts are pulled from this registry using these command and followed by deployment

Code Block
languageyml
themeRDark
titleRetrieve Charts and deploy
curl -X curl -X GET http://10.12.5.9:30192/charts/dcae-ves-collector-1.10.1.tgz -u onapinitializer:demo123456! -o dcae-ves-collector-1.10.1.tgz

curl -X GET http://10.12.5.9:30192/charts/dcae-ves-collector-1.10.1.tgz -u onapinitializer:demo123456! -o dcae-ves-collector-1.10.1.tgz

curl -X GET http://10.12.5.9:30192/charts/dcae-tcagen2-1.3.1.tgz -u onapinitializer:demo123456!  -o dcae-tcagen2-1.3.1.tgz
helm install -name dev-dcaegen2-services -n onap dcae-tcagen2-1.3.1.tgz --set global.masterPassword=test1 --set global.pullPolicy=Always --set mongo.enabled=true

...

Code Block
languageyml
themeRDark
titleGlobal Ingress configurationDemo Env Cleanup
helm delete -n onap dev-chartmuseum  # To remove Chartmuseum setup completely
helm delete -n onap dev-dcaegen2-services  # To remove TCAGen2 services
helm delete -n onap dev-dcaemod # To undeploy DCAEMOD

# USE DELETE METHOD ON CHARTMUSEUM TO REMOVE ANY SPECIFIC CHART PACKAGE - example below
curl -X DELETE http://10.12.5.9:30192/api/charts/dcae-ves-collector/1.10.1 -u onapinitializer:demo123456!
curl -X DELETE http://10.12.5.9:30192/api/charts/dcae-tcagen2/1.3.1 -u onapinitializer:demo123456!

...