Support local tarball deploys
This commit is contained in:
@ -9,10 +9,10 @@ clientNodeCount=0
|
|||||||
validatorNodeCount=10
|
validatorNodeCount=10
|
||||||
publicNetwork=false
|
publicNetwork=false
|
||||||
snapChannel=edge
|
snapChannel=edge
|
||||||
releaseChannel=edge
|
tarChannelOrTag=edge
|
||||||
delete=false
|
delete=false
|
||||||
enableGpu=false
|
enableGpu=false
|
||||||
useReleaseChannel=false
|
useTarReleaseChannel=false
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
exitcode=0
|
exitcode=0
|
||||||
@ -35,7 +35,7 @@ Deploys a CD testnet
|
|||||||
-t edge|beta|stable|vX.Y.Z - Deploy the latest tarball release for the
|
-t edge|beta|stable|vX.Y.Z - Deploy the latest tarball release for the
|
||||||
specified release channel (edge|beta|stable) or release tag
|
specified release channel (edge|beta|stable) or release tag
|
||||||
(vX.Y.Z)
|
(vX.Y.Z)
|
||||||
(default: $releaseChannel)
|
(default: $tarChannelOrTag)
|
||||||
-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)
|
||||||
@ -85,8 +85,8 @@ while getopts "h?p:Pn:c:s:t:gG:a:d" opt; do
|
|||||||
t)
|
t)
|
||||||
case $OPTARG in
|
case $OPTARG in
|
||||||
edge|beta|stable|v*)
|
edge|beta|stable|v*)
|
||||||
releaseChannel=$OPTARG
|
tarChannelOrTag=$OPTARG
|
||||||
useReleaseChannel=true
|
useTarReleaseChannel=true
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
usage "Invalid release channel: $OPTARG"
|
usage "Invalid release channel: $OPTARG"
|
||||||
@ -159,9 +159,9 @@ if [[ -n $NO_LEDGER_VERIFY ]]; then
|
|||||||
maybeNoLedgerVerify="-o noLedgerVerify"
|
maybeNoLedgerVerify="-o noLedgerVerify"
|
||||||
fi
|
fi
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote maybeRejectExtraNodes
|
# shellcheck disable=SC2086 # Don't want to double quote maybeRejectExtraNodes
|
||||||
if ! $useReleaseChannel; then
|
if $useTarReleaseChannel; then
|
||||||
time net/net.sh start -s "$snapChannel" $maybeRejectExtraNodes $maybeNoValidatorSanity $maybeNoLedgerVerify
|
time net/net.sh start -t "$tarChannelOrTag" $maybeRejectExtraNodes $maybeNoValidatorSanity $maybeNoLedgerVerify
|
||||||
else
|
else
|
||||||
time net/net.sh start -t "$releaseChannel" $maybeRejectExtraNodes $maybeNoValidatorSanity $maybeNoLedgerVerify
|
time net/net.sh start -s "$snapChannel" $maybeRejectExtraNodes $maybeNoValidatorSanity $maybeNoLedgerVerify
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -409,6 +409,7 @@ $(
|
|||||||
install-earlyoom.sh \
|
install-earlyoom.sh \
|
||||||
install-libssl-compatability.sh \
|
install-libssl-compatability.sh \
|
||||||
install-rsync.sh \
|
install-rsync.sh \
|
||||||
|
update-default-cuda.sh \
|
||||||
network-config.sh \
|
network-config.sh \
|
||||||
|
|
||||||
)
|
)
|
||||||
|
11
net/net.sh
11
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 [tarFilename] - Deploy the specified release tarball
|
||||||
-t edge|beta|stable|vX.Y.Z - Deploy the latest tarball release for the
|
-t edge|beta|stable|vX.Y.Z - Deploy the latest tarball release for the
|
||||||
specified release channel (edge|beta|stable) or release tag
|
specified release channel (edge|beta|stable) or release tag
|
||||||
(vX.Y.Z)
|
(vX.Y.Z)
|
||||||
@ -57,7 +58,7 @@ command=$1
|
|||||||
[[ -n $command ]] || usage
|
[[ -n $command ]] || usage
|
||||||
shift
|
shift
|
||||||
|
|
||||||
while getopts "h?S:s:t:o:f:" opt; do
|
while getopts "h?S:s:T:t:o:f:" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
@ -78,6 +79,11 @@ while getopts "h?S:s:t:o:f:" opt; do
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
T)
|
||||||
|
tarballFilename=$OPTARG
|
||||||
|
[[ -f $tarballFilename ]] || usage "Snap not readable: $tarballFilename"
|
||||||
|
deployMethod=tar
|
||||||
|
;;
|
||||||
t)
|
t)
|
||||||
case $OPTARG in
|
case $OPTARG in
|
||||||
edge|beta|stable|v*)
|
edge|beta|stable|v*)
|
||||||
@ -266,8 +272,9 @@ start() {
|
|||||||
|
|
||||||
set -x
|
set -x
|
||||||
curl -o solana-release.tar.bz2 http://solana-release.s3.amazonaws.com/"$releaseChannel"/solana-release.tar.bz2
|
curl -o solana-release.tar.bz2 http://solana-release.s3.amazonaws.com/"$releaseChannel"/solana-release.tar.bz2
|
||||||
tar jxvf solana-release.tar.bz2
|
tarballFilename=solana-release.tar.bz2
|
||||||
fi
|
fi
|
||||||
|
tar jxvf $tarballFilename
|
||||||
;;
|
;;
|
||||||
local)
|
local)
|
||||||
build
|
build
|
||||||
|
@ -84,7 +84,7 @@ local|tar)
|
|||||||
export SOLANA_DEFAULT_METRICS_RATE=1
|
export SOLANA_DEFAULT_METRICS_RATE=1
|
||||||
|
|
||||||
./fetch-perf-libs.sh
|
./fetch-perf-libs.sh
|
||||||
export LD_LIBRARY_PATH="$PWD/target/perf-libs:$LD_LIBRARY_PATH"
|
export LD_LIBRARY_PATH="$PWD/target/perf-libs:/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
|
||||||
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
||||||
|
|
||||||
scripts/oom-monitor.sh > oom-monitor.log 2>&1 &
|
scripts/oom-monitor.sh > oom-monitor.log 2>&1 &
|
||||||
|
9
net/scripts/update-default-cuda.sh
Executable file
9
net/scripts/update-default-cuda.sh
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash -ex
|
||||||
|
#
|
||||||
|
# Updates the default cuda symlink to the supported version
|
||||||
|
#
|
||||||
|
|
||||||
|
[[ $(uname) = Linux ]] || exit 1
|
||||||
|
[[ $USER = root ]] || exit 1
|
||||||
|
|
||||||
|
ln -sfT /usr/local/cuda-9.2 /usr/local/cuda
|
Reference in New Issue
Block a user