Add multi-region deploy functionality
This commit is contained in:
parent
b33a1fa019
commit
9ba0439593
|
@ -27,13 +27,14 @@ usage() {
|
||||||
echo "Error: $*"
|
echo "Error: $*"
|
||||||
fi
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
usage: $0 [name] [cloud] [zone] [options...]
|
usage: $0 -N name -C cloud -z zone1 [-z zone2] ... [-z zoneN] [options...]
|
||||||
|
|
||||||
Deploys a CD testnet
|
Deploys a CD testnet
|
||||||
|
|
||||||
name - name of the network
|
mandatory arguments:
|
||||||
cloud - cloud provider to use (gce, ec2)
|
-N [name] - name of the network
|
||||||
zone - cloud provider zone to deploy the network into
|
-C [cloud] - cloud provider to use (gce, ec2)
|
||||||
|
-z [zone] - cloud provider zone to deploy the network into. Must specify at least one zone
|
||||||
|
|
||||||
options:
|
options:
|
||||||
-t edge|beta|stable|vX.Y.Z - Deploy the latest tarball release for the
|
-t edge|beta|stable|vX.Y.Z - Deploy the latest tarball release for the
|
||||||
|
@ -59,19 +60,22 @@ EOF
|
||||||
exit $exitcode
|
exit $exitcode
|
||||||
}
|
}
|
||||||
|
|
||||||
netName=$1
|
zone=()
|
||||||
cloudProvider=$2
|
|
||||||
zone=$3
|
|
||||||
[[ -n $netName ]] || usage
|
|
||||||
[[ -n $cloudProvider ]] || usage "Cloud provider not specified"
|
|
||||||
[[ -n $zone ]] || usage "Zone not specified"
|
|
||||||
shift 3
|
|
||||||
|
|
||||||
while getopts "h?p:Pn:c:t:gG:a:Dbd:rusx" opt; do
|
while getopts "h?p:Pn:c:t:gG:a:Dbd:rusxz:N:C:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
N)
|
||||||
|
netName=$OPTARG
|
||||||
|
;;
|
||||||
|
C)
|
||||||
|
cloudProvider=$OPTARG
|
||||||
|
;;
|
||||||
|
z)
|
||||||
|
zone+=("$OPTARG")
|
||||||
|
;;
|
||||||
P)
|
P)
|
||||||
publicNetwork=true
|
publicNetwork=true
|
||||||
;;
|
;;
|
||||||
|
@ -128,6 +132,10 @@ while getopts "h?p:Pn:c:t:gG:a:Dbd:rusx" opt; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
[[ -n $netName ]] || usage
|
||||||
|
[[ -n $cloudProvider ]] || usage "Cloud provider not specified"
|
||||||
|
[[ -n $zone ]] || usage "Zone not specified"
|
||||||
|
|
||||||
shutdown() {
|
shutdown() {
|
||||||
exitcode=$?
|
exitcode=$?
|
||||||
|
|
||||||
|
|
|
@ -202,7 +202,7 @@ start() {
|
||||||
set -x
|
set -x
|
||||||
NO_VALIDATOR_SANITY=1 \
|
NO_VALIDATOR_SANITY=1 \
|
||||||
RUST_LOG=solana=info \
|
RUST_LOG=solana=info \
|
||||||
ci/testnet-deploy.sh edge-testnet-solana-com ec2 us-west-1a \
|
ci/testnet-deploy.sh -N edge-testnet-solana-com -C ec2 -z us-west-1a \
|
||||||
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -u -P -a eipalloc-0ccd4f2239886fa94 \
|
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -u -P -a eipalloc-0ccd4f2239886fa94 \
|
||||||
${maybeReuseLedger:+-r} \
|
${maybeReuseLedger:+-r} \
|
||||||
${maybeDelete:+-D}
|
${maybeDelete:+-D}
|
||||||
|
@ -213,7 +213,7 @@ start() {
|
||||||
set -x
|
set -x
|
||||||
NO_LEDGER_VERIFY=1 \
|
NO_LEDGER_VERIFY=1 \
|
||||||
NO_VALIDATOR_SANITY=1 \
|
NO_VALIDATOR_SANITY=1 \
|
||||||
ci/testnet-deploy.sh edge-perf-testnet-solana-com ec2 us-west-2b \
|
ci/testnet-deploy.sh -N edge-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
||||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||||
-b \
|
-b \
|
||||||
${maybeReuseLedger:+-r} \
|
${maybeReuseLedger:+-r} \
|
||||||
|
@ -223,27 +223,30 @@ start() {
|
||||||
testnet-beta)
|
testnet-beta)
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
# Force delete the network, as two different cloud providers are being used
|
|
||||||
# (otherwise, a subset of the nodes stay up while first cloud is deleted,
|
# List of zones to deploy for each cloud provider
|
||||||
# and the leader might be in that subset)
|
GCE_ZONES=(us-west1-b asia-east2-a europe-west4-a southamerica-east1-b us-east4-c)
|
||||||
|
EC2_ZONES=(sa-east-1a us-west-1a ap-northeast-2a eu-central-1a ca-central-1a)
|
||||||
|
|
||||||
|
# Build a string to pass as opts to testnet-deploy.sh: "-z zone1 -z zone2 ..."
|
||||||
|
for val in "${GCE_ZONES[@]}"; do
|
||||||
|
GCE_ZONE_ARGS="-z $val $GCE_ZONE_ARGS"
|
||||||
|
done
|
||||||
|
|
||||||
|
for val in "${EC2_ZONES[@]}"; do
|
||||||
|
EC2_ZONE_ARGS="-z $val $EC2_ZONE_ARGS"
|
||||||
|
done
|
||||||
|
|
||||||
NO_VALIDATOR_SANITY=1 \
|
NO_VALIDATOR_SANITY=1 \
|
||||||
RUST_LOG=solana=info \
|
RUST_LOG=solana=info \
|
||||||
ci/testnet-deploy.sh beta-testnet-solana-com ec2 us-west-1a \
|
ci/testnet-deploy.sh -N beta-testnet-solana-com -C ec2 "$EC2_ZONE_ARGS"\
|
||||||
-t "$CHANNEL_OR_TAG" -n 35 -c 0 -s -u -P -a eipalloc-0f286cf8a0771ce35 -D
|
-t "$CHANNEL_OR_TAG" -n 60 -c 0 -s -u -P -a eipalloc-0f286cf8a0771ce35 \
|
||||||
NO_VALIDATOR_SANITY=1 \
|
|
||||||
RUST_LOG=solana=info \
|
|
||||||
ci/testnet-deploy.sh beta-testnet-solana-com gce us-west1-a \
|
|
||||||
-t "$CHANNEL_OR_TAG" -n 65 -c 0 -x -P -D
|
|
||||||
NO_VALIDATOR_SANITY=1 \
|
|
||||||
RUST_LOG=solana=info \
|
|
||||||
ci/testnet-deploy.sh beta-testnet-solana-com ec2 us-west-1a \
|
|
||||||
-t "$CHANNEL_OR_TAG" -n 35 -c 0 -s -u -P -a eipalloc-0f286cf8a0771ce35 \
|
|
||||||
${maybeReuseLedger:+-r} \
|
${maybeReuseLedger:+-r} \
|
||||||
${maybeDelete:+-D}
|
${maybeDelete:+-D}
|
||||||
NO_VALIDATOR_SANITY=1 \
|
NO_VALIDATOR_SANITY=1 \
|
||||||
RUST_LOG=solana=info \
|
RUST_LOG=solana=info \
|
||||||
ci/testnet-deploy.sh beta-testnet-solana-com gce us-west1-a \
|
ci/testnet-deploy.sh -N beta-testnet-solana-com -C gce "$GCE_ZONE_ARGS"\
|
||||||
-t "$CHANNEL_OR_TAG" -n 65 -c 0 -x -P \
|
-t "$CHANNEL_OR_TAG" -n 40 -c 0 -x -P \
|
||||||
${maybeReuseLedger:+-r} \
|
${maybeReuseLedger:+-r} \
|
||||||
${maybeDelete:+-D}
|
${maybeDelete:+-D}
|
||||||
)
|
)
|
||||||
|
@ -253,7 +256,7 @@ start() {
|
||||||
set -x
|
set -x
|
||||||
NO_LEDGER_VERIFY=1 \
|
NO_LEDGER_VERIFY=1 \
|
||||||
NO_VALIDATOR_SANITY=1 \
|
NO_VALIDATOR_SANITY=1 \
|
||||||
ci/testnet-deploy.sh beta-perf-testnet-solana-com ec2 us-west-2b \
|
ci/testnet-deploy.sh -N beta-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
||||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||||
-b \
|
-b \
|
||||||
${maybeReuseLedger:+-r} \
|
${maybeReuseLedger:+-r} \
|
||||||
|
@ -265,12 +268,12 @@ start() {
|
||||||
set -x
|
set -x
|
||||||
NO_VALIDATOR_SANITY=1 \
|
NO_VALIDATOR_SANITY=1 \
|
||||||
RUST_LOG=solana=info \
|
RUST_LOG=solana=info \
|
||||||
ci/testnet-deploy.sh testnet-solana-com ec2 us-west-1a \
|
ci/testnet-deploy.sh -N testnet-solana-com -C ec2 -z us-west-1a \
|
||||||
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -u -P -a eipalloc-0fa502bf95f6f18b2 \
|
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -u -P -a eipalloc-0fa502bf95f6f18b2 \
|
||||||
-b \
|
-b \
|
||||||
${maybeReuseLedger:+-r} \
|
${maybeReuseLedger:+-r} \
|
||||||
${maybeDelete:+-D}
|
${maybeDelete:+-D}
|
||||||
#ci/testnet-deploy.sh testnet-solana-com gce us-east1-c \
|
#ci/testnet-deploy.sh -N testnet-solana-com -C gce -z us-east1-c \
|
||||||
# -t "$CHANNEL_OR_TAG" -n 3 -c 0 -P -a testnet-solana-com \
|
# -t "$CHANNEL_OR_TAG" -n 3 -c 0 -P -a testnet-solana-com \
|
||||||
# ${maybeReuseLedger:+-r} \
|
# ${maybeReuseLedger:+-r} \
|
||||||
# ${maybeDelete:+-D}
|
# ${maybeDelete:+-D}
|
||||||
|
@ -281,14 +284,14 @@ start() {
|
||||||
set -x
|
set -x
|
||||||
NO_LEDGER_VERIFY=1 \
|
NO_LEDGER_VERIFY=1 \
|
||||||
NO_VALIDATOR_SANITY=1 \
|
NO_VALIDATOR_SANITY=1 \
|
||||||
ci/testnet-deploy.sh perf-testnet-solana-com gce us-west1-b \
|
ci/testnet-deploy.sh -N perf-testnet-solana-com -C gce -z us-west1-b \
|
||||||
-G "n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100" \
|
-G "n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100" \
|
||||||
-t "$CHANNEL_OR_TAG" -c 2 \
|
-t "$CHANNEL_OR_TAG" -c 2 \
|
||||||
-b \
|
-b \
|
||||||
-d pd-ssd \
|
-d pd-ssd \
|
||||||
${maybeReuseLedger:+-r} \
|
${maybeReuseLedger:+-r} \
|
||||||
${maybeDelete:+-D}
|
${maybeDelete:+-D}
|
||||||
#ci/testnet-deploy.sh perf-testnet-solana-com ec2 us-east-1a \
|
#ci/testnet-deploy.sh -N perf-testnet-solana-com -C ec2 -z us-east-1a \
|
||||||
# -g \
|
# -g \
|
||||||
# -t "$CHANNEL_OR_TAG" -c 2 \
|
# -t "$CHANNEL_OR_TAG" -c 2 \
|
||||||
# ${maybeReuseLedger:+-r} \
|
# ${maybeReuseLedger:+-r} \
|
||||||
|
|
Loading…
Reference in New Issue