solana/net
Michael Vines f5569e76db Relocate native programs to deps/ subdirectory of the current executable
This layout is `cargo build` compatible, no post-build file moves
required.
2018-12-08 16:31:01 -08:00
..
remote Fully switch to bootstrap-leader for command-line args 2018-12-07 16:57:02 -08:00
scripts Add newline at end of file 2018-12-06 17:46:46 -08:00
.gitignore Morph gce_multinode-based scripts into net/ 2018-09-05 09:02:02 -07:00
README.md Generalize net/ from leader/validator to bootstrap-fullnode/fullnode 2018-12-05 17:11:16 -08:00
common.sh Generalize net/ from leader/validator to bootstrap-fullnode/fullnode 2018-12-05 17:11:16 -08:00
ec2.sh Add AWS EC2 support 2018-09-17 09:26:25 -07:00
gce.sh Generalize net/ from leader/validator to bootstrap-fullnode/fullnode 2018-12-05 17:11:16 -08:00
init-metrics.sh codemod --extensions sh '#!/usr/bin/env bash -e' '#!/usr/bin/env bash\nset -e' 2018-11-11 16:24:36 -08:00
net.sh Relocate native programs to deps/ subdirectory of the current executable 2018-12-08 16:31:01 -08:00
scp.sh Add net/scp.sh for easier file transfer to/from network nodes 2018-11-12 11:48:53 -08:00
ssh.sh Generalize net/ from leader/validator to bootstrap-fullnode/fullnode 2018-12-05 17:11:16 -08:00

README.md

Network Management

This directory contains scripts useful for working with a test network. It's intended to be both dev and CD friendly.

User Account Prerequisites

GCP and AWS are supported.

GCP

First authenticate with

$ gcloud auth login

AWS

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

Metrics configuration

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.

Quick Start

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), 1 client bencher (billing starts here)
$ ./init-metrics.sh $(whoami)   #<-- Configure a metrics database for the testnet
$ ./net.sh start             #<-- Deploy the network from the local workspace
$ ./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)

Tips

Running the network over public IP addresses

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 ...

Deploying a Snap-based network

To deploy the latest pre-built edge channel Snap (ie, latest from the master branch), once the testnet has been created run:

$ ./net.sh start -s edge

Enabling CUDA

First ensure the network instances are created with GPU enabled:

$ ./gce.sh create -g ...

or

$ ./ec2.sh create -g ...

If deploying a Snap-based network nothing further is required, as GPU presence is detected at runtime and the CUDA build is auto selected.

If deploying a locally-built network, first run ./fetch-perf-libs.sh then ensure the cuda feature is specified at network start:

$ ./net.sh start -f "cuda,erasure"

How to interact with a CD testnet deployed by ci/testnet-deploy.sh

AWS-Specific Extra Setup: Follow the steps in scripts/add-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