Start by creating EC2 instances in the AWS console.
- Ubuntu 22.04 LTS (not Amazon Linux)
- Security Group - Inbound Policy
- SSH - Port 22 - 0.0.0.0/0 (or your IP)
- Custom TCP - Port 3033 - 0.0.0.0/0 (or your IP)
- Custom TCP - Port 4133 - 0.0.0.0/0
- Custom TCP - Port 5000 - 0.0.0.0/0
Be sure the give the EC2 instances a name tag, i.e. testnet3
.
Make sure you set the correct SSH .pem
and have the .pem
in your ~/.ssh
directory.
This script generates the SSH config for the EC2 instances.
This script requires jq
to be installed.
On macOS, you can install jq
with Homebrew:
brew install jq
On Ubuntu, you can install jq
with apt:
sudo apt install jq
This script requires the aws
CLI.
Install aws
(For macOS, there is an installer PKG in the link)
Then run:
aws configure
You will be prompted to enter the following information:
- AWS Access Key ID
- AWS Secret Access Key
- Default region name (e.g., us-east-1)
- Default output format (e.g., json) This information will be used to authenticate your AWS CLI requests.
To get your ACCESS_KEY
and SECRET_KEY
, go to AWS IAM dashboard and follow these steps:
- In the IAM dashboard, click on "Users" in the left navigation pane and then click the "Add user" button.
- Click the "Next: Permissions" button.
- Click the "Attach existing policies directly" button.
- Search for "AmazonEC2FullAccess" and select it.
- Click "Next" and click the "Create user" button.
- Select the user and click "Create access key".
- Select "Command Line Interface (CLI)".
- Click "Create Access Key".
- Copy the "Access key" and "Secret access key" and paste them into the
aws configure
command.
Try running:
aws sts get-caller-identity
If you get an error, you may need to wait a few minutes for your IAM user to be created. If you get a response like the following, you are good to go:
{
"UserId": "XXXXXXXXXXXXXXXXXXXXX",
"Account": "123456789012",
"Arn": "arn:aws:iam::123456789012:user/your-iam-username"
}
This script installs snarkOS on clean EC2 instances.
This script assumes you have ran config.sh
and copy/pasted the output into ~/.ssh/config
.
This script will:
- Clone snarkOS
- Install Rust
- Install dependencies
- Install snarkOS
If you are actively developing, you can use this script to reinstall snarkOS on the EC2 instances.
This script will fetch the latest changes from the Github branch that you specify, and reinstall snarkOS.
This script starts snarkOS on the EC2 instances.
This script monitors the EC2 instances.
To toggle to the next node in a local devnet, run:
Ctrl+b n
To toggle to the previous node in a local devnet, run:
Ctrl+b p
To select a node in a local devnet, run:
Ctrl+b w
To select a node manually in a local devnet, run:
Ctrl+b :select-window -t {NODE_ID}
To exit the monitor, run:
Ctrl+b :kill-session
Then, press Enter
.
This script generates analytics for the EC2 instances.
To run this optional script, you must have Node.js installed.
This script stops snarkOS on the EC2 instances.
This script stops snarkOS on the EC2 instances, and removes the ledger DB from the EC2 instances.