...
Code Block | ||
---|---|---|
| ||
$ ./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 20212022-1206-1427 1021:1418:3027.917334268407666475 +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.9698.30120.250189 <none> 80/TCP 30s NAME READY STATUS RESTARTS AGE simpleapp-simple-app-675f44fc99-mpvndqsxr6 1/1 Running 0 31s30s ======================== 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 |
To run in the helm manager in kubernetes see this page: Run Helm Manager in kubernetes
Run the Dmaap Adaptor Service Docker Container
...