Permit testnets without a GPU
This commit is contained in:
@ -9,6 +9,7 @@ validatorNodeCount=10
|
|||||||
publicNetwork=false
|
publicNetwork=false
|
||||||
snapChannel=edge
|
snapChannel=edge
|
||||||
delete=false
|
delete=false
|
||||||
|
enableGpu=false
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
exitcode=0
|
exitcode=0
|
||||||
@ -30,6 +31,7 @@ Deploys a CD testnet
|
|||||||
-n [number] - Number of validator nodes (default: $validatorNodeCount)
|
-n [number] - Number of validator nodes (default: $validatorNodeCount)
|
||||||
-c [number] - Number of client nodes (default: $clientNodeCount)
|
-c [number] - Number of client nodes (default: $clientNodeCount)
|
||||||
-P - Use public network IP addresses (default: $publicNetwork)
|
-P - Use public network IP addresses (default: $publicNetwork)
|
||||||
|
-g - Enable GPU (default: $enableGpu)
|
||||||
-a [address] - Set the leader node's external IP address to this GCE address
|
-a [address] - Set the leader node's external IP address to this GCE address
|
||||||
-d - Delete the network
|
-d - Delete the network
|
||||||
|
|
||||||
@ -45,7 +47,7 @@ zone=$2
|
|||||||
[[ -n $zone ]] || usage "Zone not specified"
|
[[ -n $zone ]] || usage "Zone not specified"
|
||||||
shift 2
|
shift 2
|
||||||
|
|
||||||
while getopts "h?p:Pn:c:s:a:d" opt; do
|
while getopts "h?p:Pn:c:s:ga:d" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
@ -69,6 +71,9 @@ while getopts "h?p:Pn:c:s:a:d" opt; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
g)
|
||||||
|
enableGpu=true
|
||||||
|
;;
|
||||||
a)
|
a)
|
||||||
leaderAddress=$OPTARG
|
leaderAddress=$OPTARG
|
||||||
;;
|
;;
|
||||||
@ -86,11 +91,14 @@ gce_create_args=(
|
|||||||
-a "$leaderAddress"
|
-a "$leaderAddress"
|
||||||
-c "$clientNodeCount"
|
-c "$clientNodeCount"
|
||||||
-n "$validatorNodeCount"
|
-n "$validatorNodeCount"
|
||||||
-g
|
|
||||||
-p "$netName"
|
-p "$netName"
|
||||||
-z "$zone"
|
-z "$zone"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if $enableGpu; then
|
||||||
|
gce_create_args+=(-g)
|
||||||
|
fi
|
||||||
|
|
||||||
if $publicNetwork; then
|
if $publicNetwork; then
|
||||||
gce_create_args+=(-P)
|
gce_create_args+=(-P)
|
||||||
fi
|
fi
|
||||||
|
Reference in New Issue
Block a user