Skip to content

Commit

Permalink
Merge pull request #48 from gregcusack/kco-stdout
Browse files Browse the repository at this point in the history
update to output to stdout instead of log files.
  • Loading branch information
Greg Cusack authored Jan 12, 2024
2 parents e30baf1 + 06bd260 commit 3d00ac8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 33 deletions.
8 changes: 5 additions & 3 deletions k8s-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ solana -ul validators # should see `--num-validators`+1 current validators (incl
- Have tested deployments of up to 1200 validators
- Once again, we assume you are logged into docker and you are pulling from a public repo (Monogon hosts need to access)

## TODO:
- Big one here is that we rely on the local solana-cli on your host machine to create genesis currently. as a result, the local cli needs to be compatible
with the validator version you are deploying in monogon. This will be fixed in the future
## Tear down network (and start a new one)
```
kubectl delete ns <namespace>
```
This will delete all services, secrets, replicasets, pods, etc. You can then deploy a new cluster as you want
8 changes: 2 additions & 6 deletions k8s-cluster/src/scripts/bootstrap-startup-script.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
#!/bin/bash
set -e

mkdir -p /home/solana/logs

# start faucet
nohup solana-faucet --keypair bootstrap-accounts/faucet.json >logs/faucet.log 2>&1 &
nohup solana-faucet --keypair bootstrap-accounts/faucet.json &

# Start the bootstrap validator node
# shellcheck disable=SC1091
source /home/solana/k8s-cluster-scripts/common.sh

# solana-ledger-tool -l ledger/ create-snapshot 0 -l ledger/

if [[ "$SOLANA_GPU_MISSING" -eq 1 ]]; then
echo "Testnet requires GPUs, but none were found! Aborting..."
exit 1
Expand Down Expand Up @@ -137,7 +133,7 @@ args+=(
--identity "$identity" \
--vote-account "$vote_account" \
--ledger ledger \
--log logs/solana-validator.log \
--log - \
--gossip-host "$MY_POD_IP" \
--gossip-port 8001 \
--rpc-port 8899 \
Expand Down
6 changes: 1 addition & 5 deletions k8s-cluster/src/scripts/client-startup-script.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/bin/bash
# set -e

mkdir -p /home/solana/logs

clientToRun="$1"
benchTpsExtraArgs="$2"
Expand All @@ -13,8 +10,7 @@ runtime_args=()
while [[ -n $1 ]]; do
if [[ ${1:0:1} = - ]]; then
if [[ $1 = --target-node ]]; then
echo "--target-node not supported yet...not included" >> logs/client.log 2>&1
# runtime_args+=("$1" "$2")
echo "WARNING: --target-node not supported yet...not included"
shift 2
elif [[ $1 = --duration ]]; then
runtime_args+=("$1" "$2")
Expand Down
12 changes: 2 additions & 10 deletions k8s-cluster/src/scripts/non-voting-validator-startup-script.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
#!/bin/bash
set -e
echo "in non-voting-validator startup script!"

mkdir -p /home/solana/logs

echo "done decoding accounts. running faucet next..."
# sleep 3600

nohup solana-faucet --keypair non-voting-validator-accounts/faucet.json >logs/faucet.log 2>&1 &

echo "faucet running"
nohup solana-faucet --keypair non-voting-validator-accounts/faucet.json &

# Start Validator
# shellcheck disable=SC1091
Expand Down Expand Up @@ -231,7 +223,7 @@ fi

default_arg --identity "$identity"
default_arg --ledger "$ledger_dir"
default_arg --log logs/solana-validator.log
default_arg --log -
default_arg --full-rpc-api
default_arg --no-incremental-snapshots
default_arg --allow-private-addr
Expand Down
10 changes: 1 addition & 9 deletions k8s-cluster/src/scripts/validator-startup-script.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

mkdir -p /home/solana/logs

# Start Validator
# shellcheck disable=SC1091
source /home/solana/k8s-cluster-scripts/common.sh
Expand Down Expand Up @@ -240,7 +238,7 @@ fi
default_arg --identity "$identity"
default_arg --vote-account "$vote_account"
default_arg --ledger "$ledger_dir"
default_arg --log logs/solana-validator.log
default_arg --log -
default_arg --full-rpc-api
default_arg --no-incremental-snapshots
default_arg --allow-private-addr
Expand Down Expand Up @@ -362,12 +360,6 @@ if [ "$vote_account_already_exists" != true ]; then
fi
fi

# sleep 3600

# $program "${args[@]}" &

# sleep 3600

echo "All commands succeeded. Running solana-validator next..."

echo "Validator Args"
Expand Down

0 comments on commit 3d00ac8

Please sign in to comment.