aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--moonv4/moon_db/build.sh38
-rw-r--r--moonv4/moon_orchestrator/delete_orchestrator.sh60
2 files changed, 98 insertions, 0 deletions
diff --git a/moonv4/moon_db/build.sh b/moonv4/moon_db/build.sh
new file mode 100644
index 00000000..26efbe86
--- /dev/null
+++ b/moonv4/moon_db/build.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+VERSION=moon_db-1.1.0
+
+python3 setup.py sdist bdist_wheel
+
+rm dist/*.asc 2>/dev/null
+
+gpg --detach-sign -u "A0A96E75" -a dist/${VERSION}-py3-none-any.whl
+gpg --detach-sign -u "A0A96E75" -a dist/${VERSION}.tar.gz
+
+if [ "$1" = "upload" ]; then
+ twine upload dist/${VERSION}-py3-none-any.whl dist/${VERSION}-py3-none-any.whl.asc
+ twine upload dist/${VERSION}.tar.gz dist/${VERSION}.tar.gz.asc
+ rm -f ../moon_orchestrator/dist/moon_db*
+ rm -f ../moon_interface/dist/moon_db*
+ rm -f ../moon_manager/dist/moon_db*
+ rm -f ../moon_authz/dist/moon_db*
+ rm -f ../moon_wrapper/dist/moon_db*
+fi
+
+if [ "$1" = "copy" ]; then
+ mkdir -p ../moon_orchestrator/dist/ 2>/dev/null
+ rm -f ../moon_orchestrator/dist/moon_db*
+ cp -v dist/${VERSION}-py3-none-any.whl ../moon_orchestrator/dist/
+ mkdir -p ../moon_interface/dist/ 2>/dev/null
+ rm -f ../moon_interface/dist/moon_db*
+ cp -v dist/${VERSION}-py3-none-any.whl ../moon_interface/dist/
+ mkdir -p ../moon_manager/dist/ 2>/dev/null
+ rm -f ../moon_manager/dist/moon_db*
+ cp -v dist/${VERSION}-py3-none-any.whl ../moon_manager/dist/
+ mkdir -p ../moon_authz/dist/ 2>/dev/null
+ rm -f ../moon_authz/dist/moon_db*
+ cp -v dist/${VERSION}-py3-none-any.whl ../moon_authz/dist/
+ mkdir -p ../moon_wrapper/dist/ 2>/dev/null
+ rm -f ../moon_wrapper/dist/moon_db*
+ cp -v dist/${VERSION}-py3-none-any.whl ../moon_wrapper/dist/
+fi
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 -