Updated standup/teardown

Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2024-05-03 15:17:43 +01:00
parent 7a7ceaa3bd
commit aae5d5791d
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78
2 changed files with 4 additions and 28 deletions

View File

@ -2,9 +2,8 @@
source .utils source .utils
CODE_DIR="${HOME}/Code/GiantSwarm/cluster-test-suites" CODE_DIR="${HOME}/Code/GiantSwarm/cluster-standup-teardown"
CUR_DIR=$(pwd) OUTPUT_DIR=$(pwd)
OUTPUT_DIR=${CUR_DIR}
print_usage() { print_usage() {
orange "gs-standup - Standup a new test workload cluster, using the cluster-test-suites modules." orange "gs-standup - Standup a new test workload cluster, using the cluster-test-suites modules."
@ -53,44 +52,32 @@ case ${#POS_ARGS[@]} in
exit 1 exit 1
;; ;;
1) 1)
PROVIDER=""
CONTEXT="" CONTEXT=""
case ${POS_ARGS[0]} in case ${POS_ARGS[0]} in
"aws"|"capa") "aws"|"capa")
PROVIDER="aws"
CONTEXT="capa" CONTEXT="capa"
;; ;;
"azure"|"capz") "azure"|"capz")
PROVIDER="azure"
CONTEXT="capz" CONTEXT="capz"
;; ;;
"vsphere"|"capv") "vsphere"|"capv")
PROVIDER="vsphere"
CONTEXT="capv" CONTEXT="capv"
;; ;;
"cloud-director"|"capvcd") "cloud-director"|"capvcd")
PROVIDER="cloud-director"
CONTEXT="capvcd" CONTEXT="capvcd"
;; ;;
"eks") "eks")
PROVIDER="eks"
CONTEXT="eks" CONTEXT="eks"
;; ;;
"aws-private"|"capa-private") "aws-private"|"capa-private")
PROVIDER="aws"
CONTEXT="capa-private-proxy" CONTEXT="capa-private-proxy"
;; ;;
esac esac
cd ${CODE_DIR}
go run ${CODE_DIR}/cmd/standup/main.go \ go run ${CODE_DIR}/cmd/standup/main.go \
--provider ${PROVIDER} \
--context ${CONTEXT} \ --context ${CONTEXT} \
--cluster-values ${CODE_DIR}/providers/${CONTEXT}/standard/test_data/cluster_values.yaml \
--default-apps-values ${CODE_DIR}/providers/${CONTEXT}/standard/test_data/default-apps_values.yaml \
--output ${OUTPUT_DIR} --output ${OUTPUT_DIR}
cd ${CUR_DIR}
;; ;;
*) *)
print_usage print_usage

View File

@ -2,9 +2,8 @@
source .utils source .utils
CODE_DIR="${HOME}/Code/GiantSwarm/cluster-test-suites" CODE_DIR="${HOME}/Code/GiantSwarm/cluster-standup-teardown"
CUR_DIR=$(pwd) INPUT_DIR=$(pwd)
INPUT_DIR=${CUR_DIR}
print_usage() { print_usage() {
orange "gs-teardown - Teardown a previously created test cluster" orange "gs-teardown - Teardown a previously created test cluster"
@ -53,42 +52,32 @@ case ${#POS_ARGS[@]} in
exit 1 exit 1
;; ;;
1) 1)
PROVIDER=""
CONTEXT="" CONTEXT=""
case ${POS_ARGS[0]} in case ${POS_ARGS[0]} in
"aws"|"capa") "aws"|"capa")
PROVIDER="aws"
CONTEXT="capa" CONTEXT="capa"
;; ;;
"azure"|"capz") "azure"|"capz")
PROVIDER="azure"
CONTEXT="capz" CONTEXT="capz"
;; ;;
"vsphere"|"capv") "vsphere"|"capv")
PROVIDER="vsphere"
CONTEXT="capv" CONTEXT="capv"
;; ;;
"cloud-director"|"capvcd") "cloud-director"|"capvcd")
PROVIDER="cloud-director"
CONTEXT="capvcd" CONTEXT="capvcd"
;; ;;
"eks") "eks")
PROVIDER="eks"
CONTEXT="eks" CONTEXT="eks"
;; ;;
"aws-private"|"capa-private") "aws-private"|"capa-private")
PROVIDER="aws"
CONTEXT="capa-private-proxy" CONTEXT="capa-private-proxy"
;; ;;
esac esac
cd ${CODE_DIR}
go run ${CODE_DIR}/cmd/teardown/main.go \ go run ${CODE_DIR}/cmd/teardown/main.go \
--provider ${PROVIDER} \
--context ${CONTEXT} \ --context ${CONTEXT} \
--standup-directory ${INPUT_DIR} --standup-directory ${INPUT_DIR}
cd ${CUR_DIR}
;; ;;
*) *)
print_usage print_usage