Add -u option

This commit is contained in:
Michael Vines 2019-02-17 10:45:21 -08:00
parent 10270dcbad
commit a27e9cb3c2
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
1 changed files with 10 additions and 1 deletions

View File

@ -18,6 +18,7 @@ enableGpu=false
bootDiskType="" bootDiskType=""
leaderRotation=true leaderRotation=true
useTarReleaseChannel=false useTarReleaseChannel=false
apiNode=false
usage() { usage() {
exitcode=0 exitcode=0
@ -43,6 +44,7 @@ Deploys a CD testnet
(default: $tarChannelOrTag) (default: $tarChannelOrTag)
-n [number] - Number of additional full nodes (default: $additionalFullNodeCount) -n [number] - Number of additional full nodes (default: $additionalFullNodeCount)
-c [number] - Number of client bencher nodes (default: $clientNodeCount) -c [number] - Number of client bencher nodes (default: $clientNodeCount)
-u - Include an API node (default: $apiNode)
-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, 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)
@ -67,7 +69,7 @@ zone=$3
[[ -n $zone ]] || usage "Zone not specified" [[ -n $zone ]] || usage "Zone not specified"
shift 3 shift 3
while getopts "h?p:Pn:c:s:t:gG:a:Dbd:r" opt; do while getopts "h?p:Pn:c:s:t:gG:a:Dbd:ru" opt; do
case $opt in case $opt in
h | \?) h | \?)
usage usage
@ -124,6 +126,9 @@ while getopts "h?p:Pn:c:s:t:gG:a:Dbd:r" opt; do
r) r)
skipSetup=true skipSetup=true
;; ;;
u)
apiNode=true
;;
*) *)
usage "Error: unhandled option: $opt" usage "Error: unhandled option: $opt"
;; ;;
@ -166,6 +171,10 @@ if ! $skipSetup; then
-n "$additionalFullNodeCount" -n "$additionalFullNodeCount"
) )
if $apiNode; then
create_args+=(-u)
fi
if [[ -n $bootDiskType ]]; then if [[ -n $bootDiskType ]]; then
create_args+=(-d "$bootDiskType") create_args+=(-d "$bootDiskType")
fi fi