diff options
author | Ruan HE <ruan.he@orange.com> | 2017-11-29 12:06:42 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-11-29 12:06:42 +0000 |
commit | ca71cabb3d212e1ffe65f99ce81d5042a2a5c0fc (patch) | |
tree | 807679fb6f56a7d985dfac9edcee3516680681e9 /moonv4 | |
parent | ffd31c8d804c00496b98ef385f3317e051b9a371 (diff) | |
parent | 4154b3b70e352538e2ffe94fee25b8df2272d64c (diff) |
Merge "Update delete_orchestrator script and put it in bin directory"
Diffstat (limited to 'moonv4')
-rw-r--r-- | moonv4/bin/delete_orchestrator.sh | 63 | ||||
-rw-r--r-- | moonv4/moon_orchestrator/delete_orchestrator.sh | 60 |
2 files changed, 63 insertions, 60 deletions
diff --git a/moonv4/bin/delete_orchestrator.sh b/moonv4/bin/delete_orchestrator.sh new file mode 100644 index 00000000..95fcfddd --- /dev/null +++ b/moonv4/bin/delete_orchestrator.sh @@ -0,0 +1,63 @@ +#!/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 + +if [ "$1" = "build" ]; then + + DOCKER_ARGS="" + + cd moon_manager + docker build -t wukongsun/moon_manager:v4.3.1 . ${DOCKER_ARGS} + if [ "$2" = "push" ]; then + docker push wukongsun/moon_manager:v4.3.1 + fi + cd - + + cd moon_orchestrator + docker build -t wukongsun/moon_orchestrator:v4.3 . ${DOCKER_ARGS} + if [ "$2" = "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 [ "$2" = "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 [ "$2" = "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 [ "$2" = "push" ]; then + docker push wukongsun/moon_wrapper:v4.3 + fi + cd - +fi diff --git a/moonv4/moon_orchestrator/delete_orchestrator.sh b/moonv4/moon_orchestrator/delete_orchestrator.sh deleted file mode 100644 index d99f3590..00000000 --- a/moonv4/moon_orchestrator/delete_orchestrator.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/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 - |