-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating documentation on cli.js location and 3rd party repo links (#…
…1442) * Updating cli.js location and name * Updated comments * Updated docs with new links to polkadot-sdk project * Update docs/book/searchindex.js * Update docs/book/searchindex.j * Update README.md Co-authored-by: Javier Viola <[email protected]> * Update javascript/packages/cli/README.md Co-authored-by: Javier Viola <[email protected]> * Updated docs after review * Updating docs after review v2 * Updating HTML * Update javascript/README.md * Update javascript/packages/orchestrator/README.md * Update javascript/packages/orchestrator/README.md --------- Co-authored-by: Nikos Kontakis <[email protected]> Co-authored-by: Javier Viola <[email protected]>
- Loading branch information
1 parent
87212d8
commit 5ad9359
Showing
9 changed files
with
184 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,9 +28,6 @@ Internally zombienet is a `javascript` library, designed to run on `Node.js` and | |
backend `providers` to run the *nodes*, at this moment `kubernetes`, `podman` and `native` are | ||
supported. | ||
|
||
**Note:** Currently, it is only possible to use `podman` for Zombienet users on Linux machines. | ||
Although `podman` comes with support for macOS, it is done using an internal VM and the Zombienet provider code expects `podman` to be running natively. | ||
|
||
## Usage | ||
|
||
Zombienet releases are available in `github`. Each one provides an executable for both `linux` and | ||
|
@@ -120,7 +117,7 @@ Native provider doesn't run any extra layer/process at the moment. | |
*For this example we will use the `macos` version of the executable* | ||
|
||
```bash | ||
./zombienet-macos | ||
❯ ./zombienet-macos | ||
Usage: zombienet [options] [command] | ||
|
||
Options: | ||
|
@@ -178,7 +175,7 @@ id = 100 | |
Then you can spawn the network by running the following command: | ||
|
||
```bash | ||
./zombienet-macos spawn --provider native examples/0001-small-network.toml | ||
❯ ./zombienet-macos spawn --provider native examples/0001-small-network.toml | ||
``` | ||
|
||
Note that the command expects two binaries `polkadot` and `adder-collator` to be installed on your system. See further down for how to get them. | ||
|
@@ -266,8 +263,8 @@ add_to_genesis = false | |
Then you can `export` the needed values before you run the command to spawn the network again: | ||
|
||
```bash | ||
export ZOMBIENET_INTEGRATION_TEST_IMAGE=docker.io/paritypr/polkadot-debug:master | ||
export COL_IMAGE=docker.io/paritypr/colander:master | ||
❯ export ZOMBIENET_INTEGRATION_TEST_IMAGE=docker.io/paritypr/polkadot-debug:master | ||
❯ export COL_IMAGE=docker.io/paritypr/colander:master | ||
|
||
./zombienet-macos spawn examples/0001-small-network.toml | ||
``` | ||
|
@@ -286,7 +283,7 @@ metrics, logs and some `built-in` function that query the network using `polkado | |
assertions should be defined in a *.zndsl test*, and the `dsl` (**D**omain **S**pecific **L**anguage) and format is documented in | ||
[here](https://paritytech.github.io/zombienet/cli/test-dsl-definition-spec.html). | ||
|
||
The following is an small example to spawn a network (using the previous `simple network | ||
The following is a small example to spawn a network (using the previous `simple network | ||
definition`) and assert that: | ||
- Both `nodes` are running | ||
- The defined `parachain` is registered | ||
|
@@ -321,17 +318,17 @@ Other examples are provided in the [examples](examples) directory. | |
You need first to *clone* this repository and run: | ||
|
||
```bash | ||
cd zombienet/javascript | ||
npm install | ||
npm run build | ||
❯ cd zombienet/javascript | ||
❯ npm i && npm run build | ||
``` | ||
|
||
### Download and install needed artifacts (optional) | ||
|
||
For an easier and faster setup of your local environment, run: | ||
|
||
```bash | ||
node dist/cli.js setup <binaries> | ||
❯ cd zombinet/javascript | ||
❯ npm i && npm run zombie -- setup <binaries> | ||
``` | ||
|
||
This allows to use the `setup` script, making everything ready for a ZombieNet dev environment. | ||
|
@@ -343,10 +340,11 @@ You can use the following arguments: | |
For example: | ||
|
||
```bash | ||
node dist/cli.js setup polkadot polkadot-parachain | ||
❯ cd zombinet/javascript | ||
❯ npm i && npm run zombie -- setup polkadot polkadot-parachain | ||
``` | ||
|
||
> Note: If you are using macOS please clone the [Polkadot repo](https://github.com/paritytech/polkadot) and run it locally. At the moment there is no `polkadot` binary for MacOs. | ||
> Note: If you are using macOS please clone the [polkadot-sdk repo](https://github.com/paritytech/polkadot-sdk) and run it locally. At the moment there is no `polkadot` binary for MacOs. | ||
The command above will retrieve the binaries provided and try to download and prepare those binaries for usage. | ||
At the end of the download, the `setup` script will provide a command to run in your local environment in order to add the directory where the binaries were downloaded in your $PATH var, for example: | ||
|
@@ -360,10 +358,10 @@ Please add the dir to your $PATH by running the command: export PATH=/home/<user | |
You can build it from source like this | ||
|
||
```bash | ||
git clone [email protected]:paritytech/polkadot | ||
cd polkadot | ||
cargo build --profile testnet -p test-parachain-adder-collator | ||
export PATH=$(pwd)/target/testnet:$PATH | ||
❯ git clone [email protected]:paritytech/polkadot-sdk.git | ||
❯ cd polkadot-sdk | ||
❯ cargo build --profile testnet -p test-parachain-adder-collator | ||
❯ export PATH=$(pwd)/target/testnet:$PATH | ||
``` | ||
|
||
|
||
|
@@ -372,20 +370,26 @@ export PATH=$(pwd)/target/testnet:$PATH | |
With the above steps completed, the `zombienet` CLI is ready to run: | ||
|
||
```bash | ||
❯ node dist/cli.js | ||
❯ cd zombinet/javascript | ||
❯ npm run zombie | ||
|
||
Usage: zombienet [options] [command] | ||
|
||
Options: | ||
-p, --provider <provider> Override provider to use (choices: "podman", | ||
"kubernetes", default: kubernetes) | ||
-c, --spawn-concurrency <concurrency> Number of concurrent spawning process to launch, default is 1 | ||
-p, --provider <provider> Override provider to use (choices: "podman", "kubernetes", "native") | ||
-l, --logType <logType> Type of logging - defaults to 'table' (choices: "table", "text", "silent") | ||
-d, --dir <path> Directory path for placing the network files instead of random temp one | ||
(e.g. -d /home/user/my-zombienet) | ||
-f, --force Force override all prompt commands | ||
-h, --help display help for command | ||
|
||
Commands: | ||
spawn <networkConfig> [creds] [monitor] Spawn the network defined in the config | ||
test <testFile> Run tests on the network defined | ||
spawn [options] <networkConfig> [creds] Spawn the network defined in the config | ||
test <testFile> [runningNetworkSpec] Run tests on the network defined | ||
setup [options] <binaries...> Setup is meant for downloading and making dev environment of ZombieNet ready | ||
convert <filePath> Convert is meant for transforming a (now deprecated) polkadot-launch configuration to zombienet configuration | ||
version Prints zombienet version | ||
setup Runs the setup of local environment | ||
help [command] display help for command | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.