@ -51,11 +51,11 @@ runTest() {
|
|||||||
|
|
||||||
build
|
build
|
||||||
|
|
||||||
runTest "Leader rotation on" \
|
runTest "basic" \
|
||||||
"ci/localnet-sanity.sh -i 128"
|
"ci/localnet-sanity.sh -i 128"
|
||||||
|
|
||||||
runTest "Leader rotation on, restart" \
|
runTest "restart" \
|
||||||
"ci/localnet-sanity.sh -i 128 -k 16"
|
"ci/localnet-sanity.sh -i 128 -k 16"
|
||||||
|
|
||||||
runTest "Leader rotation on, incremental restart, extra node" \
|
runTest "incremental restart, extra node" \
|
||||||
"ci/localnet-sanity.sh -i 128 -k 16 -R -x"
|
"ci/localnet-sanity.sh -i 128 -k 16 -R -x"
|
||||||
|
@ -20,7 +20,6 @@ tarChannelOrTag=edge
|
|||||||
delete=false
|
delete=false
|
||||||
enableGpu=false
|
enableGpu=false
|
||||||
bootDiskType=""
|
bootDiskType=""
|
||||||
leaderRotation=true
|
|
||||||
blockstreamer=false
|
blockstreamer=false
|
||||||
deployUpdateManifest=true
|
deployUpdateManifest=true
|
||||||
fetchLogs=true
|
fetchLogs=true
|
||||||
@ -52,7 +51,6 @@ Deploys a CD testnet
|
|||||||
-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)
|
||||||
-b - Disable leader rotation
|
|
||||||
-a [address] - Set the bootstrap fullnode's external IP address to this GCE address
|
-a [address] - Set the bootstrap fullnode's external IP address to this GCE address
|
||||||
-d [disk-type] - Specify a boot disk type (default None) Use pd-ssd to get ssd on GCE.
|
-d [disk-type] - Specify a boot disk type (default None) Use pd-ssd to get ssd on GCE.
|
||||||
-D - Delete the network
|
-D - Delete the network
|
||||||
@ -74,7 +72,7 @@ EOF
|
|||||||
|
|
||||||
zone=()
|
zone=()
|
||||||
|
|
||||||
while getopts "h?p:Pn:c:t:gG:a:Dbd:rusxz:p:C:Sfew" opt; do
|
while getopts "h?p:Pn:c:t:gG:a:Dd:rusxz:p:C:Sfew" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
@ -107,9 +105,6 @@ while getopts "h?p:Pn:c:t:gG:a:Dbd:rusxz:p:C:Sfew" opt; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
b)
|
|
||||||
leaderRotation=false
|
|
||||||
;;
|
|
||||||
g)
|
g)
|
||||||
enableGpu=true
|
enableGpu=true
|
||||||
;;
|
;;
|
||||||
@ -230,10 +225,6 @@ if ! $skipCreate; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! $leaderRotation; then
|
|
||||||
create_args+=(-b)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if $publicNetwork; then
|
if $publicNetwork; then
|
||||||
create_args+=(-P)
|
create_args+=(-P)
|
||||||
fi
|
fi
|
||||||
|
@ -338,7 +338,6 @@ deploy() {
|
|||||||
RUST_LOG=solana=warn \
|
RUST_LOG=solana=warn \
|
||||||
ci/testnet-deploy.sh -p edge-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
ci/testnet-deploy.sh -p edge-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
||||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||||
-b \
|
|
||||||
${skipCreate:+-e} \
|
${skipCreate:+-e} \
|
||||||
${skipStart:+-s} \
|
${skipStart:+-s} \
|
||||||
${maybeStop:+-S} \
|
${maybeStop:+-S} \
|
||||||
@ -351,7 +350,6 @@ deploy() {
|
|||||||
NO_VALIDATOR_SANITY=1 \
|
NO_VALIDATOR_SANITY=1 \
|
||||||
ci/testnet-deploy.sh -p beta-testnet-solana-com -C ec2 -z us-west-1a \
|
ci/testnet-deploy.sh -p beta-testnet-solana-com -C ec2 -z us-west-1a \
|
||||||
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -u -P -a eipalloc-0f286cf8a0771ce35 \
|
-t "$CHANNEL_OR_TAG" -n 3 -c 0 -u -P -a eipalloc-0f286cf8a0771ce35 \
|
||||||
-b \
|
|
||||||
${skipCreate:+-e} \
|
${skipCreate:+-e} \
|
||||||
${skipStart:+-s} \
|
${skipStart:+-s} \
|
||||||
${maybeStop:+-S} \
|
${maybeStop:+-S} \
|
||||||
@ -366,7 +364,6 @@ deploy() {
|
|||||||
RUST_LOG=solana=warn \
|
RUST_LOG=solana=warn \
|
||||||
ci/testnet-deploy.sh -p beta-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
ci/testnet-deploy.sh -p beta-perf-testnet-solana-com -C ec2 -z us-west-2b \
|
||||||
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
-g -t "$CHANNEL_OR_TAG" -c 2 \
|
||||||
-b \
|
|
||||||
${skipCreate:+-e} \
|
${skipCreate:+-e} \
|
||||||
${skipStart:+-s} \
|
${skipStart:+-s} \
|
||||||
${maybeStop:+-S} \
|
${maybeStop:+-S} \
|
||||||
@ -410,7 +407,6 @@ deploy() {
|
|||||||
ci/testnet-deploy.sh -p perf-testnet-solana-com -C gce -z us-west1-b \
|
ci/testnet-deploy.sh -p perf-testnet-solana-com -C gce -z us-west1-b \
|
||||||
-G "--machine-type n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100" \
|
-G "--machine-type n1-standard-16 --accelerator count=2,type=nvidia-tesla-v100" \
|
||||||
-t "$CHANNEL_OR_TAG" -c 2 \
|
-t "$CHANNEL_OR_TAG" -c 2 \
|
||||||
-b \
|
|
||||||
-d pd-ssd \
|
-d pd-ssd \
|
||||||
${skipCreate:+-e} \
|
${skipCreate:+-e} \
|
||||||
${skipStart:+-s} \
|
${skipStart:+-s} \
|
||||||
|
@ -36,7 +36,6 @@ clientIpListZone=()
|
|||||||
blockstreamerIpList=()
|
blockstreamerIpList=()
|
||||||
blockstreamerIpListPrivate=()
|
blockstreamerIpListPrivate=()
|
||||||
blockstreamerIpListZone=()
|
blockstreamerIpListZone=()
|
||||||
leaderRotation=
|
|
||||||
|
|
||||||
buildSshOptions() {
|
buildSshOptions() {
|
||||||
sshOptions=(
|
sshOptions=(
|
||||||
@ -60,7 +59,6 @@ loadConfigFile() {
|
|||||||
[[ -n "$publicNetwork" ]] || usage "Config file invalid, publicNetwork unspecified: $configFile"
|
[[ -n "$publicNetwork" ]] || usage "Config file invalid, publicNetwork unspecified: $configFile"
|
||||||
[[ -n "$netBasename" ]] || usage "Config file invalid, netBasename unspecified: $configFile"
|
[[ -n "$netBasename" ]] || usage "Config file invalid, netBasename unspecified: $configFile"
|
||||||
[[ -n $sshPrivateKey ]] || usage "Config file invalid, sshPrivateKey unspecified: $configFile"
|
[[ -n $sshPrivateKey ]] || usage "Config file invalid, sshPrivateKey unspecified: $configFile"
|
||||||
[[ -n $leaderRotation ]] || usage "Config file invalid, leaderRotation unspecified: $configFile"
|
|
||||||
[[ ${#fullnodeIpList[@]} -gt 0 ]] || usage "Config file invalid, fullnodeIpList unspecified: $configFile"
|
[[ ${#fullnodeIpList[@]} -gt 0 ]] || usage "Config file invalid, fullnodeIpList unspecified: $configFile"
|
||||||
[[ ${#fullnodeIpListPrivate[@]} -gt 0 ]] || usage "Config file invalid, fullnodeIpListPrivate unspecified: $configFile"
|
[[ ${#fullnodeIpListPrivate[@]} -gt 0 ]] || usage "Config file invalid, fullnodeIpListPrivate unspecified: $configFile"
|
||||||
[[ ${#fullnodeIpList[@]} -eq ${#fullnodeIpListPrivate[@]} ]] || usage "Config file invalid, fullnodeIpList/fullnodeIpListPrivate length mismatch: $configFile"
|
[[ ${#fullnodeIpList[@]} -eq ${#fullnodeIpListPrivate[@]} ]] || usage "Config file invalid, fullnodeIpList/fullnodeIpListPrivate length mismatch: $configFile"
|
||||||
|
25
net/gce.sh
25
net/gce.sh
@ -60,7 +60,6 @@ failOnValidatorBootupFailure=true
|
|||||||
publicNetwork=false
|
publicNetwork=false
|
||||||
enableGpu=false
|
enableGpu=false
|
||||||
customAddress=
|
customAddress=
|
||||||
leaderRotation=true
|
|
||||||
zones=()
|
zones=()
|
||||||
|
|
||||||
containsZone() {
|
containsZone() {
|
||||||
@ -113,7 +112,6 @@ Manage testnet instances
|
|||||||
* For EC2, [address] is the "allocation ID" of the desired
|
* For EC2, [address] is the "allocation ID" of the desired
|
||||||
Elastic IP.
|
Elastic IP.
|
||||||
-d [disk-type] - Specify a boot disk type (default None) Use pd-ssd to get ssd on GCE.
|
-d [disk-type] - Specify a boot disk type (default None) Use pd-ssd to get ssd on GCE.
|
||||||
-b - Disable leader rotation
|
|
||||||
|
|
||||||
config-specific options:
|
config-specific options:
|
||||||
-P - Use public network IP addresses (default: $publicNetwork)
|
-P - Use public network IP addresses (default: $publicNetwork)
|
||||||
@ -135,7 +133,7 @@ shift
|
|||||||
[[ $command = create || $command = config || $command = info || $command = delete ]] ||
|
[[ $command = create || $command = config || $command = info || $command = delete ]] ||
|
||||||
usage "Invalid command: $command"
|
usage "Invalid command: $command"
|
||||||
|
|
||||||
while getopts "h?p:Pn:c:z:gG:a:d:buxf" opt; do
|
while getopts "h?p:Pn:c:z:gG:a:d:uxf" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
@ -156,9 +154,6 @@ while getopts "h?p:Pn:c:z:gG:a:d:buxf" opt; do
|
|||||||
z)
|
z)
|
||||||
containsZone "$OPTARG" "${zones[@]}" || zones+=("$OPTARG")
|
containsZone "$OPTARG" "${zones[@]}" || zones+=("$OPTARG")
|
||||||
;;
|
;;
|
||||||
b)
|
|
||||||
leaderRotation=false
|
|
||||||
;;
|
|
||||||
g)
|
g)
|
||||||
enableGpu=true
|
enableGpu=true
|
||||||
bootstrapLeaderMachineType=$gpuBootstrapLeaderMachineType
|
bootstrapLeaderMachineType=$gpuBootstrapLeaderMachineType
|
||||||
@ -320,7 +315,6 @@ prepareInstancesAndWriteConfigFile() {
|
|||||||
netBasename=$prefix
|
netBasename=$prefix
|
||||||
publicNetwork=$publicNetwork
|
publicNetwork=$publicNetwork
|
||||||
sshPrivateKey=$sshPrivateKey
|
sshPrivateKey=$sshPrivateKey
|
||||||
leaderRotation=$leaderRotation
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
touch "$geoipConfigFile"
|
touch "$geoipConfigFile"
|
||||||
@ -482,18 +476,9 @@ EOF
|
|||||||
delete() {
|
delete() {
|
||||||
$metricsWriteDatapoint "testnet-deploy net-delete-begin=1"
|
$metricsWriteDatapoint "testnet-deploy net-delete-begin=1"
|
||||||
|
|
||||||
# Delete the bootstrap leader first to prevent unusual metrics on the dashboard
|
# Filter for all nodes
|
||||||
# during shutdown (only applicable when leader rotation is disabled).
|
filter="$prefix-"
|
||||||
# TODO: It would be better to fully cut-off metrics reporting before any
|
|
||||||
# instances are deleted.
|
|
||||||
filters=("$prefix-bootstrap-leader")
|
|
||||||
for zone in "${zones[@]}"; do
|
|
||||||
filters+=("$prefix-$zone")
|
|
||||||
done
|
|
||||||
# Filter for all other nodes (client, blockstreamer)
|
|
||||||
filters+=("$prefix-")
|
|
||||||
|
|
||||||
for filter in "${filters[@]}"; do
|
|
||||||
echo "Searching for instances: $filter"
|
echo "Searching for instances: $filter"
|
||||||
cloud_FindInstances "$filter"
|
cloud_FindInstances "$filter"
|
||||||
|
|
||||||
@ -502,7 +487,6 @@ delete() {
|
|||||||
else
|
else
|
||||||
cloud_DeleteInstances true &
|
cloud_DeleteInstances true &
|
||||||
fi
|
fi
|
||||||
done
|
|
||||||
|
|
||||||
wait
|
wait
|
||||||
|
|
||||||
@ -513,7 +497,6 @@ delete() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
$metricsWriteDatapoint "testnet-deploy net-delete-complete=1"
|
$metricsWriteDatapoint "testnet-deploy net-delete-complete=1"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case $command in
|
case $command in
|
||||||
@ -543,8 +526,6 @@ Network composition:
|
|||||||
Client(s) = $clientNodeCount x $clientMachineType
|
Client(s) = $clientNodeCount x $clientMachineType
|
||||||
Blockstreamer = $blockstreamer
|
Blockstreamer = $blockstreamer
|
||||||
|
|
||||||
Leader rotation: $leaderRotation
|
|
||||||
|
|
||||||
========================================================================================
|
========================================================================================
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
@ -294,7 +294,6 @@ startBootstrapLeader() {
|
|||||||
$((${#fullnodeIpList[@]} + ${#blockstreamerIpList[@]})) \
|
$((${#fullnodeIpList[@]} + ${#blockstreamerIpList[@]})) \
|
||||||
\"$RUST_LOG\" \
|
\"$RUST_LOG\" \
|
||||||
$skipSetup \
|
$skipSetup \
|
||||||
$leaderRotation \
|
|
||||||
$failOnValidatorBootupFailure \
|
$failOnValidatorBootupFailure \
|
||||||
"
|
"
|
||||||
) >> "$logFile" 2>&1 || {
|
) >> "$logFile" 2>&1 || {
|
||||||
@ -322,7 +321,6 @@ startNode() {
|
|||||||
$((${#fullnodeIpList[@]} + ${#blockstreamerIpList[@]})) \
|
$((${#fullnodeIpList[@]} + ${#blockstreamerIpList[@]})) \
|
||||||
\"$RUST_LOG\" \
|
\"$RUST_LOG\" \
|
||||||
$skipSetup \
|
$skipSetup \
|
||||||
$leaderRotation \
|
|
||||||
$failOnValidatorBootupFailure \
|
$failOnValidatorBootupFailure \
|
||||||
"
|
"
|
||||||
) >> "$logFile" 2>&1 &
|
) >> "$logFile" 2>&1 &
|
||||||
@ -615,10 +613,6 @@ start)
|
|||||||
start
|
start
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
$leaderRotation || {
|
|
||||||
echo Warning: unable to update because leader rotation is disabled
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
skipSetup=true
|
skipSetup=true
|
||||||
updateNodes=true
|
updateNodes=true
|
||||||
start
|
start
|
||||||
|
@ -10,8 +10,7 @@ entrypointIp="$3"
|
|||||||
numNodes="$4"
|
numNodes="$4"
|
||||||
RUST_LOG="$5"
|
RUST_LOG="$5"
|
||||||
skipSetup="$6"
|
skipSetup="$6"
|
||||||
leaderRotation="$7"
|
failOnValidatorBootupFailure="$7"
|
||||||
failOnValidatorBootupFailure="$8"
|
|
||||||
set +x
|
set +x
|
||||||
export RUST_LOG
|
export RUST_LOG
|
||||||
|
|
||||||
@ -33,14 +32,12 @@ missing() {
|
|||||||
[[ -n $entrypointIp ]] || missing entrypointIp
|
[[ -n $entrypointIp ]] || missing entrypointIp
|
||||||
[[ -n $numNodes ]] || missing numNodes
|
[[ -n $numNodes ]] || missing numNodes
|
||||||
[[ -n $skipSetup ]] || missing skipSetup
|
[[ -n $skipSetup ]] || missing skipSetup
|
||||||
[[ -n $leaderRotation ]] || missing leaderRotation
|
|
||||||
[[ -n $failOnValidatorBootupFailure ]] || missing failOnValidatorBootupFailure
|
[[ -n $failOnValidatorBootupFailure ]] || missing failOnValidatorBootupFailure
|
||||||
|
|
||||||
cat > deployConfig <<EOF
|
cat > deployConfig <<EOF
|
||||||
deployMethod="$deployMethod"
|
deployMethod="$deployMethod"
|
||||||
entrypointIp="$entrypointIp"
|
entrypointIp="$entrypointIp"
|
||||||
numNodes="$numNodes"
|
numNodes="$numNodes"
|
||||||
leaderRotation=$leaderRotation
|
|
||||||
failOnValidatorBootupFailure=$failOnValidatorBootupFailure
|
failOnValidatorBootupFailure=$failOnValidatorBootupFailure
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
@ -109,11 +106,7 @@ local|tar)
|
|||||||
--stake 0
|
--stake 0
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
if $leaderRotation; then
|
args+=(--stake "$stake")
|
||||||
args+=("--stake" "$stake")
|
|
||||||
else
|
|
||||||
args+=("--stake" 0)
|
|
||||||
fi
|
|
||||||
args+=(--enable-rpc-exit)
|
args+=(--enable-rpc-exit)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@ missing() {
|
|||||||
[[ -n $deployMethod ]] || missing deployMethod
|
[[ -n $deployMethod ]] || missing deployMethod
|
||||||
[[ -n $entrypointIp ]] || missing entrypointIp
|
[[ -n $entrypointIp ]] || missing entrypointIp
|
||||||
[[ -n $numNodes ]] || missing numNodes
|
[[ -n $numNodes ]] || missing numNodes
|
||||||
[[ -n $leaderRotation ]] || missing leaderRotation
|
|
||||||
[[ -n $failOnValidatorBootupFailure ]] || missing failOnValidatorBootupFailure
|
[[ -n $failOnValidatorBootupFailure ]] || missing failOnValidatorBootupFailure
|
||||||
|
|
||||||
ledgerVerify=true
|
ledgerVerify=true
|
||||||
|
Reference in New Issue
Block a user