This directory contains scripts useful for working with a test network. It's intended to be both dev and CD friendly.
GCP and AWS are supported.
First authenticate with
$ gcloud auth login
Obtain your credentials from the AWS IAM Console and configure the AWS CLI with
$ aws configure
More information on AWS CLI configuration can be found here
Ensure that $(whoami)
is the name of an InfluxDB user account with enough
access to create a new InfluxDB database. Ask mvines@ for help if needed.
NOTE: This example uses GCE. If you are using AWS EC2, replace ./gce.sh
with
./ec2.sh
in the commands.
$ cd net/
$ ./gce.sh create -n 5 -c 1 #<-- Create a GCE testnet with 5 additional nodes (beyond the bootstrap node) and 1 client (billing starts here)
$ ./init-metrics.sh $(whoami) #<-- Configure a metrics database for the testnet
$ ./net.sh start #<-- Deploy the network from the local workspace and start all clients with bench-tps
$ ./ssh.sh #<-- Details on how to ssh into any testnet node to access logs/etc
$ ./gce.sh delete #<-- Dispose of the network (billing stops here)
By default private IP addresses are used with all instances in the same availability zone to avoid GCE network engress charges. However to run the network over public IP addresses:
$ ./gce.sh create -P ...
or
$ ./ec2.sh create -P ...
To deploy the latest pre-built edge
channel tarball (ie, latest from the master
branch), once the testnet has been created run:
$ ./net.sh start -t edge
First ensure the network instances are created with GPU enabled:
$ ./gce.sh create -g ...
or
$ ./ec2.sh create -g ...
If deploying a tarball-based network nothing further is required, as GPU presence is detected at runtime and the CUDA build is auto selected.
AWS-Specific Extra Setup: Follow the steps in
scripts/solana-user-authorized_keys.sh
, then redeploy the testnet
before continuing in this section.
Taking master-testnet-solana-com as an example, configure your workspace for the testnet using:
$ ./gce.sh config -p master-testnet-solana-com
or
$ ./ec2.sh config -p master-testnet-solana-com
Then run the following for details on how to ssh into any testnet node to access logs or otherwise inspect the node
$ ./ssh.sh