Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ rand = "0.8.5"
reqwest = { version = "0.11.23", features = ["blocking", "brotli", "deflate", "gzip", "rustls-tls", "json"] }
rustls = { version = "0.21.10", default-features = false, features = ["quic"] }
solana-core = "1.18.8"
solana-ledger = "1.18.8"
solana-logger = "1.18.8"
solana-sdk = "1.18.8"
strum = "0.26.2"
Expand Down
28 changes: 14 additions & 14 deletions PROGRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,38 @@
- [x] Create Genesis
- [x] Generate faucet and bootstrap accounts
- [x] Build genesis
- [ ] Docker Build
- [ ] Build Bootstrap Image
- [ ] Push Image to registry
- [x] Docker Build
- [x] Build Bootstrap Image
- [x] Push Image to registry
- [ ] Create & Deploy Secrets
- [ ] Bootstrap
- [ ] Validator (regular)
- [x] Bootstrap
- [x] Validator (regular)
- [ ] RPC nodes
- [ ] Client
- [ ] Create & Deploy Selector
- [ ] Bootstrap
- [ ] Validator (regular)
- [x] Bootstrap
- [x] Validator (regular)
- [ ] RPC nodes
- [ ] Client
- [ ] Create & Deploy Replica Set
- [ ] Bootstrap
- [x] Bootstrap
- [ ] Validator (regular)
- [ ] RPC nodes
- [ ] Client
- [ ] Create & Deploy Services
- [ ] Bootstrap
- [x] Bootstrap
- [ ] Validator (regular)
- [ ] RPC nodes
- [ ] Client
- [ ] Check Bootstrap is deployed and running
- [ ] Build and deploy Load Balancer (sits in front of bootstrap and RPC nodes)
- [x] Check Bootstrap is deployed and running
- [x] Build and deploy Load Balancer (sits in front of bootstrap and RPC nodes)
- [ ] Add metrics
- [ ] Bootstrap
- [x] Bootstrap
- [ ] Validator (regular)
- [ ] RPC nodes
- [ ] Client
- [ ] Create accounts
- [ ] Validator (regular)
- [x] Validator (regular)
- [ ] RPC
- [ ] Client
- [ ] Add feature flags to configure:
Expand All @@ -69,7 +69,7 @@ Above, we start with bootstrap, and then we do validators (regular), and then we
- Use command line flags to set type of client, tx-count, etc

- [ ] Add in kubernetes deployment flags
- [ ] CPU/Memory Requests
- [x] CPU/Memory Requests
- [ ] Node Affinity -> Regions
- [ ] Node Affinity -> Node Type (Equinix/Lumen)

Expand Down
58 changes: 57 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,24 @@ kubectl create ns <namespace>
```
cargo run --bin cluster --
-n <namespace>
--num_validators <number-of-non-bootstrap-voting-validators>
--local-path <path-to-local-agave-monorepo>
```

#### Build specific Agave release
```
cargo run --bin cluster --
-n <namespace>
--num_validators <number-of-non-bootstrap-voting-validators>
--release-channel <agave-version: e.g. v1.17.28> # note: MUST include the "v"
```

#### Build from Local Repo and Configure Genesis
#### Build from Local Repo and Configure Genesis and Bootstrap Validator Image
Example:
```
cargo run --bin cluster --
-n <namespace>
--num_validators <number-of-non-bootstrap-voting-validators>
--local-path /home/sol/solana
# genesis config. Optional: Many of these have defaults
--hashes-per-tick <hashes-per-tick>
Expand All @@ -51,4 +54,57 @@ cargo run --bin cluster --
--max-genesis-archive-unpacked-size <size in bytes>
--target-lamports-per-signature <lamports-per-signature>
--slots-per-epoch <slots-per-epoch>
# docker config
--registry <docker-registry> # e.g. gregcusack
--tag <docker-image-tag> # e.g. v1
--base-image <base-image> # e.g. ubuntu:20.04
--image-name <docker-image-name> # e.g. cluster-image
```

## Metrics
1) Setup metrics database:
```
cd scripts/
./init-metrics -c <database-name> <metrics-username>
# enter password when promted
```
2) add the following to your `cluster` command from above
```
--metrics-host https://internal-metrics.solana.com # need the `https://` here
--metrics-port 8086
--metrics-db <database-name> # from (1)
--metrics-username <metrics-username> # from (1)
--metrics-password <metrics-password> # from (1)
```


## Kubernetes Cheatsheet
Create namespace:
```
kubectl create ns <namespace>
```

Delete namespace:
```
kubectl delete ns <namespace>
```

Get running pods:
```
kubectl get pods -n <namespace>
```

Get pod logs:
```
kubectl logs -n <namespace> <pod-name>
```

Exec into pod:
```
kubectl exec -it -n <namespace> <pod-name> -- /bin/bash
```

Get information about pod:
```
kubectl describe pod -n <namespace> <pod-name>
```
87 changes: 87 additions & 0 deletions scripts/init-metrics.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#!/usr/bin/env bash
set -e

here=$(dirname "$0")
# shellcheck source=net/common.sh
source "$here"/common.sh

usage() {
exitcode=0
if [[ -n "$1" ]]; then
exitcode=1
echo "Error: $*"
fi
cat <<EOF
usage: $0 [-e] [-d] [-c database_name] [username]

Creates a testnet dev metrics database

username InfluxDB user with access to create a new database
-c Manually specify a database to create, rather than read from config file
-d Delete the database instead of creating it
-e Assume database already exists and SOLANA_METRICS_CONFIG is
defined in the environment already

EOF
exit $exitcode
}

useEnv=false
delete=false
createWithoutConfig=false
host="https://internal-metrics.solana.com:8086"
while getopts ":hdec:" opt; do
case $opt in
h)
usage
exit 0
;;
c)
createWithoutConfig=true
netBasename=$OPTARG
;;
d)
delete=true
;;
e)
useEnv=true
;;
*)
usage "unhandled option: $OPTARG"
;;
esac
done
shift $((OPTIND - 1))

if $useEnv; then
[[ -n $SOLANA_METRICS_CONFIG ]] ||
usage "SOLANA_METRICS_CONFIG is not defined in the environment"
else
username=$1
[[ -n "$username" ]] || usage "username not specified"

read -rs -p "InfluxDB password for $username: " password
[[ -n $password ]] || { echo "Password not specified"; exit 1; }
echo

password="$(urlencode "$password")"

query() {
echo "$*"
set -x
curl -XPOST \
"$host/query?u=${username}&p=${password}" \
--data-urlencode "q=$*"
}

query "DROP DATABASE \"$netBasename\""
! $delete || exit 0
query "CREATE DATABASE \"$netBasename\""
query "ALTER RETENTION POLICY autogen ON \"$netBasename\" DURATION 7d"
query "GRANT READ ON \"$netBasename\" TO \"ro\""
query "GRANT WRITE ON \"$netBasename\" TO \"scratch_writer\""

SOLANA_METRICS_CONFIG="host=$host,db=$netBasename,u=scratch_writer,p=topsecret"
fi

exit 0
Loading