Update testnet scripts to use release tar ball (#1660)
* Update testnet scripts to use release tar ball * use curl instead of s3cmd
This commit is contained in:
parent
6f9843c14b
commit
85869552e0
@ -33,6 +33,7 @@ if [[ -z $DRYRUN ]]; then
|
|||||||
git rev-parse HEAD
|
git rev-parse HEAD
|
||||||
) > solana-release/version.txt
|
) > solana-release/version.txt
|
||||||
|
|
||||||
|
./fetch-perf-libs.sh
|
||||||
cargo install --features=cuda --root solana-release
|
cargo install --features=cuda --root solana-release
|
||||||
./scripts/install-native-programs.sh solana-release
|
./scripts/install-native-programs.sh solana-release
|
||||||
|
|
||||||
|
@ -9,8 +9,10 @@ clientNodeCount=0
|
|||||||
validatorNodeCount=10
|
validatorNodeCount=10
|
||||||
publicNetwork=false
|
publicNetwork=false
|
||||||
snapChannel=edge
|
snapChannel=edge
|
||||||
|
releaseChannel=edge
|
||||||
delete=false
|
delete=false
|
||||||
enableGpu=false
|
enableGpu=false
|
||||||
|
useReleaseChannel=false
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
exitcode=0
|
exitcode=0
|
||||||
@ -29,6 +31,8 @@ Deploys a CD testnet
|
|||||||
options:
|
options:
|
||||||
-s edge|beta|stable - Deploy the specified Snap release channel
|
-s edge|beta|stable - Deploy the specified Snap release channel
|
||||||
(default: $snapChannel)
|
(default: $snapChannel)
|
||||||
|
-t edge|beta|stable - Deploy the specified prebuilt tar from channel
|
||||||
|
(default: $releaseChannel)
|
||||||
-n [number] - Number of validator nodes (default: $validatorNodeCount)
|
-n [number] - Number of validator nodes (default: $validatorNodeCount)
|
||||||
-c [number] - Number of client nodes (default: $clientNodeCount)
|
-c [number] - Number of client nodes (default: $clientNodeCount)
|
||||||
-P - Use public network IP addresses (default: $publicNetwork)
|
-P - Use public network IP addresses (default: $publicNetwork)
|
||||||
@ -49,7 +53,7 @@ zone=$2
|
|||||||
[[ -n $zone ]] || usage "Zone not specified"
|
[[ -n $zone ]] || usage "Zone not specified"
|
||||||
shift 2
|
shift 2
|
||||||
|
|
||||||
while getopts "h?p:Pn:c:s:gG:a:d" opt; do
|
while getopts "h?p:Pn:c:s:t:gG:a:d" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
@ -73,6 +77,17 @@ while getopts "h?p:Pn:c:s:gG:a:d" opt; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
t)
|
||||||
|
case $OPTARG in
|
||||||
|
edge|beta|stable)
|
||||||
|
releaseChannel=$OPTARG
|
||||||
|
useReleaseChannel=true
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage "Invalid release channel: $OPTARG"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
g)
|
g)
|
||||||
enableGpu=true
|
enableGpu=true
|
||||||
;;
|
;;
|
||||||
@ -131,6 +146,9 @@ if ! $publicNetwork; then
|
|||||||
maybeRejectExtraNodes="-o rejectExtraNodes"
|
maybeRejectExtraNodes="-o rejectExtraNodes"
|
||||||
fi
|
fi
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote maybeRejectExtraNodes
|
# shellcheck disable=SC2086 # Don't want to double quote maybeRejectExtraNodes
|
||||||
time net/net.sh start -s "$snapChannel" $maybeRejectExtraNodes
|
if ! $useReleaseChannel; then
|
||||||
|
time net/net.sh start -s "$snapChannel" $maybeRejectExtraNodes
|
||||||
|
else
|
||||||
|
time net/net.sh start -t "$releaseChannel" $maybeRejectExtraNodes
|
||||||
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
28
net/net.sh
28
net/net.sh
@ -25,6 +25,7 @@ Operate a configured testnet
|
|||||||
start-specific options:
|
start-specific options:
|
||||||
-S [snapFilename] - Deploy the specified Snap file
|
-S [snapFilename] - Deploy the specified Snap file
|
||||||
-s edge|beta|stable - Deploy the latest Snap on the specified Snap release channel
|
-s edge|beta|stable - Deploy the latest Snap on the specified Snap release channel
|
||||||
|
-t edge|beta|stable - Deploy the latest tarball release for the specified channel
|
||||||
-f [cargoFeatures] - List of |cargo --feaures=| to activate
|
-f [cargoFeatures] - List of |cargo --feaures=| to activate
|
||||||
(ignored if -s or -S is specified)
|
(ignored if -s or -S is specified)
|
||||||
|
|
||||||
@ -44,6 +45,7 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
snapChannel=
|
snapChannel=
|
||||||
|
releaseChannel=
|
||||||
snapFilename=
|
snapFilename=
|
||||||
deployMethod=local
|
deployMethod=local
|
||||||
sanityExtraArgs=
|
sanityExtraArgs=
|
||||||
@ -53,7 +55,7 @@ command=$1
|
|||||||
[[ -n $command ]] || usage
|
[[ -n $command ]] || usage
|
||||||
shift
|
shift
|
||||||
|
|
||||||
while getopts "h?S:s:o:f:" opt; do
|
while getopts "h?S:s:t:o:f:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
@ -74,6 +76,17 @@ while getopts "h?S:s:o:f:" opt; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
t)
|
||||||
|
case $OPTARG in
|
||||||
|
edge|beta|stable)
|
||||||
|
releaseChannel=$OPTARG
|
||||||
|
deployMethod=tar
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
usage "Invalid release channel: $OPTARG"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
f)
|
f)
|
||||||
cargoFeatures=$OPTARG
|
cargoFeatures=$OPTARG
|
||||||
;;
|
;;
|
||||||
@ -139,6 +152,9 @@ startLeader() {
|
|||||||
snap)
|
snap)
|
||||||
rsync -vPrc -e "ssh ${sshOptions[*]}" "$snapFilename" "$ipAddress:~/solana/solana.snap"
|
rsync -vPrc -e "ssh ${sshOptions[*]}" "$snapFilename" "$ipAddress:~/solana/solana.snap"
|
||||||
;;
|
;;
|
||||||
|
tar)
|
||||||
|
rsync -vPrc -e "ssh ${sshOptions[*]}" "$SOLANA_ROOT"/solana-release/bin/* "$ipAddress:~/.cargo/bin/"
|
||||||
|
;;
|
||||||
local)
|
local)
|
||||||
rsync -vPrc -e "ssh ${sshOptions[*]}" "$SOLANA_ROOT"/farf/bin/* "$ipAddress:~/.cargo/bin/"
|
rsync -vPrc -e "ssh ${sshOptions[*]}" "$SOLANA_ROOT"/farf/bin/* "$ipAddress:~/.cargo/bin/"
|
||||||
;;
|
;;
|
||||||
@ -236,6 +252,16 @@ start() {
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
tar)
|
||||||
|
if [[ -n $releaseChannel ]]; then
|
||||||
|
rm -f "$SOLANA_ROOT"/solana-release.tar.bz2
|
||||||
|
cd "$SOLANA_ROOT"
|
||||||
|
|
||||||
|
set -x
|
||||||
|
curl -o solana-release.tar.bz2 http://solana-release.s3.amazonaws.com/"$releaseChannel"/solana-release.tar.bz2
|
||||||
|
tar jxvf solana-release.tar.bz2
|
||||||
|
fi
|
||||||
|
;;
|
||||||
local)
|
local)
|
||||||
build
|
build
|
||||||
;;
|
;;
|
||||||
|
@ -35,7 +35,7 @@ snap)
|
|||||||
solana_bench_tps=/snap/bin/solana.bench-tps
|
solana_bench_tps=/snap/bin/solana.bench-tps
|
||||||
solana_keygen=/snap/bin/solana.keygen
|
solana_keygen=/snap/bin/solana.keygen
|
||||||
;;
|
;;
|
||||||
local)
|
local|tar)
|
||||||
PATH="$HOME"/.cargo/bin:"$PATH"
|
PATH="$HOME"/.cargo/bin:"$PATH"
|
||||||
export USE_INSTALL=1
|
export USE_INSTALL=1
|
||||||
export SOLANA_DEFAULT_METRICS_RATE=1
|
export SOLANA_DEFAULT_METRICS_RATE=1
|
||||||
|
@ -77,7 +77,7 @@ snap)
|
|||||||
|
|
||||||
echo "Succeeded in ${SECONDS} seconds"
|
echo "Succeeded in ${SECONDS} seconds"
|
||||||
;;
|
;;
|
||||||
local)
|
local|tar)
|
||||||
PATH="$HOME"/.cargo/bin:"$PATH"
|
PATH="$HOME"/.cargo/bin:"$PATH"
|
||||||
export USE_INSTALL=1
|
export USE_INSTALL=1
|
||||||
export RUST_LOG
|
export RUST_LOG
|
||||||
|
@ -65,7 +65,7 @@ snap)
|
|||||||
client_id=~/snap/solana/current/config/client-id.json
|
client_id=~/snap/solana/current/config/client-id.json
|
||||||
|
|
||||||
;;
|
;;
|
||||||
local)
|
local|tar)
|
||||||
PATH="$HOME"/.cargo/bin:"$PATH"
|
PATH="$HOME"/.cargo/bin:"$PATH"
|
||||||
export USE_INSTALL=1
|
export USE_INSTALL=1
|
||||||
entrypointRsyncUrl="$entrypointIp:~/solana"
|
entrypointRsyncUrl="$entrypointIp:~/solana"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user