Fix arg array ordering and rename network-name option
This commit is contained in:
parent
0c51f156ae
commit
50444181c5
|
@ -27,12 +27,12 @@ usage() {
|
||||||
echo "Error: $*"
|
echo "Error: $*"
|
||||||
fi
|
fi
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
usage: $0 -N name -C cloud -z zone1 [-z zone2] ... [-z zoneN] [options...]
|
usage: $0 -p network-name -C cloud -z zone1 [-z zone2] ... [-z zoneN] [options...]
|
||||||
|
|
||||||
Deploys a CD testnet
|
Deploys a CD testnet
|
||||||
|
|
||||||
mandatory arguments:
|
mandatory arguments:
|
||||||
-N [name] - name of the network
|
-p [network-name] - name of the network
|
||||||
-C [cloud] - cloud provider to use (gce, ec2)
|
-C [cloud] - cloud provider to use (gce, ec2)
|
||||||
-z [zone] - cloud provider zone to deploy the network into. Must specify at least one zone
|
-z [zone] - cloud provider zone to deploy the network into. Must specify at least one zone
|
||||||
|
|
||||||
|
@ -62,12 +62,12 @@ EOF
|
||||||
|
|
||||||
zone=()
|
zone=()
|
||||||
|
|
||||||
while getopts "h?p:Pn:c:t:gG:a:Dbd:rusxz:N:C:" opt; do
|
while getopts "h?p:Pn:c:t:gG:a:Dbd:rusxz:p:C:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
N)
|
p)
|
||||||
netName=$OPTARG
|
netName=$OPTARG
|
||||||
;;
|
;;
|
||||||
C)
|
C)
|
||||||
|
@ -158,7 +158,7 @@ set -x
|
||||||
|
|
||||||
# Build a string to pass zone opts to $cloudProvider.sh: "-z zone1 -z zone2 ..."
|
# Build a string to pass zone opts to $cloudProvider.sh: "-z zone1 -z zone2 ..."
|
||||||
for val in "${zone[@]}"; do
|
for val in "${zone[@]}"; do
|
||||||
zone_args="-z $zone_args $val"
|
zone_args="$zone_args -z $val"
|
||||||
done
|
done
|
||||||
|
|
||||||
if ! $skipSetup; then
|
if ! $skipSetup; then
|
||||||
|
@ -175,7 +175,7 @@ if ! $skipSetup; then
|
||||||
-c "$clientNodeCount"
|
-c "$clientNodeCount"
|
||||||
-n "$additionalFullNodeCount"
|
-n "$additionalFullNodeCount"
|
||||||
)
|
)
|
||||||
create_args+=("$zone_args ")
|
create_args+=("$zone_args")
|
||||||
|
|
||||||
if $blockstreamer; then
|
if $blockstreamer; then
|
||||||
create_args+=(-u)
|
create_args+=(-u)
|
||||||
|
@ -211,7 +211,7 @@ else
|
||||||
config_args=(
|
config_args=(
|
||||||
-p "$netName"
|
-p "$netName"
|
||||||
)
|
)
|
||||||
config_args+=("$zone_args ")
|
config_args+=("$zone_args")
|
||||||
if $publicNetwork; then
|
if $publicNetwork; then
|
||||||
config_args+=(-P)
|
config_args+=(-P)
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -230,11 +230,11 @@ start() {
|
||||||
|
|
||||||
# Build a string to pass as opts to testnet-deploy.sh: "-z zone1 -z zone2 ..."
|
# Build a string to pass as opts to testnet-deploy.sh: "-z zone1 -z zone2 ..."
|
||||||
for val in "${GCE_ZONES[@]}"; do
|
for val in "${GCE_ZONES[@]}"; do
|
||||||
GCE_ZONE_ARGS="-z $GCE_ZONE_ARGS $val"
|
GCE_ZONE_ARGS="$GCE_ZONE_ARGS -z $val"
|
||||||
done
|
done
|
||||||
|
|
||||||
for val in "${EC2_ZONES[@]}"; do
|
for val in "${EC2_ZONES[@]}"; do
|
||||||
EC2_ZONE_ARGS="-z $EC2_ZONE_ARGS $val"
|
EC2_ZONE_ARGS="$EC2_ZONE_ARGS -z $val"
|
||||||
done
|
done
|
||||||
|
|
||||||
NO_VALIDATOR_SANITY=1 \
|
NO_VALIDATOR_SANITY=1 \
|
||||||
|
|
Loading…
Reference in New Issue