diff options
author | Thomas Duval <thomas.duval@orange.com> | 2017-11-08 09:34:54 +0100 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2017-11-08 09:34:54 +0100 |
commit | 16f0175839e4bf5023d34d272182666f86f255cf (patch) | |
tree | 93a50b503e5cbe7e1efe497a8b0bd21f89880f56 /moonv4/moon_orchestrator | |
parent | 0031ddcc958c6124c4391b52a3fb0ab16677f52d (diff) |
Add some useful scripts.
Change-Id: I1e2e21cd97a83beabbcb396dcc95b046bc7fa4f0
Diffstat (limited to 'moonv4/moon_orchestrator')
-rw-r--r-- | moonv4/moon_orchestrator/delete_orchestrator.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/moonv4/moon_orchestrator/delete_orchestrator.sh b/moonv4/moon_orchestrator/delete_orchestrator.sh new file mode 100644 index 00000000..d99f3590 --- /dev/null +++ b/moonv4/moon_orchestrator/delete_orchestrator.sh @@ -0,0 +1,60 @@ +#!/usr/bin/env bash + +set +x + +kubectl delete -n moon -f kubernetes/templates/moon_orchestrator.yaml +for i in $(kubectl get deployments -n moon | grep wrapper | cut -d " " -f 1 | xargs); do + kubectl delete deployments/$i -n moon; +done +for i in $(kubectl get deployments -n moon | grep interface | cut -d " " -f 1 | xargs); do + kubectl delete deployments/$i -n moon; +done +for i in $(kubectl get deployments -n moon | grep authz | cut -d " " -f 1 | xargs); do + kubectl delete deployments/$i -n moon; +done +for i in $(kubectl get services -n moon | grep wrapper | cut -d " " -f 1 | xargs); do + kubectl delete services/$i -n moon; +done +for i in $(kubectl get services -n moon | grep interface | cut -d " " -f 1 | xargs); do + kubectl delete services/$i -n moon; +done +for i in $(kubectl get services -n moon | grep authz | cut -d " " -f 1 | xargs); do + kubectl delete services/$i -n moon; +done + +DOCKER_ARGS="" + +cd moon_manager +docker build -t wukongsun/moon_manager:v4.3 . ${DOCKER_ARGS} +if [ "$1" = "push" ]; then + docker push wukongsun/moon_manager:v4.3 +fi +cd - + +cd moon_orchestrator +docker build -t wukongsun/moon_orchestrator:v4.3 . ${DOCKER_ARGS} +if [ "$1" = "push" ]; then + docker push wukongsun/moon_orchestrator:v4.3 +fi +cd - + +cd moon_interface +docker build -t wukongsun/moon_interface:v4.3 . ${DOCKER_ARGS} +if [ "$1" = "push" ]; then + docker push wukongsun/moon_interface:v4.3 +fi +cd - + +cd moon_authz +docker build -t wukongsun/moon_authz:v4.3 . ${DOCKER_ARGS} +if [ "$1" = "push" ]; then + docker push wukongsun/moon_authz:v4.3 +fi +cd - + +cd moon_wrapper +docker build -t wukongsun/moon_wrapper:v4.3 . ${DOCKER_ARGS} +if [ "$1" = "push" ]; then + docker push wukongsun/moon_wrapper:v4.3 +fi +cd - |