Specify machine type without necessarily enabling GPU (#6529)

* Specifiy machine type without necessarily enabling GPU

* Make long arg, extend --enable-gpu to automation

* Set machine types only in one place

* Fixup

* Fixup flag in automation

* Typo

* shellcheck
This commit is contained in:
Dan Albert
2019-10-24 15:12:25 -06:00
committed by GitHub
parent 2de2fbd5e3
commit dadcb632d8
7 changed files with 49 additions and 23 deletions

View File

@ -5,6 +5,7 @@ steps:
UPLOAD_RESULTS_TO_SLACK: "true"
CLOUD_PROVIDER: "colo"
TESTNET_TAG: "colo-edge-perf-gpu-enabled"
ENABLE_GPU: "true"
RAMP_UP_TIME: 0
TEST_DURATION_SECONDS: 600
NUMBER_OF_VALIDATOR_NODES: 4

View File

@ -8,6 +8,7 @@ steps:
RAMP_UP_TIME: 60
TEST_DURATION_SECONDS: 300
NUMBER_OF_VALIDATOR_NODES: 10
ENABLE_GPU: "false"
VALIDATOR_NODE_MACHINE_TYPE: "--machine-type n1-standard-16"
NUMBER_OF_CLIENT_NODES: 1
CLIENT_OPTIONS: "bench-tps=1=--tx_count 80000 --thread-batch-sleep-ms 1000"

View File

@ -8,6 +8,8 @@ steps:
RAMP_UP_TIME: 0
TEST_DURATION_SECONDS: 600
NUMBER_OF_VALIDATOR_NODES: 5
ENABLE_GPU: "false"
VALIDATOR_NODE_MACHINE_TYPE: "--machine-type n1-standard-16"
NUMBER_OF_CLIENT_NODES: 2
CLIENT_OPTIONS: "bench-tps=2=--tx_count 15000 --thread-batch-sleep-ms 250"
TESTNET_ZONES: "us-west1-a,us-west1-b,us-central1-a,europe-west4-a"

View File

@ -8,6 +8,7 @@ steps:
RAMP_UP_TIME: 0
TEST_DURATION_SECONDS: 600
NUMBER_OF_VALIDATOR_NODES: 5
ENABLE_GPU: "true"
VALIDATOR_NODE_MACHINE_TYPE: "--machine-type n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100"
NUMBER_OF_CLIENT_NODES: 2
CLIENT_OPTIONS: "bench-tps=2=--tx_count 15000 --thread-batch-sleep-ms 250"

View File

@ -8,10 +8,11 @@ steps:
RAMP_UP_TIME: 0
TEST_DURATION_SECONDS: 600
NUMBER_OF_VALIDATOR_NODES: 50
ENABLE_GPU: "true"
VALIDATOR_NODE_MACHINE_TYPE: "--machine-type n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100"
NUMBER_OF_CLIENT_NODES: 2
CLIENT_OPTIONS: "bench-tps=2=--tx_count 15000 --thread-batch-sleep-ms 250"
TESTNET_ZONES: "us-west1-a,us-west1-b,us-central1-a,europe-west4-a"
ADDITIONAL_FLAGS: ""
ADDITIONAL_FLAGS: "--dedicated --allow-boot-failures"
agents:
- "queue=testnet-deploy"

View File

@ -74,16 +74,18 @@ function launchTestnet() {
case $CLOUD_PROVIDER in
gce)
# shellcheck disable=SC2068
# shellcheck disable=SC2086
net/gce.sh create \
-d pd-ssd \
-n "$NUMBER_OF_VALIDATOR_NODES" -c "$NUMBER_OF_CLIENT_NODES" \
"$maybeMachineType" "$VALIDATOR_NODE_MACHINE_TYPE" \
$maybeCustomMachineType $VALIDATOR_NODE_MACHINE_TYPE "$maybeEnableGpu" \
-p "$TESTNET_TAG" ${TESTNET_CLOUD_ZONES[@]/#/"-z "} ${ADDITIONAL_FLAGS[@]/#/" "}
;;
colo)
# shellcheck disable=SC2068
# shellcheck disable=SC2086
net/colo.sh create \
-n "$NUMBER_OF_VALIDATOR_NODES" -c "$NUMBER_OF_CLIENT_NODES" -g \
-n "$NUMBER_OF_VALIDATOR_NODES" -c "$NUMBER_OF_CLIENT_NODES" "$maybeEnableGpu" \
-p "$TESTNET_TAG" ${ADDITIONAL_FLAGS[@]/#/" "}
;;
*)
@ -169,6 +171,13 @@ if [[ -z $NUMBER_OF_VALIDATOR_NODES ]] ; then
exit 1
fi
if [[ -z $ENABLE_GPU ]] ; then
ENABLE_GPU=false
fi
if [[ "$ENABLE_GPU" = "true" ]] ; then
maybeEnableGpu="--enable-gpu"
fi
if [[ -z $NUMBER_OF_CLIENT_NODES ]] ; then
echo NUMBER_OF_CLIENT_NODES not defined
exit 1
@ -193,7 +202,7 @@ source ci/upload-ci-artifact.sh
source system-test/testnet-performance/upload_results_to_slack.sh
maybeClientOptions=${CLIENT_OPTIONS:+"-c"}
maybeMachineType=${VALIDATOR_NODE_MACHINE_TYPE:+"-G"}
maybeCustomMachineType=${VALIDATOR_NODE_MACHINE_TYPE:+"--custom-machine-type"}
IFS=, read -r -a TESTNET_CLOUD_ZONES <<<"${TESTNET_ZONES}"
@ -203,6 +212,7 @@ RESULT_DETAILS="Test failed to finish"
TEST_PARAMS_TO_DISPLAY=(CLOUD_PROVIDER \
NUMBER_OF_VALIDATOR_NODES \
ENABLE_GPU \
VALIDATOR_NODE_MACHINE_TYPE \
NUMBER_OF_CLIENT_NODES \
CLIENT_OPTIONS \