net/: Add solana-install test to sanity (#4438)
* Add instance creation date to motd * Setup localtime * Add solana-install test
This commit is contained in:
18
net/gce.sh
18
net/gce.sh
@ -522,20 +522,27 @@ create)
|
|||||||
|
|
||||||
printNetworkInfo() {
|
printNetworkInfo() {
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
========================================================================================
|
==[ Network composition ]===============================================================
|
||||||
|
|
||||||
Network composition:
|
|
||||||
Bootstrap leader = $bootstrapLeaderMachineType (GPU=$enableGpu)
|
Bootstrap leader = $bootstrapLeaderMachineType (GPU=$enableGpu)
|
||||||
Additional fullnodes = $additionalFullNodeCount x $fullNodeMachineType
|
Additional fullnodes = $additionalFullNodeCount x $fullNodeMachineType
|
||||||
Client(s) = $clientNodeCount x $clientMachineType
|
Client(s) = $clientNodeCount x $clientMachineType
|
||||||
Blockstreamer = $blockstreamer
|
Blockstreamer = $blockstreamer
|
||||||
|
|
||||||
========================================================================================
|
========================================================================================
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
printNetworkInfo
|
printNetworkInfo
|
||||||
|
|
||||||
|
creationDate=$(date)
|
||||||
|
creationInfo() {
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
Instance running since: $creationDate
|
||||||
|
|
||||||
|
========================================================================================
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
declare startupScript="$netConfigDir"/instance-startup-script.sh
|
declare startupScript="$netConfigDir"/instance-startup-script.sh
|
||||||
cat > "$startupScript" <<EOF
|
cat > "$startupScript" <<EOF
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
@ -554,6 +561,7 @@ cat > /etc/motd <<EOM
|
|||||||
$ until [[ -f /.instance-startup-complete ]]; do sleep 1; done
|
$ until [[ -f /.instance-startup-complete ]]; do sleep 1; done
|
||||||
|
|
||||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
$(creationInfo)
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
# Place the generated private key at /solana-id_ecdsa so it's retrievable by anybody
|
# Place the generated private key at /solana-id_ecdsa so it's retrievable by anybody
|
||||||
@ -579,6 +587,7 @@ $(
|
|||||||
install-nodejs.sh \
|
install-nodejs.sh \
|
||||||
install-redis.sh \
|
install-redis.sh \
|
||||||
install-rsync.sh \
|
install-rsync.sh \
|
||||||
|
localtime.sh \
|
||||||
network-config.sh \
|
network-config.sh \
|
||||||
remove-docker-interface.sh \
|
remove-docker-interface.sh \
|
||||||
|
|
||||||
@ -590,6 +599,7 @@ $(
|
|||||||
|
|
||||||
cat > /etc/motd <<EOM
|
cat > /etc/motd <<EOM
|
||||||
$(printNetworkInfo)
|
$(printNetworkInfo)
|
||||||
|
$(creationInfo)
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
touch /.instance-startup-complete
|
touch /.instance-startup-complete
|
||||||
|
@ -69,8 +69,9 @@ local|tar)
|
|||||||
entrypointRsyncUrl="$entrypointIp:~/solana"
|
entrypointRsyncUrl="$entrypointIp:~/solana"
|
||||||
|
|
||||||
solana_gossip=solana-gossip
|
solana_gossip=solana-gossip
|
||||||
solana_ledger_tool=solana-ledger-tool
|
solana_install=solana-install
|
||||||
solana_keygen=solana-keygen
|
solana_keygen=solana-keygen
|
||||||
|
solana_ledger_tool=solana-ledger-tool
|
||||||
|
|
||||||
ledger=config-local/bootstrap-leader-ledger
|
ledger=config-local/bootstrap-leader-ledger
|
||||||
client_id=config-local/client-id.json
|
client_id=config-local/client-id.json
|
||||||
@ -163,4 +164,21 @@ else
|
|||||||
echo "Note: validator sanity disabled"
|
echo "Note: validator sanity disabled"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -r update_manifest_keypair.json ]]; then
|
||||||
|
echo "--- $entrypointIp: solana-install test"
|
||||||
|
|
||||||
|
(
|
||||||
|
set -x
|
||||||
|
update_manifest_pubkey=$($solana_keygen pubkey update_manifest_keypair.json)
|
||||||
|
rm -rf install-data-dir
|
||||||
|
$solana_install init \
|
||||||
|
--no-modify-path \
|
||||||
|
--data-dir install-data-dir \
|
||||||
|
--url http://"$entrypointIp":8899 \
|
||||||
|
--pubkey "$update_manifest_pubkey"
|
||||||
|
|
||||||
|
$solana_install info
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
echo --- Pass
|
echo --- Pass
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Rsync setup for Snap builds
|
# Rsync setup
|
||||||
#
|
#
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
10
net/scripts/localtime.sh
Executable file
10
net/scripts/localtime.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#
|
||||||
|
# Setup timezone
|
||||||
|
#
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
[[ $(uname) = Linux ]] || exit 1
|
||||||
|
[[ $USER = root ]] || exit 1
|
||||||
|
|
||||||
|
ln -sf /usr/share/zoneinfo/America/Los_Angeles /etc/localtime
|
Reference in New Issue
Block a user