Deploy mac OS solana-install update package to testnets (#4595)
This commit is contained in:
parent
37c2fa1d8d
commit
8e46c44f3e
|
@ -1,12 +1,14 @@
|
||||||
{
|
{
|
||||||
"_public_key": "ae29f4f7ad2fc92de70d470e411c8426d5d48db8817c9e3dae574b122192335f",
|
"_public_key": "ae29f4f7ad2fc92de70d470e411c8426d5d48db8817c9e3dae574b122192335f",
|
||||||
"environment": {
|
"environment": {
|
||||||
"CODECOV_TOKEN": "EJ[1:eSGdiZR0Qi0g7qnsI+qJ5H+/ik+H2qL3ned/cBdv/SY=:jA0WqO70coUtF0iokRdgtCR/lF/lETAI:d/Wl8Tdl6xVh/B39cTf1DaQkomR7I/2vMhvxd1msJ++BjI2l3p2dFoGsXqWT+/os8VgiPg==]",
|
"CODECOV_TOKEN": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:ks2/ElgxwgxqgmFcxTHANNLmj23YH74h:U4uzRONRfiQyqy6HrPQ/e7OnBUY4HkW37R0iekkF3KJ9UGnHqT1UvwgVbDqLahtDIJ4rWw==]",
|
||||||
"CRATES_IO_TOKEN": "EJ[1:eSGdiZR0Qi0g7qnsI+qJ5H+/ik+H2qL3ned/cBdv/SY=:2FaZ6k4RGH8luyNRaN6yeZUQDNAu2KwC:XeYe0tCAivYE0F9HEWM79mAI6kNbfYaqP7k7yY+SBDvs0341U9BdGZp7SErbHleS]",
|
"CRATES_IO_TOKEN": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:lKMh3aLW+jyRrfS/c7yvkpB+TaPhXqLq:j0v27EbaPgwRdHZAbsM0FlAnt3r9ScQrFbWJYOAZtM3qestEiByTlKpZ0eyF/823]",
|
||||||
"GITHUB_TOKEN": "EJ[1:eSGdiZR0Qi0g7qnsI+qJ5H+/ik+H2qL3ned/cBdv/SY=:9kh4DGPiGDcUU7ejSFWg3gTW8nrOM09Q:b+GE07Wu6/bEnkDZcUtf48vTKAFph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_x86_64_apple_darwin": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:wFDl3INEnA3EQDHRX40avqGe1OMoJxyy:6ncCRVRTIRuYI5o/gayeuWCudWvmKNYr8KEHAWeTq34a5bdcKInBdKhjmjX+wLHqsEwQ5gcyhcxy4Ri2mbuN6AHazfZOZlubQkGlyUOAIYO5D5jkbyIh40DAtjVzo1MD/0HsW9zdGOzqUKp5xJJeDsbR4F153jbxa7fvwF90Q4UQjYFTKAtExEmHtDGSJG48ToVwTabTV/OnISMIggDZBviIv2QWHvXgK07b2mUj34rHJywEDGN1nj5rITTDdUeRcB1x4BAMOe94kTFPSTaj/OszvYlGECt8rkKFqbm092qL+XLfiBaImqe/WJHRCnAj6Don]",
|
||||||
|
"SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_pc_windows_msvc": "EJ[1:8iZ6baJB4fbBV+XDsrUooyGAnGL/8Ol+4Qd0zKh5YjI=:wAh+dBuZopv6vruVOYegUcq/aBnbksT1:qIJfCfDvDWiqicMOkmbJs/0n7UJLKNmgMQaKzeQ8J7Q60YpXbtWzKVW3tS6lzlgf64m3MrPXyo1C+mWh6jkjsb18T/OfggZy1ZHM4AcsOC6/ldUkV5YtuxUQuAmd5jCuV/R7iuYY8Z66AcfAevlb+bnLpgIifdA8fh/IktOo58nZUQwZDdppAacmftsLc6Frn5Er6A6+EXpxK1nmnlmLJ4AJztqlh6X0r+JvE2O7qeoZUXrIegnkxo7Aay7I/dd8zdYpp7ICSiTEtfVN/xNIu/5QmTRU7gWoz7cPl9epq4aiEALzPOzb6KVOiRcsOg+TlFvLQ71Ik5o=]"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,11 +64,11 @@ for more detail on cluster activity.
|
||||||
##### Bootstrap with `solana-install`
|
##### Bootstrap with `solana-install`
|
||||||
|
|
||||||
The `solana-install` tool can be used to easily install and upgrade the cluster
|
The `solana-install` tool can be used to easily install and upgrade the cluster
|
||||||
software on Linux x86_64 systems.
|
software on Linux x86_64 and mac OS systems.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ export SOLANA_RELEASE=v0.14.2 # skip this line to install the latest release
|
$ export SOLANA_RELEASE=v0.16.0 # skip this line to install the latest release
|
||||||
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.14.0/install/solana-install-init.sh | sh -s
|
$ curl -sSf https://raw.githubusercontent.com/solana-labs/solana/v0.16.0/install/solana-install-init.sh | sh -s
|
||||||
```
|
```
|
||||||
|
|
||||||
Alternatively build the `solana-install` program from source and run the
|
Alternatively build the `solana-install` program from source and run the
|
||||||
|
@ -81,8 +81,9 @@ After a successful install, `solana-install update` may be used to easily update
|
||||||
software to a newer version.
|
software to a newer version.
|
||||||
|
|
||||||
##### Download Prebuilt Binaries
|
##### Download Prebuilt Binaries
|
||||||
Binaries are available for Linux x86_64 systems.
|
Binaries are available for Linux x86_64 and mac OS systems.
|
||||||
|
|
||||||
|
###### Linux
|
||||||
Download the binaries by navigating to
|
Download the binaries by navigating to
|
||||||
[https://github.com/solana-labs/solana/releases/latest](https://github.com/solana-labs/solana/releases/latest),
|
[https://github.com/solana-labs/solana/releases/latest](https://github.com/solana-labs/solana/releases/latest),
|
||||||
download **solana-release-x86_64-unknown-linux-gnu.tar.bz2**, then extract the
|
download **solana-release-x86_64-unknown-linux-gnu.tar.bz2**, then extract the
|
||||||
|
@ -92,6 +93,17 @@ $ tar jxf solana-release-x86_64-unknown-linux-gnu.tar.bz2
|
||||||
$ cd solana-release/
|
$ cd solana-release/
|
||||||
$ export PATH=$PWD/bin:$PATH
|
$ export PATH=$PWD/bin:$PATH
|
||||||
```
|
```
|
||||||
|
###### mac OS
|
||||||
|
Download the binaries by navigating to
|
||||||
|
[https://github.com/solana-labs/solana/releases/latest](https://github.com/solana-labs/solana/releases/latest),
|
||||||
|
download **solana-release-x86_64-apple-darwin.tar.bz2**, then extract the
|
||||||
|
archive:
|
||||||
|
```bash
|
||||||
|
$ tar jxf solana-release-x86_64-apple-darwin.tar.bz2
|
||||||
|
$ cd solana-release/
|
||||||
|
$ export PATH=$PWD/bin:$PATH
|
||||||
|
```
|
||||||
|
|
||||||
##### Build From Source
|
##### Build From Source
|
||||||
If you are unable to use the prebuilt binaries or prefer to build it yourself
|
If you are unable to use the prebuilt binaries or prefer to build it yourself
|
||||||
from source, navigate to
|
from source, navigate to
|
||||||
|
|
|
@ -327,10 +327,11 @@ if ! $skipStart; then
|
||||||
args+=(-F)
|
args+=(-F)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2154 # SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu comes from .buildkite/env/
|
if $deployUpdateManifest; then
|
||||||
if $deployUpdateManifest && [[ -n $SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu ]]; then
|
rm -f update_manifest_keypair.json
|
||||||
echo "$SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu" > update_manifest_keypair.json
|
args+=(--deploy-update linux)
|
||||||
args+=(-i update_manifest_keypair.json)
|
args+=(--deploy-update osx)
|
||||||
|
#args+=(--deploy-update windows)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086 # Don't want to double quote the $maybeXYZ variables
|
# shellcheck disable=SC2086 # Don't want to double quote the $maybeXYZ variables
|
||||||
|
|
|
@ -23,8 +23,9 @@ lazy_static! {
|
||||||
|
|
||||||
pub fn update_manifest_pubkey(target: &str) -> Option<&str> {
|
pub fn update_manifest_pubkey(target: &str) -> Option<&str> {
|
||||||
match target {
|
match target {
|
||||||
"x86_64-apple-darwin" => None,
|
"x86_64-apple-darwin" => Some("GRUP8YUGASLdu2gBwHstFgeVH28qppfuCaTzq5Yo7wRo"), // SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_apple_darwin
|
||||||
"x86_64-unknown-linux-gnu" => Some("FnKt2ES9iUJkjoprf2rL62xxBAxZLVgyA4SFexPGotFE"), // SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu
|
"x86_64-unknown-linux-gnu" => Some("FnKt2ES9iUJkjoprf2rL62xxBAxZLVgyA4SFexPGotFE"), // SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu
|
||||||
|
"x86_64-pc-windows-msvc" => Some("2Lrj5xDCHDmqwCgGwjVqAUUM84vLpj5dReYeoXL9vSXV"), // SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_pc_windows_msvc
|
||||||
_ => None,
|
_ => None,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
#
|
|
||||||
# Convenience script to easily deploy a software update to one of the testnets
|
|
||||||
#
|
|
||||||
# Prerequisites:
|
|
||||||
# 1) The default keypair should have some lamports (eg, `solana-wallet airdrop 123`)
|
|
||||||
# 2) The file update_manifest_keypair.json should exist if this script is not
|
|
||||||
# run from the CI environment
|
|
||||||
#
|
|
||||||
set -e
|
|
||||||
|
|
||||||
CHANNEL=$1
|
|
||||||
TAG=$2
|
|
||||||
|
|
||||||
if [[ -z $CHANNEL || -z $TAG ]]; then
|
|
||||||
echo "Usage: $0 [channel] [release tag]"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Prefer possible `cargo build --all` binaries over PATH binaries
|
|
||||||
PATH=$(cd "$(dirname "$0")/.."; echo "$PWD")/target/debug:$PATH
|
|
||||||
|
|
||||||
# shellcheck disable=2154 # is referenced but not assigned
|
|
||||||
if [[ -n $SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu ]]; then
|
|
||||||
echo "$SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_x86_64_unknown_linux_gnu" > update_manifest_keypair.json
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $CHANNEL in
|
|
||||||
edge|beta)
|
|
||||||
URL=https://api.$CHANNEL.testnet.solana.com
|
|
||||||
;;
|
|
||||||
stable)
|
|
||||||
URL=https://api.testnet.solana.com
|
|
||||||
;;
|
|
||||||
localhost)
|
|
||||||
URL=http://localhost:8899
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Error: unknown channel: $CHANNEL"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
set -x
|
|
||||||
solana-install deploy --url "$URL" \
|
|
||||||
https://github.com/solana-labs/solana/releases/download/"$TAG"/solana-release-x86_64-unknown-linux-gnu.tar.bz2 \
|
|
||||||
update_manifest_keypair.json
|
|
53
net/net.sh
53
net/net.sh
|
@ -30,7 +30,8 @@ Operate a configured 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)
|
||||||
-i update_manifest_keypair - Deploy the tarball using 'solana-install deploy ...'
|
--deploy-update linux|osx|windows - Deploy the tarball using 'solana-install deploy ...' for the
|
||||||
|
given platform (multiple platforms may be specified)
|
||||||
(-t option must be supplied as well)
|
(-t option must be supplied as well)
|
||||||
-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)
|
||||||
|
@ -80,8 +81,7 @@ cargoFeatures=
|
||||||
skipSetup=false
|
skipSetup=false
|
||||||
updateNodes=false
|
updateNodes=false
|
||||||
customPrograms=
|
customPrograms=
|
||||||
updateManifestKeypairFile=
|
updatePlatforms=
|
||||||
updateDownloadUrl=
|
|
||||||
numBenchTpsClients=0
|
numBenchTpsClients=0
|
||||||
numBenchExchangeClients=0
|
numBenchExchangeClients=0
|
||||||
benchTpsExtraArgs=
|
benchTpsExtraArgs=
|
||||||
|
@ -100,6 +100,9 @@ while [[ -n $1 ]]; do
|
||||||
if [[ $1 = --hashes-per-tick ]]; then
|
if [[ $1 = --hashes-per-tick ]]; then
|
||||||
genesisOptions="$genesisOptions $1 $2"
|
genesisOptions="$genesisOptions $1 $2"
|
||||||
shift 2
|
shift 2
|
||||||
|
elif [[ $1 = --deploy-update ]]; then
|
||||||
|
updatePlatforms="$updatePlatforms $2"
|
||||||
|
shift 2
|
||||||
else
|
else
|
||||||
usage "Unknown long option: $1"
|
usage "Unknown long option: $1"
|
||||||
fi
|
fi
|
||||||
|
@ -109,7 +112,7 @@ while [[ -n $1 ]]; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
while getopts "h?T:t:o:f:rD:i:c:Fn:" opt "${shortArgs[@]}"; do
|
while getopts "h?T:t:o:f:rD:c:Fn:" opt "${shortArgs[@]}"; do
|
||||||
case $opt in
|
case $opt in
|
||||||
h | \?)
|
h | \?)
|
||||||
usage
|
usage
|
||||||
|
@ -136,13 +139,6 @@ while getopts "h?T:t:o:f:rD:i:c:Fn:" opt "${shortArgs[@]}"; do
|
||||||
n)
|
n)
|
||||||
numFullnodesRequested=$OPTARG
|
numFullnodesRequested=$OPTARG
|
||||||
;;
|
;;
|
||||||
i)
|
|
||||||
updateManifestKeypairFile=$OPTARG
|
|
||||||
if [[ ! -r $updateManifestKeypairFile ]]; then
|
|
||||||
echo "Error: unable to read the file $updateManifestKeypairFile"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
r)
|
r)
|
||||||
skipSetup=true
|
skipSetup=true
|
||||||
;;
|
;;
|
||||||
|
@ -413,26 +409,31 @@ sanity() {
|
||||||
}
|
}
|
||||||
|
|
||||||
deployUpdate() {
|
deployUpdate() {
|
||||||
if [[ -z $updateManifestKeypairFile ]]; then
|
if [[ -z $updatePlatforms ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
[[ $deployMethod = tar ]] || exit 1
|
[[ $deployMethod = tar ]] || exit 1
|
||||||
[[ -n $updateDownloadUrl ]] || exit 1
|
|
||||||
|
|
||||||
declare ok=true
|
declare ok=true
|
||||||
declare bootstrapLeader=${fullnodeIpList[0]}
|
declare bootstrapLeader=${fullnodeIpList[0]}
|
||||||
|
|
||||||
echo "--- Deploying solana-install update: $updateDownloadUrl"
|
for updatePlatform in $updatePlatforms; do
|
||||||
(
|
echo "--- Deploying solana-install update: $updatePlatform"
|
||||||
set -x
|
(
|
||||||
timeout 30s scp "${sshOptions[@]}" \
|
set -x
|
||||||
"$updateManifestKeypairFile" "$bootstrapLeader:solana/update_manifest_keypair.json"
|
|
||||||
|
scripts/solana-install-update-manifest-keypair.sh "$updatePlatform"
|
||||||
|
|
||||||
|
timeout 30s scp "${sshOptions[@]}" \
|
||||||
|
update_manifest_keypair.json "$bootstrapLeader:solana/update_manifest_keypair.json"
|
||||||
|
|
||||||
|
# shellcheck disable=SC2029 # remote-deploy-update.sh args are expanded on client side intentionally
|
||||||
|
ssh "${sshOptions[@]}" "$bootstrapLeader" \
|
||||||
|
"./solana/net/remote/remote-deploy-update.sh $releaseChannel $updatePlatform"
|
||||||
|
) || ok=false
|
||||||
|
$ok || exit 1
|
||||||
|
done
|
||||||
|
|
||||||
# shellcheck disable=SC2029 # remote-deploy-update.sh args are expanded on client side intentionally
|
|
||||||
ssh "${sshOptions[@]}" "$bootstrapLeader" \
|
|
||||||
"./solana/net/remote/remote-deploy-update.sh $updateDownloadUrl \"$RUST_LOG\""
|
|
||||||
) || ok=false
|
|
||||||
$ok || exit 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
@ -440,15 +441,15 @@ start() {
|
||||||
tar)
|
tar)
|
||||||
if [[ -n $releaseChannel ]]; then
|
if [[ -n $releaseChannel ]]; then
|
||||||
rm -f "$SOLANA_ROOT"/solana-release.tar.bz2
|
rm -f "$SOLANA_ROOT"/solana-release.tar.bz2
|
||||||
updateDownloadUrl=http://release.solana.com/"$releaseChannel"/solana-release-x86_64-unknown-linux-gnu.tar.bz2
|
declare updateDownloadUrl=http://release.solana.com/"$releaseChannel"/solana-release-x86_64-unknown-linux-gnu.tar.bz2
|
||||||
(
|
(
|
||||||
set -x
|
set -x
|
||||||
curl -o "$SOLANA_ROOT"/solana-release.tar.bz2 "$updateDownloadUrl"
|
curl -o "$SOLANA_ROOT"/solana-release.tar.bz2 "$updateDownloadUrl"
|
||||||
)
|
)
|
||||||
tarballFilename="$SOLANA_ROOT"/solana-release.tar.bz2
|
tarballFilename="$SOLANA_ROOT"/solana-release.tar.bz2
|
||||||
else
|
else
|
||||||
if [[ -n $updateManifestKeypairFile ]]; then
|
if [[ -n $updatePlatforms ]]; then
|
||||||
echo "Error: -i argument was provided but -t was not"
|
echo "Error: --deploy-update argument was provided but -t was not"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -6,7 +6,8 @@ set -e
|
||||||
|
|
||||||
cd "$(dirname "$0")"/../..
|
cd "$(dirname "$0")"/../..
|
||||||
|
|
||||||
updateDownloadUrl=$1
|
releaseChannel=$1
|
||||||
|
updatePlatform=$2
|
||||||
|
|
||||||
[[ -r deployConfig ]] || {
|
[[ -r deployConfig ]] || {
|
||||||
echo deployConfig missing
|
echo deployConfig missing
|
||||||
|
@ -20,7 +21,9 @@ missing() {
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ -n $updateDownloadUrl ]] || missing updateDownloadUrl
|
[[ -n $releaseChannel ]] || missing releaseChannel
|
||||||
|
[[ -n $updatePlatform ]] || missing updatePlatform
|
||||||
|
[[ -f update_manifest_keypair.json ]] || missing update_manifest_keypair.json
|
||||||
|
|
||||||
RUST_LOG="$2"
|
RUST_LOG="$2"
|
||||||
export RUST_LOG=${RUST_LOG:-solana=info} # if RUST_LOG is unset, default to info
|
export RUST_LOG=${RUST_LOG:-solana=info} # if RUST_LOG is unset, default to info
|
||||||
|
@ -31,6 +34,4 @@ loadConfigFile
|
||||||
PATH="$HOME"/.cargo/bin:"$PATH"
|
PATH="$HOME"/.cargo/bin:"$PATH"
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
solana-wallet --url http://127.0.0.1:8899 airdrop 42
|
scripts/solana-install-deploy.sh localhost "$releaseChannel" "$updatePlatform"
|
||||||
solana-install deploy "$updateDownloadUrl" update_manifest_keypair.json \
|
|
||||||
--url http://127.0.0.1:8899
|
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Convenience script to easily deploy a software update to a testnet
|
||||||
|
#
|
||||||
|
set -e
|
||||||
|
SOLANA_ROOT="$(cd "$(dirname "$0")"/..; pwd)"
|
||||||
|
|
||||||
|
URL=$1
|
||||||
|
TAG=$2
|
||||||
|
OS=${3:-linux}
|
||||||
|
|
||||||
|
if [[ -z $URL || -z $TAG ]]; then
|
||||||
|
echo "Usage: $0 [edge|beta|stable|localhost|RPC URL] [edge|beta|release tag] [linux|osx|windows]"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -f update_manifest_keypair.json ]]; then
|
||||||
|
"$SOLANA_ROOT"/scripts/solana-install-update-manifest-keypair.sh "$OS"
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $URL in
|
||||||
|
edge|beta)
|
||||||
|
URL=http://$URL.testnet.solana.com:8899
|
||||||
|
;;
|
||||||
|
stable)
|
||||||
|
URL=http://testnet.solana.com:8899
|
||||||
|
;;
|
||||||
|
localhost)
|
||||||
|
URL=http://localhost:8899
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
case $TAG in
|
||||||
|
edge|beta)
|
||||||
|
DOWNLOAD_URL=http://release.solana.com/"$TAG"/solana-release-$TARGET.tar.bz2
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
DOWNLOAD_URL=https://github.com/solana-labs/solana/releases/download/"$TAG"/solana-release-$TARGET.tar.bz2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Prefer possible `cargo build` binaries over PATH binaries
|
||||||
|
PATH="$SOLANA_ROOT"/target/debug:$PATH
|
||||||
|
|
||||||
|
set -x
|
||||||
|
balance=$(solana-wallet --url "$URL" balance)
|
||||||
|
if [[ $balance = "0 lamports" ]]; then
|
||||||
|
solana-wallet --url "$URL" airdrop 42
|
||||||
|
fi
|
||||||
|
solana-install deploy --url "$URL" "$DOWNLOAD_URL" update_manifest_keypair.json
|
|
@ -0,0 +1,38 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Convenience script to easily deploy a software update to a testnet
|
||||||
|
#
|
||||||
|
# Prerequisites:
|
||||||
|
# 1) The default keypair should have some lamports (eg, `solana-wallet airdrop 123`)
|
||||||
|
# 2) The file update_manifest_keypair.json should exist if this script is not
|
||||||
|
# run from the CI environment
|
||||||
|
#
|
||||||
|
set -e
|
||||||
|
|
||||||
|
OS=${1:-linux}
|
||||||
|
|
||||||
|
case "$OS" in
|
||||||
|
osx)
|
||||||
|
TARGET=x86_64-apple-darwin
|
||||||
|
;;
|
||||||
|
linux)
|
||||||
|
TARGET=x86_64-unknown-linux-gnu
|
||||||
|
;;
|
||||||
|
windows)
|
||||||
|
TARGET=x86_64-pc-windows-msvc
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
TARGET=unknown-unknown-unknown
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR="SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR_${TARGET//-/_}"
|
||||||
|
|
||||||
|
# shellcheck disable=2154 # is referenced but not assigned
|
||||||
|
if [[ -z ${!SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR} ]]; then
|
||||||
|
echo "$SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR not defined"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${!SOLANA_INSTALL_UPDATE_MANIFEST_KEYPAIR}" > update_manifest_keypair.json
|
||||||
|
ls -l update_manifest_keypair.json
|
Loading…
Reference in New Issue