Skip to content

Commit

Permalink
docs: added convert command to documentation (#955)
Browse files Browse the repository at this point in the history
* docs: added convert command to documentation

* docs: added convert to summary and fixed naming

* chore: correct phrasing of convert description

Co-authored-by: Nikos Kontakis <wirednkod@gmail.com>

---------

Co-authored-by: Nikos Kontakis <wirednkod@gmail.com>
  • Loading branch information
l0r1s and wirednkod authored Apr 24, 2023
1 parent e752250 commit 2581aa8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [Podman](./features/podman.md)
- [Native](./features/native.md)
- [Cli usage](./cli/index.md)
- [Convert](./cli/convert.md)
- [Setup](./cli/setup.md)
- [Spawning](./cli/spawn.md)
- [Using env vars](./cli/env_vars.md)
Expand Down
24 changes: 24 additions & 0 deletions docs/src/cli/convert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Convert

The `convert` command is a CLI command designed to help users convert their a `Polkadot Launch` configuration to the ` Zombienet` configuration format. This tool is especially helpful for developers to migrate their projects to to Zombienet, without the need to manually rewrite their configurations.

### Usage

```bash
zombienet convert <INPUT_FILE>
```

**Note**: Where ```<INPUT_FILE>``` is a Polkadot Launch configuration with a .js or .json extension defined by [this type](https://github.com/paritytech/polkadot-launch/blob/295a6870dd363b0b0108e745887f51e7141d7b5f/src/types.d.ts#L10)

### Example

Suppose you have a Polkadot Launch configuration file named `my-project-config.json`. To convert it to a Zombienet configuration file named `my-project-config-zombienet.json`, run:

```bash
zombienet convert my-project-config.json
```

### Notes

- The `convert` command will attempt to preserve as much information as possible from the original Polkadot Launch configuration file. However, due to the differences in the configuration structure and options between the two systems, some manual adjustments may be necessary after the conversion.
- It is recommended to thoroughly review the generated Zombienet configuration file to ensure that all the settings are correct and to make any necessary adjustments before using it to deploy your project.

0 comments on commit 2581aa8

Please sign in to comment.