diff --git a/README.md b/README.md index fa9f6d1e5..a1692c444 100644 --- a/README.md +++ b/README.md @@ -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,9 +318,8 @@ 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) @@ -331,7 +327,8 @@ npm run build For an easier and faster setup of your local environment, run: ```bash -node dist/cli.js setup +❯ cd zombinet/javascript +❯ npm i && npm run zombie -- setup ``` 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/ Override provider to use (choices: "podman", - "kubernetes", default: kubernetes) + -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 + -p, --provider Override provider to use (choices: "podman", "kubernetes", "native") + -l, --logType Type of logging - defaults to 'table' (choices: "table", "text", "silent") + -d, --dir 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 [creds] [monitor] Spawn the network defined in the config - test Run tests on the network defined + spawn [options] [creds] Spawn the network defined in the config + test [runningNetworkSpec] Run tests on the network defined + setup [options] Setup is meant for downloading and making dev environment of ZombieNet ready + convert 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 ``` diff --git a/docs/book/development.html b/docs/book/development.html index 9e4dfe19b..b9ec9649b 100644 --- a/docs/book/development.html +++ b/docs/book/development.html @@ -155,23 +155,22 @@

Requirements

Installation

You need to first clone this repository and run:

-
cd zombienet
-npm install
-npm run build
+
❯ cd zombienet
+❯ npm i && npm run build
 

Download and install needed artifacts (optional)

For an easier and faster setup of your local environment, run:

-
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.

You can use the following arguments:

--help shows the different options and commands for using the Zombienet CLI. --binaries or -b: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: polkadot, polkadot-parachain.

For example:

-
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 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 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:

@@ -179,18 +178,30 @@

Using Zombienet

With the above steps completed, the zombienet CLI is ready to run:

-
❯ node dist/cli.js
+
❯ cd zombinet/javascript && npm run zombie
 
 Usage: zombienet [options] [command]
 
 Options:
+  -c, --spawn-concurrency <concurrency>    Number of concurrent spawning process to launch,
+                                                default is 1
   -p, --provider <provider>                Override provider to use (choices: "podman",
-                                           "kubernetes", default: kubernetes)
-  -h, --help                               display help for command
+                                           "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
   help [command]                           display help for command
 
diff --git a/docs/book/print.html b/docs/book/print.html index 1bfaf3b96..14ecdf563 100644 --- a/docs/book/print.html +++ b/docs/book/print.html @@ -1690,7 +1690,7 @@

For an easier and faster setup of your local environment, run:

-
node dist/cli.js setup <binaries>
+            
❯ cd zombinet/javascript && npm i && npm run zombie -- setup <binaries>
 

This allows to use the setup script, making @@ -1705,13 +1705,13 @@

polkadot, polkadot-parachain.

For example:

-
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 repopolkadot-sdk repo and run it locally. At the moment there is no polkadot binary for MacOs. @@ -1733,18 +1733,30 @@

With the above steps completed, the zombienet CLI is ready to run:

-
❯ node dist/cli.js
+            
❯ cd zombinet/javascript && npm run zombie
 
 Usage: zombienet [options] [command]
 
 Options:
+  -c, --spawn-concurrency <concurrency>    Number of concurrent spawning process to launch,
+                                                default is 1
   -p, --provider <provider>                Override provider to use (choices: "podman",
-                                           "kubernetes", default: kubernetes)
-  -h, --help                               display help for command
+                                            "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
   help [command]                           display help for command
 
diff --git a/docs/book/searchindex.js b/docs/book/searchindex.js index e079cbb31..13e2bd0af 100644 --- a/docs/book/searchindex.js +++ b/docs/book/searchindex.js @@ -280,14 +280,14 @@ Object.assign(window.search, { title: "Installation", }, 37: { - body: "For an easier and faster setup of your local environment, run: node dist/cli.js setup This allows to use the setup script, making everything ready for a ZombieNet dev environment. You can use the following arguments: --help shows the different options and commands for using the Zombienet CLI. --binaries or -b: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: polkadot, polkadot-parachain. For example: node dist/cli.js setup polkadot polkadot-parachain Note: If you are using macOS please clone the Polkadot repo 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: Please add the dir to your $PATH by running the command: export PATH=/home//current_directory:$PATH", + body: "For an easier and faster setup of your local environment, run: cd zombinet/javascript && npm i && npm run zombie -- setup This allows to use the setup script, making everything ready for a ZombieNet dev environment. You can use the following arguments: --help shows the different options and commands for using the Zombienet CLI. --binaries or -b: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: polkadot, polkadot-parachain. For example: cd zombinet/javascript && npm i && npm run zombie -- setup polkadot polkadot-parachain Note: If you are using macOS please clone the polkadot-sdk repo 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: Please add the dir to your $PATH by running the command: export PATH=/home//current_directory:$PATH", breadcrumbs: "Development » Download and install needed artifacts (optional)", id: "37", title: "Download and install needed artifacts (optional)", }, 38: { - body: 'With the above steps completed, the zombienet CLI is ready to run: ❯ node dist/cli.js Usage: zombienet [options] [command] Options: -p, --provider Override provider to use (choices: "podman", "kubernetes", default: kubernetes) -h, --help display help for command Commands: spawn [creds] [monitor] Spawn the network defined in the config test Run tests on the network defined version Prints zombienet version help [command] display help for command', + body: 'With the above steps completed, the zombienet CLI is ready to run: cd zombinet/javascript && npm i && npm run zombie -- Usage: zombienet [options] [command] Options: -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 -p, --provider Override provider to use (choices: "podman", "kubernetes", "native") -l, --logType Type of logging - defaults to "table" (choices: "table", "text", "silent") -d, --dir Directory path for placing the network files instead of random temp one -f, --force Force override all prompt commands -h, --help display help for command Commands: spawn [options] [creds] Spawn the network defined in the config test [runningNetworkSpec] Run tests on the network defined setup [options] Setup is meant for downloading and making dev environment of ZombieNet ready convert Convert is meant for transforming a (now deprecated) polkadot-launch configuration to zombienet configuration version Prints zombienet version help [command] display help for command', breadcrumbs: "Development » Using Zombienet", id: "38", title: "Using Zombienet", diff --git a/docs/book/searchindex.json b/docs/book/searchindex.json index 73b1d6e93..4f7b017ac 100644 --- a/docs/book/searchindex.json +++ b/docs/book/searchindex.json @@ -273,13 +273,13 @@ "title": "Installation" }, "37": { - "body": "For an easier and faster setup of your local environment, run: node dist/cli.js setup This allows to use the setup script, making everything ready for a ZombieNet dev environment. You can use the following arguments: --help shows the different options and commands for using the Zombienet CLI. --binaries or -b: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: polkadot, polkadot-parachain. For example: node dist/cli.js setup polkadot polkadot-parachain Note: If you are using macOS please clone the Polkadot repo 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: Please add the dir to your $PATH by running the command: export PATH=/home//current_directory:$PATH", + "body": "For an easier and faster setup of your local environment, run: cd zombinet/javascript && npm i && npm run zombie -- setup This allows to use the setup script, making everything ready for a ZombieNet dev environment. You can use the following arguments: --help shows the different options and commands for using the Zombienet CLI. --binaries or -b: enables providing the binaries that you want to be downloaded and installed during the setup. Possible options: polkadot, polkadot-parachain. For example: cd zombinet/javascript && npm i && npm run zombie -- setup polkadot polkadot-parachain Note: If you are using macOS please clone the polkadot-sdk repo 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: Please add the dir to your $PATH by running the command: export PATH=/home//current_directory:$PATH", "breadcrumbs": "Development » Download and install needed artifacts (optional)", "id": "37", "title": "Download and install needed artifacts (optional)" }, "38": { - "body": "With the above steps completed, the zombienet CLI is ready to run: ❯ node dist/cli.js Usage: zombienet [options] [command] Options: -p, --provider Override provider to use (choices: \"podman\", \"kubernetes\", default: kubernetes) -h, --help display help for command Commands: spawn [creds] [monitor] Spawn the network defined in the config test Run tests on the network defined version Prints zombienet version help [command] display help for command", + "body": "With the above steps completed, the zombienet CLI is ready to run: cd zombinet/javascript && npm i && npm run zombie -- Usage: zombienet [options] [command] Options: -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 -p, --provider Override provider to use (choices: 'podman', 'kubernetes', 'native') -l, --logType Type of logging - defaults to 'table' (choices: 'table', 'text', 'silent') -d, --dir Directory path for placing the network files instead of random temp one -f, --force Force override all prompt commands -h, --help display help for command Commands: spawn [options] [creds] Spawn the network defined in the config test [runningNetworkSpec] Run tests on the network defined setup [options] Setup is meant for downloading and making dev environment of ZombieNet ready convert Convert is meant for transforming a (now deprecated) polkadot-launch configuration to zombienet configuration version Prints zombienet version help [command] display help for command", "breadcrumbs": "Development » Using Zombienet", "id": "38", "title": "Using Zombienet" diff --git a/docs/src/development.md b/docs/src/development.md index d80e48eb4..8dedf1c12 100644 --- a/docs/src/development.md +++ b/docs/src/development.md @@ -12,9 +12,8 @@ You need to first _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) @@ -22,7 +21,8 @@ npm run build For an easier and faster setup of your local environment, run: ```bash -node dist/cli.js setup +❯ cd zombinet/javascript +❯ npm i && npm run zombie -- setup ``` This allows to use the `setup` script, making everything ready for a ZombieNet dev environment. @@ -35,10 +35,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: @@ -62,19 +63,25 @@ nix run nixpkgs#prefetch-npm-deps -- javascript/package-lock.json 2>/dev/null 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 Override provider to use (choices: "podman", - "kubernetes", default: kubernetes) + -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 + -p, --provider Override provider to use (choices: "podman", "kubernetes", "native") + -l, --logType Type of logging - defaults to 'table' (choices: "table", "text", "silent") + -d, --dir 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 [creds] [monitor] Spawn the network defined in the config - test Run tests on the network defined + spawn [options] [creds] Spawn the network defined in the config + test [runningNetworkSpec] Run tests on the network defined + setup [options] Setup is meant for downloading and making dev environment of ZombieNet ready + convert 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 ``` diff --git a/javascript/README.md b/javascript/README.md index cf84b7e7e..00534eefd 100644 --- a/javascript/README.md +++ b/javascript/README.md @@ -25,10 +25,7 @@ write tests as smooth as possible. Internally zombienet is a `javascript` library, designed to run on `Node.js` and support different 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. +supported. ## Usage @@ -119,8 +116,8 @@ 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 -Usage: zombienet [options] [command] +❯ ./zombienet-macos +Usage: zombienet-macos [options] [command] Options: -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 @@ -177,7 +174,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. @@ -264,10 +261,10 @@ 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 +❯ ./zombienet-macos spawn examples/0001-small-network.toml ``` ##### Teardown @@ -317,9 +314,8 @@ alice: parachain 100 block height is at least 10 within 200 seconds 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) @@ -327,7 +323,8 @@ npm run build For an easier and faster setup of your local environment, run: ```bash -node dist/cli.js setup +❯ cd zombinet/javascript +❯ npm i && npm run zombie -- setup ``` This allows to use the `setup` script, making everything ready for a ZombieNet dev environment. @@ -340,10 +337,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: @@ -357,8 +355,8 @@ Please add the dir to your $PATH by running the command: export PATH=/home/ Override provider to use (choices: "podman", - "kubernetes", default: kubernetes) + -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 + -p, --provider Override provider to use (choices: "podman", "kubernetes", "native") + -l, --logType Type of logging - defaults to 'table' (choices: "table", "text", "silent") + -d, --dir 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 [creds] [monitor] Spawn the network defined in the config - test Run tests on the network defined + spawn [options] [creds] Spawn the network defined in the config + test [runningNetworkSpec] Run tests on the network defined + setup [options] Setup is meant for downloading and making dev environment of ZombieNet ready + convert 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 ``` diff --git a/javascript/packages/cli/README.md b/javascript/packages/cli/README.md index 1075a632f..5abe8c2c5 100644 --- a/javascript/packages/cli/README.md +++ b/javascript/packages/cli/README.md @@ -27,9 +27,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 @@ -119,7 +116,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: @@ -177,7 +174,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. @@ -265,10 +262,10 @@ 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 +❯ ./zombienet-macos spawn examples/0001-small-network.toml ``` ##### Teardown @@ -318,9 +315,8 @@ alice: parachain 100 block height is at least 10 within 200 seconds 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) @@ -328,7 +324,8 @@ npm run build For an easier and faster setup of your local environment, run: ```bash -node dist/cli.js setup +❯ cd zombinet/javascript +❯ npm i && npm run zombie -- setup ``` This allows to use the `setup` script, making everything ready for a ZombieNet dev environment. @@ -341,10 +338,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: @@ -358,8 +356,8 @@ Please add the dir to your $PATH by running the command: export PATH=/home/ Override provider to use (choices: "podman", - "kubernetes", default: kubernetes) + -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 + -p, --provider Override provider to use (choices: "podman", "kubernetes", "native") + -l, --logType Type of logging - defaults to 'table' (choices: "table", "text", "silent") + -d, --dir 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 [creds] [monitor] Spawn the network defined in the config - test Run tests on the network defined + spawn [options] [creds] Spawn the network defined in the config + test [runningNetworkSpec] Run tests on the network defined + setup [options] Setup is meant for downloading and making dev environment of ZombieNet ready + convert 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 ``` diff --git a/javascript/packages/orchestrator/README.md b/javascript/packages/orchestrator/README.md index 06ae73a7a..c4a57734d 100644 --- a/javascript/packages/orchestrator/README.md +++ b/javascript/packages/orchestrator/README.md @@ -25,10 +25,7 @@ write tests as smooth as possible. Internally zombienet is a `javascript` library, designed to run on `Node.js` and support different 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. +supported. ## Usage @@ -119,8 +116,8 @@ 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 -Usage: zombienet [options] [command] +❯ ./zombienet-macos +Usage: zombienet-macos [options] [command] Options: -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 @@ -177,7 +174,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. @@ -265,10 +262,10 @@ 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 +❯ ./zombienet-macos spawn examples/0001-small-network.toml ``` ##### Teardown @@ -318,9 +315,8 @@ alice: parachain 100 block height is at least 10 within 200 seconds 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 ``` ### Build `parser-wrapper` locally (optional) @@ -329,16 +325,16 @@ Building the `parser-wrapper` can help on running/testing locally changes on the In order to build the parser one first needs to run the `wasm-pack` (make sure that [wasm-pack](https://github.com/rustwasm/wasm-pack) is installed): ```bash -cd zombienet/crates/parser-wrapper -wasm-pack build --release --target nodejs --scope zombienet +❯ cd zombienet/crates/parser-wrapper +❯ wasm-pack build --release --target nodejs --scope zombienet ``` Once it is done, the next step is to create a symlink to the created `pkg` from inside the javascript directory, as can be seen below: ```bash -cd zombienet/javascript -npm link ../crates/parser-wrapper/pkg/ -npm run build +❯ cd zombienet/javascript +❯ npm link ../crates/parser-wrapper/pkg/ +❯ npm i && npm run build ``` ### Download and install needed artifacts (optional) @@ -346,7 +342,8 @@ npm run build For an easier and faster setup of your local environment, run: ```bash -node dist/cli.js setup +❯ cd zombinet/javascript +❯ npm i && npm run zombie -- setup ``` This allows to use the `setup` script, making everything ready for a ZombieNet dev environment. @@ -359,10 +356,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: @@ -376,10 +374,10 @@ Please add the dir to your $PATH by running the command: export PATH=/home/ Override provider to use (choices: "podman", - "kubernetes", default: kubernetes) + -c, --spawn-concurrency Number of concurrent spawning process to launch, default is 1 + -p, --provider Override provider to use (choices: "podman", "kubernetes", "native") + -l, --logType Type of logging - defaults to 'table' (choices: "table", "text", "silent") + -d, --dir 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 [creds] [monitor] Spawn the network defined in the config - test Run tests on the network defined + spawn [options] [creds] Spawn the network defined in the config + test [runningNetworkSpec] Run tests on the network defined + setup [options] Setup is meant for downloading and making dev environment of ZombieNet ready + convert 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 ```