Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs for recent changes #1617

Merged
merged 9 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .github/styles/Vocab/Products/accept.txt
Original file line number Diff line number Diff line change
Expand Up @@ -358,5 +358,6 @@ Wei
whitepaper
yargs
Yellowpaper
Yubikey
Zundel
unstaked
36 changes: 21 additions & 15 deletions docs/tooling/avalanche-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ The `node create` command sets up a validator on a cloud server of your choice.
The validator will be validating the Avalanche Primary Network and Subnet
of your choice. By default, the command runs an interactive wizard. It
walks you through all the steps you need to set up a validator.
Validators can be deployed in multiple regions/zones simultaneously.
Once this command is run, you will have to wait for the validator
to finish bootstrapping on the primary network before running further
commands on it, for example validating a Subnet. You can check the bootstrapping
Expand All @@ -735,21 +736,24 @@ will apply to all nodes in the cluster.
**Flags:**

```shell
--alternative-key-pair-name string key pair name to use if default one generates conflicts
--authorize-access authorize CLI to create cloud resources
--avalanchego-version-from-subnet string install latest avalanchego version, that is compatible with the given subnet, on node/s
--aws create node/s in AWS cloud
--aws-profile string aws profile to use (default "default")
--devnet create node/s into a new Devnet
--fuji create node/s in Fuji Network
--gcp create node/s in GCP cloud
--gcp-credentials string use given GCP credentials
--gcp-project string use given GCP project
-h, --help help for create
--latest-avalanchego-version install latest avalanchego version on node/s
--num-nodes int number of nodes to create
--region string create node/s in given region
--use-static-ip attach static Public IP on cloud servers (default true)
--alternative-key-pair-name string key pair name to use if default one generates conflicts
--authorize-access authorize CLI to create cloud resources
--avalanchego-version-from-subnet string install latest avalanchego version, that is compatible with the given subnet, on node/s
--aws create node/s in AWS cloud
--aws-profile string aws profile to use (default "default")
--devnet create node/s into a new Devnet
--fuji create node/s in Fuji Network
--gcp create node/s in GCP cloud
--gcp-credentials string use given GCP credentials
--gcp-project string use given GCP project
-h, --help help for create
--latest-avalanchego-version install latest avalanchego version on node/s
--node-type string cloud instance type. Use 'default' to use recommended default instance type
--num-nodes ints number of nodes to create per region(s). Use comma to separate multiple numbers for each region in the same order as --region flag
--region strings create node(s) in given region(s). Use comma to separate multiple regions
--ssh-identity string use given ssh identity
--use-ssh-agent use ssh agent for ssh
--use-static-ip attach static Public IP on cloud servers (default true)
```

### Node Devnet
Expand Down Expand Up @@ -814,8 +818,10 @@ The `node devnet wiz` command creates a devnet and deploys, sync and validate a
--node-config string path to avalanchego node configuration for subnet
--num-nodes int number of nodes to create
--region string create node/s in given region
--ssh-identity string use given ssh identity
--subnet-config string path to the subnet configuration for subnet
--subnet-genesis string file path of the subnet genesis
--use-ssh-agent use ssh agent for ssh
--use-static-ip attach static Public IP on cloud servers (default true)
```

Expand Down
11 changes: 7 additions & 4 deletions docs/tooling/cli-guides/create-a-validator-aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ Before we begin, you will need to:

- Create an AWS account and have an AWS `credentials` file in home directory with [default] profile
set. More info can be found [here](https://docs.aws.amazon.com/sdkref/latest/guide/file-format.html#file-format-creds)
- Install [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)
- Install [Ansible](https://adamtheautomator.com/install-ansible/)


## Start the Validator
Expand All @@ -55,9 +53,10 @@ Currently, we have set the following specs of the AWS cloud server to a fixed va
enable customization in the near future:

- OS Image: `Ubuntu 20.04 LTS (HVM), SSD Volume Type`
- Instance Type: `c5.2xlarge`
- Storage: `1 TB`

Instance type can be specified via `--node-type` parameter or via interactive menu. `c5.2xlarge` is the default(recommended) instance size.

The command will ask which region you want to set up your cloud server in:

```text
Expand All @@ -84,11 +83,15 @@ By the end of successful run of `create` command, Avalanche-CLI would have:
- Installed Avalanche Go in cloud server
- Installed Avalanche CLI in cloud server
- Downloaded the `.pem` private key file to access the cloud server into your local `.ssh` directory.
Back up this private key file as you will not be able to ssh into the cloud server node without it
Back up this private key file as you will not be able to ssh into the cloud server node without it (unless `ssh-agent` is used).
- Downloaded `staker.crt` and `staker.key` files to your local `.avalanche-cli` directory so that
you can back up your node. More info about node backup can be found [here](/nodes/maintain/node-backup-and-restore.md)
- Started the process of bootstrapping your new Avalanche node to the Primary Network

Please note that Avalance CLI can be configured to use `ssh-agent` for ssh communication. In this case public key will
be read from there and cloud server will be accessible using it. Yubikey hardware can be also used to store private ssh
key. Please use official Yubikey documentation, for example [https://developers.yubico.com/PGP/SSH_authentication/] for more details.

## Check Bootstrap Status

Please note that you will have to wait until the nodes have finished bootstrapping before the
Expand Down
10 changes: 6 additions & 4 deletions docs/tooling/cli-guides/create-a-validator-gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ Before we begin, you will need to:
- Create a GCP account [here](https://console.cloud.google.com/freetrial) and create a new project
- Enable Compute Engine API [here](https://console.cloud.google.com/apis/api/compute.googleapis.com)
- Download the key json for the automatically created service account as shown [here](https://cloud.google.com/iam/docs/keys-create-delete#creating)
- Install [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)
- Install [Ansible](https://adamtheautomator.com/install-ansible/)

## Start the Validator

Expand All @@ -55,9 +53,10 @@ Currently, we have set the following specs of the GCP cloud server to a fixed va
enable customization in the near future:

- OS Image: `Ubuntu 20.04 LTS`
- Machine Type: `e2-standard-8`
- Storage: `1 TB`

Instance type can be specified via `--node-type` parameter or via interactive menu. `e2-standard-8` is default(recommended) instance size.

The command will ask which region you want to set up your cloud server in:

```text
Expand All @@ -83,11 +82,14 @@ By the end of successful run of `create` command, Avalanche-CLI would have:
- Installed Avalanche Go in cloud server
- Installed Avalanche CLI in cloud server
- Downloaded the `.pem` private key file to access the cloud server into your local `.ssh` directory.
Back up this private key file as you will not be able to ssh into the cloud server node without it
Back up this private key file as you will not be able to ssh into the cloud server node without it (unless `ssh-agent` is used).
- Downloaded `staker.crt` and `staker.key` files to your local `.avalanche-cli` directory so that
you can back up your node. More info about node backup can be found [here](/nodes/maintain/node-backup-and-restore.md)
- Started the process of bootstrapping your new Avalanche node to the Primary Network

Please note that Avalanche CLI can be configured to use `ssh-agent` for ssh access to cloud server. Yubikey hardware can be also used to store private ssh
key. Please use official Yubikey documentation, for example [https://developers.yubico.com/PGP/SSH_authentication/] for more details.

## Check Bootstrap Status

Please note that you will have to wait until the nodes have finished bootstrapping before the
Expand Down
41 changes: 40 additions & 1 deletion docs/tooling/cli-guides/node-ssh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 9

# Execute a SSH command on a Cluster

This page demonstrates how to execute a SSH command on a Cluster managed by Avalanche-CLI
This page demonstrates how to execute a SSH command on a Cluster or Node managed by Avalanche-CLI

:::warning

Expand Down Expand Up @@ -65,6 +65,13 @@ avalanche node ssh <clusterName> pgrep avalanchego
14555
```

:::note

Please note that commands via `ssh` on cluster are executed sequentially by default.
It's possible to run command on all nodes at the same time by using `--parallel=true` flag

:::

## Get the AvalancheGo Configuration for All Nodes in `<clusterName>`

```shell
Expand Down Expand Up @@ -141,3 +148,35 @@ avalanche node ssh <clusterName> cat /home/ubuntu/.avalanchego/configs/node.json
}
```

## Executing Command on a Single Node

As we all know command can be executed on single node similar to the examples above
To execute ssh command on a single node, use `<nodeID>`, `<IP>` or `<instanceID>` instead of `<clusterName>` as an argument. For example:

```shell
avalanche node ssh i-0225fc39626b1edd3 <command>
[or]
avalanche node ssh NodeID-9wdKQ3KJU3GqvgFTc4CUYvmefEFe8t6ka <command>
[or]
avalanche node ssh 54.159.59.123 <command>
```

:::note

In this case `--parallel=true` flag will be ignored

:::

## Opening SSH Shell for `<nodeID>`

If no command is provided, Avalanche-CLI will open an interactive session for the specified node. For example:

```shell
avalanche node ssh i-0225fc39626b1edd3
[or]
avalanche node ssh NodeID-9wdKQ3KJU3GqvgFTc4CUYvmefEFe8t6ka
[or]
avalanche node ssh 54.159.59.123
```

Please use `exit` shell command or Ctrl+D to end this session.
1 change: 0 additions & 1 deletion docs/tooling/cli-guides/setup-a-devnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ ALPHA WARNING: This command is currently in experimental mode. Proceed at your o
Before we begin, you will need to have:

- Created an AWS account and have an updated AWS `credentials` file in home directory with [default] profile
- Install [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)
- [Created a Subnet configuration `<SubnetName>`](/build/subnet/deploy/fuji-testnet-subnet.md#create-an-evm-subnet) based on SubnetEVM.

Note: the tutorial is based in AWS, but Devnets can also be created and operated in other supported
Expand Down
Loading