Update testnet-deploy script to configure GPUs for leader node (#1379)
This commit is contained in:
parent
7fb7839c8f
commit
35e6343d61
|
@ -4,6 +4,7 @@ cd "$(dirname "$0")"/..
|
||||||
|
|
||||||
zone=
|
zone=
|
||||||
leaderAddress=
|
leaderAddress=
|
||||||
|
leaderMachineType=
|
||||||
clientNodeCount=0
|
clientNodeCount=0
|
||||||
validatorNodeCount=10
|
validatorNodeCount=10
|
||||||
publicNetwork=false
|
publicNetwork=false
|
||||||
|
@ -31,6 +32,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, and set count/type of GPUs to use (e.g n1-standard-16 --accelerator count=4,type=nvidia-tesla-k80)
|
||||||
-g - Enable GPU (default: $enableGpu)
|
-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
|
||||||
|
@ -47,7 +49,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:ga:d" opt; do
|
while getopts "h?p:Pn:c:s:gG:a:d" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
|
@ -74,6 +76,10 @@ while getopts "h?p:Pn:c:s:ga:d" opt; do
|
||||||
g)
|
g)
|
||||||
enableGpu=true
|
enableGpu=true
|
||||||
;;
|
;;
|
||||||
|
G)
|
||||||
|
enableGpu=true
|
||||||
|
leaderMachineType=$OPTARG
|
||||||
|
;;
|
||||||
a)
|
a)
|
||||||
leaderAddress=$OPTARG
|
leaderAddress=$OPTARG
|
||||||
;;
|
;;
|
||||||
|
@ -96,7 +102,11 @@ gce_create_args=(
|
||||||
)
|
)
|
||||||
|
|
||||||
if $enableGpu; then
|
if $enableGpu; then
|
||||||
gce_create_args+=(-g)
|
if [[ -z $leaderMachineType ]]; then
|
||||||
|
gce_create_args+=(-g)
|
||||||
|
else
|
||||||
|
gce_create_args+=(-G "$leaderMachineType")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $publicNetwork; then
|
if $publicNetwork; then
|
||||||
|
|
Loading…
Reference in New Issue