diff options
| author | Darien Raymond <[email protected]> | 2018-11-09 11:14:24 +0100 |
|---|---|---|
| committer | Darien Raymond <[email protected]> | 2018-11-09 11:14:24 +0100 |
| commit | 10ee14644e7da4ab293d552131a981de52d99fe0 (patch) | |
| tree | b9436f74acca52488054370c79da45f485ae695a | |
| parent | e06301a76270863aa58c9d519abdd0b37982124c (diff) | |
update
| -rw-r--r-- | release.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/release.sh b/release.sh new file mode 100644 index 00000000..c501a91a --- /dev/null +++ b/release.sh @@ -0,0 +1,17 @@ +PROJECT=$1 + +echo "Launching build machine." +DIR="$(dirname "$0")" +RAND="$(openssl rand -hex 5)" +ZONES=("us-central1-b" "us-central1-c" "europe-west1-d" "us-east1-d") + +for zone in "${ZONES[@]}"; do +gcloud compute instances create "v2raygeoip-${RAND}" \ + --machine-type=n1-standard-1 \ + --metadata-from-file=startup-script=${DIR}/generate.sh \ + --zone=${zone} \ + --project ${PROJECT} +if [ $? -eq 0 ]; then + exit 0 +fi +done |
