From: enyinna1234 Date: Thu, 7 Nov 2019 22:22:31 +0000 (-0800) Subject: BPA-RESTful_API uninstall script X-Git-Tag: v0.4.0~58 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=a28f9de209c34ff053b92513e2cb546943c83813;p=icn.git BPA-RESTful_API uninstall script Adds an uninstall script that removes the BPA-RESTful-API Kubernetes and docker components - roles, services, deployments, serviceaacount, persistent volume (pv), pv claim, and images. Signed-off-by: Enyinna Ochulor Change-Id: Id60efa66887e59f5f8f867a0d1f04c5d9290f408 --- diff --git a/Makefile b/Makefile index a0b4c86..fcb28f7 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,9 @@ bpa_op_all: bm_all bpa_op_install bpa_rest_api_install: pushd $(BPA_REST_API) && make deploy && popd +bpa_rest_api_uninstall: + pushd $(BPA_REST_API) && make clean && popd + bpa_rest_api_verifier: pushd $(BPA_REST_API) && make e2e_test && popd diff --git a/cmd/bpa-restapi-agent/Makefile b/cmd/bpa-restapi-agent/Makefile index 3ca017f..6437dc3 100644 --- a/cmd/bpa-restapi-agent/Makefile +++ b/cmd/bpa-restapi-agent/Makefile @@ -17,3 +17,6 @@ go_install: e2e_test: deploy ./e2e_test.sh + +clean: + ./bpa_api_uninstall.sh diff --git a/cmd/bpa-restapi-agent/bpa_api_uninstall.sh b/cmd/bpa-restapi-agent/bpa_api_uninstall.sh new file mode 100755 index 0000000..f1f8836 --- /dev/null +++ b/cmd/bpa-restapi-agent/bpa_api_uninstall.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +ICN_DIR=$(dirname "$(dirname "$PWD")") + +kubectl delete -f service.yml + +pushd $ICN_DIR/deploy/kud-plugin-addons/minio/yaml + +./uninstall.sh + +popd + +kubectl delete -f bpa_api_cluster_role_binding.yml + +kubectl delete -f bpa_api_cluster_role.yml + +kubectl delete -f create-service-account.yml + +sleep 10 + +sudo docker rmi akraino.org/icn/bpa-restapi-agent:latest + +sudo docker rmi mongo:latest + +sudo docker rmi minio/minio:latest