diff --git a/ci/testnet-deploy.sh b/ci/testnet-deploy.sh index 9cedfe58e0..c40edc0ffd 100755 --- a/ci/testnet-deploy.sh +++ b/ci/testnet-deploy.sh @@ -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" diff --git a/ci/testnet-manager.sh b/ci/testnet-manager.sh index 53c771ab6b..cc90d7db50 100755 --- a/ci/testnet-manager.sh +++ b/ci/testnet-manager.sh @@ -91,11 +91,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 @@ -217,12 +221,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 @@ -230,17 +235,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 @@ -337,10 +331,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) @@ -358,11 +348,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) @@ -410,9 +395,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 @@ -426,8 +413,8 @@ enable) enable_testnet ;; disable) - delete disable_testnet + delete ;; create-and-start) is_testnet_enabled