testnet-deploy.sh updates

This commit is contained in:
Michael Vines 2019-04-26 20:12:27 -07:00
parent fea212e64e
commit 634d8e25ee
No known key found for this signature in database
GPG Key ID: 33F4FDEC4E0E88BD
2 changed files with 14 additions and 23 deletions

View File

@ -173,6 +173,10 @@ if $stopNetwork; then
skipSetup=true
fi
if $delete; then
skipSetup=false
fi
# Create the network
if ! $skipSetup; then
echo "--- $cloudProvider.sh delete"

View File

@ -95,11 +95,15 @@ testnet-beta|testnet-beta-perf)
: "${EC2_NODE_COUNT:=10}"
: "${GCE_NODE_COUNT:=}"
;;
testnet|testnet-perf)
testnet)
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
CHANNEL_BRANCH=$STABLE_CHANNEL
: "${TESTNET_DB_HOST:=https://clocktower-f1d56615.influxcloud.net:8086}"
;;
testnet-perf)
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
CHANNEL_BRANCH=$STABLE_CHANNEL
;;
testnet-demo)
CHANNEL_OR_TAG=beta
CHANNEL_BRANCH=$BETA_CHANNEL
@ -220,12 +224,13 @@ deploy() {
declare maybeStop=$3
declare maybeDelete=$4
echo "--- deploy \"$maybeCreate\" \"$maybeStart\" \"$maybeStop\" \"$maybeDelete\""
# Create or recreate the nodes
if [[ -z $maybeCreate ]]; then
skipCreate=skip
else
skipCreate=""
echo "--- create $TESTNET"
fi
# Start or restart the network software on the nodes
@ -233,17 +238,6 @@ deploy() {
skipStart=skip
else
skipStart=""
echo "--- start $TESTNET"
fi
# Stop the nodes
if [[ -n $maybeStop ]]; then
echo "--- stop $TESTNET"
fi
# Delete the nodes
if [[ -n $maybeDelete ]]; then
echo "--- delete $TESTNET"
fi
case $TESTNET in
@ -340,10 +334,6 @@ deploy() {
${skipStart:+-s} \
${maybeStop:+-S} \
${maybeDelete:+-D}
#ci/testnet-deploy.sh -p testnet-solana-com -C gce -z us-east1-c \
# -t "$CHANNEL_OR_TAG" -n 3 -c 0 -P -a testnet-solana-com \
# ${maybeReuseLedger:+-r} \
# ${maybeDelete:+-D}
)
;;
testnet-perf)
@ -361,11 +351,6 @@ deploy() {
${skipStart:+-s} \
${maybeStop:+-S} \
${maybeDelete:+-D}
#ci/testnet-deploy.sh -p perf-testnet-solana-com -C ec2 -z us-east-1a \
# -g \
# -t "$CHANNEL_OR_TAG" -c 2 \
# ${maybeReuseLedger:+-r} \
# ${maybeDelete:+-D}
)
;;
testnet-demo)
@ -413,9 +398,11 @@ delete() {
}
enable_testnet() {
touch "${ENABLED_LOCKFILE}"
echo "+++ $TESTNET now enabled"
}
disable_testnet() {
rm -f "${ENABLED_LOCKFILE}"
echo "+++ $TESTNET now disabled"
}
is_testnet_enabled() {
if [[ ! -f ${ENABLED_LOCKFILE} ]]; then
@ -429,8 +416,8 @@ enable)
enable_testnet
;;
disable)
delete
disable_testnet
delete
;;
create-and-start)
is_testnet_enabled