Skip to content

Commit

Permalink
emphasize AVALANCHEGO_EXEC_PATH in ANR (#810)
Browse files Browse the repository at this point in the history
* add nodes/maintain/subnet-configs.md

* nit

* emphasize AVALANCHEGO_EXEC_PATH in ANR

* review
  • Loading branch information
yulin-dong authored Jun 1, 2022
1 parent d3b4b1d commit 8898d34
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
17 changes: 11 additions & 6 deletions docs/quickstart/create-a-local-test-network.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ go install -v ./cmd/avalanche-network-runner

`avalanche-network-runner` will be installed into `$GOPATH/bin`, please make sure that `$GOPATH/bin` is in your `$PATH`, otherwise, you may not be able to run commands below.


Furthermore, `AVALANCHEGO_EXEC_PATH` should be set properly in all shells you run commands related to Avalanche Network Runner. We strongly recommend that you put the following in to your shell's configuration file.


```bash
# replace execPath with the path to AvalancheGo on your machine
# e.g., ${HOME}/go/src/github.com/ava-labs/avalanchego/build/avalanchego
AVALANCHEGO_EXEC_PATH="${HOME}/go/src/github.com/ava-labs/avalanchego/build/avalanchego"
```


Unless otherwise specified, file paths given below are relative to the root of this repository.

When running with the binary `avalanche-network-runner`, it runs a server process as an RPC server which then waits for API calls and handles them.
Expand Down Expand Up @@ -61,12 +72,6 @@ Each of the examples below will show both modes, claritying its usage.

### Start a New Avalanche Network with Five Nodes (a cluster)

```bash
# replace execPath with the path to AvalancheGo on your machine
# e.g., ${HOME}/go/src/github.com/ava-labs/avalanchego/build/avalanchego
AVALANCHEGO_EXEC_PATH="avalanchego"
```

```bash
curl -X POST -k http://localhost:8081/v1/control/start -d '{"execPath":"'${AVALANCHEGO_EXEC_PATH}'","numNodes":5,"logLevel":"INFO"}'
```
Expand Down
16 changes: 10 additions & 6 deletions docs/quickstart/network-runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ cd ${HOME}/go/src/github.com/ava-labs/avalanche-network-runner
go install -v ./cmd/avalanche-network-runner
```

`avalanche-network-runner` will be installed into `$GOPATH/bin`, please make sure that `$GOPATH/bin` is in your `$PATH`, otherwise, you may not be able to run commands below.

Furthermore, `AVALANCHEGO_EXEC_PATH` should be set properly in all shells you run commands related to Avalanche Network Runner. We strongly recommend that you put the following in to your shell's configuration file.

```bash
# replace execPath with the path to AvalancheGo on your machine
# e.g., ${HOME}/go/src/github.com/ava-labs/avalanchego/build/avalanchego
AVALANCHEGO_EXEC_PATH="${HOME}/go/src/github.com/ava-labs/avalanchego/build/avalanchego"
```

Unless otherwise specified, file paths given below are relative to the root of this repository.

## Usage
Expand Down Expand Up @@ -91,12 +101,6 @@ avalanche-network-runner ping \

#### start a new Avalanche network with five nodes (a cluster)

```bash
# replace execPath with the path to AvalancheGo on your machine
# e.g., ${HOME}/go/src/github.com/ava-labs/avalanchego/build/avalanchego
AVALANCHEGO_EXEC_PATH="avalanchego"
```

```bash
curl -X POST -k http://localhost:8081/v1/control/start -d '{"execPath":"'${AVALANCHEGO_EXEC_PATH}'","numNodes":5,"logLevel":"INFO"}'
```
Expand Down

0 comments on commit 8898d34

Please sign in to comment.