mergify[bot] 14dfc41318 v1.18: [anza migration]: fix download link for net scripts (backport of #219) (#352) 1 jaar geleden
..
remote 249652ea36 v1.18: [anza migration] rename crates 1 jaar geleden
scripts 923d5b5324 chore: remove install-nodejs.sh and install-redis.sh (#33684) 2 jaren geleden
.gitignore 807af8670e Clean up net logs (#6813) 6 jaren geleden
README.md 05dae592f4 Enhancements to Solana's Documentations for Better Clarity (#34386) 1 jaar geleden
azure.sh 4e7e5ace9d Add support for Azure instances in testnet creation (#3905) 6 jaren geleden
colo.sh 2636a9c9f1 Add script for managing colo resourse ala gce.sh (#5854) 6 jaren geleden
common.sh 676e3e1926 fix: remove unnecessary --allow-private-addr setup (#30552) 2 jaren geleden
ec2.sh f89f121d2b Add AWS EC2 support 7 jaren geleden
gce.sh abfecad785 remove redis setup from net.sh (#33680) 2 jaren geleden
init-metrics.sh 69b47915b1 minor fix for handling unsupported opt in script 3 jaren geleden
net.sh 14dfc41318 v1.18: [anza migration]: fix download link for net scripts (backport of #219) (#352) 1 jaar geleden
scp.sh c07d09c011 Add net/scp.sh for easier file transfer to/from network nodes 7 jaren geleden
ssh.sh eb1acaf927 Remove archiver and storage program (#9992) 5 jaren geleden

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, AWS, colo 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 (Optional)

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) and 1 client (billing starts here)
$ ./init-metrics.sh $(whoami)   #<-- Recreate a metrics database for the testnet and configure credentials
$ ./net.sh start                #<-- Deploy the network from the local workspace and start processes on all nodes including bench-tps on the client node
$ ./ssh.sh                      #<-- Show a help to ssh into any testnet node to access logs/etc
$ ./net.sh stop                 #<-- Stop running processes on all nodes
$ ./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 egress charges. However to run the network over public IP addresses:

$ ./gce.sh create -P ...

or

$ ./ec2.sh create -P ...

Deploying a tarball-based network

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

Enabling CUDA

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.

Partition testing

To induce the partition net.sh netem --config-file <config file path> To remove partition net.sh netem --config-file <config file path> --netem-cmd cleanup The partitioning is also removed if you do net.sh stop or restart.

An example config that produces 3 almost equal partitions:

{
      "partitions":[
         34,
         33,
         33
      ],
      "interconnects":[
         {
            "a":0,
            "b":1,
            "config":"loss 15% delay 25ms"
         },
         {
            "a":1,
            "b":0,
            "config":"loss 15% delay 25ms"
         },
         {
            "a":0,
            "b":2,
            "config":"loss 10% delay 15ms"
         },
         {
            "a":2,
            "b":0,
            "config":"loss 10% delay 15ms"
         },
         {
            "a":2,
            "b":1,
            "config":"loss 5% delay 5ms"
         },
         {
            "a":1,
            "b":2,
            "config":"loss 5% delay 5ms"
         }
      ]
}