Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
68b024ee8d | |||
c9b7d02afd | |||
db3ef53cac | |||
1a813b8b68 | |||
bd9bb21045 | |||
3358a0bce6 |
@ -1,38 +1,11 @@
|
||||
steps:
|
||||
- command: "ci/docker-run.sh rust ci/test-stable.sh"
|
||||
name: "stable [public]"
|
||||
env:
|
||||
CARGO_TARGET_CACHE_NAME: "stable"
|
||||
timeout_in_minutes: 20
|
||||
- command: "ci/shellcheck.sh"
|
||||
name: "shellcheck [public]"
|
||||
timeout_in_minutes: 20
|
||||
- command: "ci/docker-run.sh solanalabs/rust-nightly ci/test-nightly.sh"
|
||||
name: "nightly [public]"
|
||||
env:
|
||||
CARGO_TARGET_CACHE_NAME: "nightly"
|
||||
timeout_in_minutes: 30
|
||||
- command: "ci/test-stable-perf.sh"
|
||||
name: "stable-perf [public]"
|
||||
env:
|
||||
CARGO_TARGET_CACHE_NAME: "stable-perf"
|
||||
timeout_in_minutes: 20
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: "*"
|
||||
limit: 2
|
||||
agents:
|
||||
- "queue=cuda"
|
||||
- command: "ci/pr-snap.sh"
|
||||
timeout_in_minutes: 20
|
||||
name: "snap [public]"
|
||||
- wait
|
||||
- command: "ci/publish-crate.sh"
|
||||
timeout_in_minutes: 20
|
||||
name: "publish crate [public]"
|
||||
- command: "ci/hoover.sh"
|
||||
timeout_in_minutes: 20
|
||||
name: "clean agent [public]"
|
||||
- trigger: "solana-snap"
|
||||
branches: "!pull/*"
|
||||
async: true
|
||||
build:
|
||||
message: "${BUILDKITE_MESSAGE}"
|
||||
commit: "${BUILDKITE_COMMIT}"
|
||||
branch: "${BUILDKITE_BRANCH}"
|
||||
env:
|
||||
BUILDKITE_TAG: "${BUILDKITE_TAG}"
|
||||
PARENT_BUILDKITE_TAG: "${BUILDKITE_TAG}"
|
||||
|
68
ci/refresh-testnet.sh
Executable file
68
ci/refresh-testnet.sh
Executable file
@ -0,0 +1,68 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Refreshes the Solana software running on the Testnet full nodes
|
||||
#
|
||||
# This script must be run by a user/machine that has successfully authenticated
|
||||
# with GCP and has sufficient permission.
|
||||
#
|
||||
|
||||
if [[ -z $SOLANA_METRICS_CONFIG ]]; then
|
||||
echo Error: SOLANA_METRICS_CONFIG environment variable is unset
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Default to --edge channel. To select the beta channel:
|
||||
# export SOLANA_METRICS_CONFIG=--beta
|
||||
if [[ -z $SOLANA_SNAP_CHANNEL ]]; then
|
||||
SOLANA_SNAP_CHANNEL=--edge
|
||||
fi
|
||||
|
||||
vmlist=(testnet-solana-com:us-west1-b) # Leader is hard coded as the first entry
|
||||
|
||||
echo "--- Available validators"
|
||||
gcloud compute instances list --filter="labels.testnet-mode=validator"
|
||||
while read -r vmName vmZone status; do
|
||||
if [[ $status != RUNNING ]]; then
|
||||
echo "Warning: $vmName is not RUNNING, ignoring it."
|
||||
continue
|
||||
fi
|
||||
vmlist+=("$vmName:$vmZone")
|
||||
done < <(gcloud compute instances list --filter="labels.testnet-mode=validator" --format 'value(name,zone,status)')
|
||||
|
||||
|
||||
echo "--- Refreshing"
|
||||
mode=leader+drone
|
||||
for info in "${vmlist[@]}"; do
|
||||
vmName=${info%:*}
|
||||
vmZone=${info#*:}
|
||||
echo "Starting refresh for $vmName"
|
||||
|
||||
(
|
||||
echo "--- Processing $vmName in zone $vmZone as $mode"
|
||||
cat > "autogen-refresh-$vmName.sh" <<EOF
|
||||
set -x
|
||||
sudo snap remove solana
|
||||
sudo snap install solana $SOLANA_SNAP_CHANNEL --devmode
|
||||
sudo snap set solana mode=$mode metrics-config=$SOLANA_METRICS_CONFIG
|
||||
snap info solana
|
||||
sudo snap logs solana -n200
|
||||
EOF
|
||||
set -x
|
||||
gcloud compute scp --zone "$vmZone" "autogen-refresh-$vmName.sh" "$vmName":
|
||||
gcloud compute ssh "$vmName" --zone "$vmZone" \
|
||||
--ssh-flag="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -t" \
|
||||
--command="bash ./autogen-refresh-$vmName.sh"
|
||||
) > "log-$vmName.txt" 2>&1 &
|
||||
mode=validator
|
||||
done
|
||||
|
||||
echo "Waiting..."
|
||||
wait
|
||||
|
||||
for info in "${vmlist[@]}"; do
|
||||
vmName=${info%:*}
|
||||
cat "log-$vmName.txt"
|
||||
done
|
||||
|
||||
echo "--- done"
|
||||
exit 0
|
Reference in New Issue
Block a user