testnet-deploy.sh updates
This commit is contained in:
parent
fea212e64e
commit
634d8e25ee
|
@ -173,6 +173,10 @@ if $stopNetwork; then
|
||||||
skipSetup=true
|
skipSetup=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if $delete; then
|
||||||
|
skipSetup=false
|
||||||
|
fi
|
||||||
|
|
||||||
# Create the network
|
# Create the network
|
||||||
if ! $skipSetup; then
|
if ! $skipSetup; then
|
||||||
echo "--- $cloudProvider.sh delete"
|
echo "--- $cloudProvider.sh delete"
|
||||||
|
|
|
@ -95,11 +95,15 @@ testnet-beta|testnet-beta-perf)
|
||||||
: "${EC2_NODE_COUNT:=10}"
|
: "${EC2_NODE_COUNT:=10}"
|
||||||
: "${GCE_NODE_COUNT:=}"
|
: "${GCE_NODE_COUNT:=}"
|
||||||
;;
|
;;
|
||||||
testnet|testnet-perf)
|
testnet)
|
||||||
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
|
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
|
||||||
CHANNEL_BRANCH=$STABLE_CHANNEL
|
CHANNEL_BRANCH=$STABLE_CHANNEL
|
||||||
: "${TESTNET_DB_HOST:=https://clocktower-f1d56615.influxcloud.net:8086}"
|
: "${TESTNET_DB_HOST:=https://clocktower-f1d56615.influxcloud.net:8086}"
|
||||||
;;
|
;;
|
||||||
|
testnet-perf)
|
||||||
|
CHANNEL_OR_TAG=$STABLE_CHANNEL_LATEST_TAG
|
||||||
|
CHANNEL_BRANCH=$STABLE_CHANNEL
|
||||||
|
;;
|
||||||
testnet-demo)
|
testnet-demo)
|
||||||
CHANNEL_OR_TAG=beta
|
CHANNEL_OR_TAG=beta
|
||||||
CHANNEL_BRANCH=$BETA_CHANNEL
|
CHANNEL_BRANCH=$BETA_CHANNEL
|
||||||
|
@ -220,12 +224,13 @@ deploy() {
|
||||||
declare maybeStop=$3
|
declare maybeStop=$3
|
||||||
declare maybeDelete=$4
|
declare maybeDelete=$4
|
||||||
|
|
||||||
|
echo "--- deploy \"$maybeCreate\" \"$maybeStart\" \"$maybeStop\" \"$maybeDelete\""
|
||||||
|
|
||||||
# Create or recreate the nodes
|
# Create or recreate the nodes
|
||||||
if [[ -z $maybeCreate ]]; then
|
if [[ -z $maybeCreate ]]; then
|
||||||
skipCreate=skip
|
skipCreate=skip
|
||||||
else
|
else
|
||||||
skipCreate=""
|
skipCreate=""
|
||||||
echo "--- create $TESTNET"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Start or restart the network software on the nodes
|
# Start or restart the network software on the nodes
|
||||||
|
@ -233,17 +238,6 @@ deploy() {
|
||||||
skipStart=skip
|
skipStart=skip
|
||||||
else
|
else
|
||||||
skipStart=""
|
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
|
fi
|
||||||
|
|
||||||
case $TESTNET in
|
case $TESTNET in
|
||||||
|
@ -340,10 +334,6 @@ deploy() {
|
||||||
${skipStart:+-s} \
|
${skipStart:+-s} \
|
||||||
${maybeStop:+-S} \
|
${maybeStop:+-S} \
|
||||||
${maybeDelete:+-D}
|
${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)
|
testnet-perf)
|
||||||
|
@ -361,11 +351,6 @@ deploy() {
|
||||||
${skipStart:+-s} \
|
${skipStart:+-s} \
|
||||||
${maybeStop:+-S} \
|
${maybeStop:+-S} \
|
||||||
${maybeDelete:+-D}
|
${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)
|
testnet-demo)
|
||||||
|
@ -413,9 +398,11 @@ delete() {
|
||||||
}
|
}
|
||||||
enable_testnet() {
|
enable_testnet() {
|
||||||
touch "${ENABLED_LOCKFILE}"
|
touch "${ENABLED_LOCKFILE}"
|
||||||
|
echo "+++ $TESTNET now enabled"
|
||||||
}
|
}
|
||||||
disable_testnet() {
|
disable_testnet() {
|
||||||
rm -f "${ENABLED_LOCKFILE}"
|
rm -f "${ENABLED_LOCKFILE}"
|
||||||
|
echo "+++ $TESTNET now disabled"
|
||||||
}
|
}
|
||||||
is_testnet_enabled() {
|
is_testnet_enabled() {
|
||||||
if [[ ! -f ${ENABLED_LOCKFILE} ]]; then
|
if [[ ! -f ${ENABLED_LOCKFILE} ]]; then
|
||||||
|
@ -429,8 +416,8 @@ enable)
|
||||||
enable_testnet
|
enable_testnet
|
||||||
;;
|
;;
|
||||||
disable)
|
disable)
|
||||||
delete
|
|
||||||
disable_testnet
|
disable_testnet
|
||||||
|
delete
|
||||||
;;
|
;;
|
||||||
create-and-start)
|
create-and-start)
|
||||||
is_testnet_enabled
|
is_testnet_enabled
|
||||||
|
|
Loading…
Reference in New Issue