Skip to content

Commit

Permalink
feat: Wizard and Pack commands (#190)
Browse files Browse the repository at this point in the history
  • Loading branch information
fboucquez authored Jul 13, 2021
1 parent 03fa76c commit fc5a06c
Show file tree
Hide file tree
Showing 16 changed files with 2,145 additions and 38 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The changelog format is based on [Keep a Changelog](https://keepachangelog.com/e
| ---------------- | ------- | ------------------------------------------------------------------ |
| Symbol Bootstrap | v1.0.8 | [symbol-bootstrap](https://www.npmjs.com/package/symbol-bootstrap) |

- Added `wizard` command.
- Added `pack` command.

## [1.0.7] - June-22-2021

Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Symbol CLI tool that allows you creating, configuring and running Symbol's c
* [Concepts](#concepts)
* [Requirements](#requirements)
* [Usage](#usage)
* [General Usage](#general-usage)
* [Wizard](#wizard)
* [E2E Testing support](#e2e-testing-support)
* [Development](#development)
* [Commands](#commands)
Expand Down Expand Up @@ -143,6 +145,8 @@ USAGE
```
<!-- usagestop -->

# General Usage

The general usage would be:

```
Expand All @@ -163,6 +167,14 @@ If you need to start fresh, you many need to sudo remove the target folder (dock
sudo rm -rf ./target
```

# Wizard

If this is your first time creating a node, it's recommended to use the Wizard. Just follow the instructions:

```
symbol-bootstrap wizard
```

# E2E Testing support

One use case of this CLI is client E2E testing support. If you are coding a Symbol client, you (Travis or Jenkins) can run e2e tests like:
Expand Down Expand Up @@ -272,13 +284,15 @@ General users should install this tool like any other node module.
* [`symbol-bootstrap healthCheck`](docs/healthCheck.md) - It checks if the services created with docker compose are up and running.
* [`symbol-bootstrap help`](docs/help.md) - display help for symbol-bootstrap
* [`symbol-bootstrap link`](docs/link.md) - It announces VRF and Voting Link transactions to the network for each node with 'Peer' or 'Voting' roles. This command finalizes the node registration to an existing network.
* [`symbol-bootstrap pack`](docs/pack.md) - It configures and packages your node into a zip file that can be uploaded to the final node machine.
* [`symbol-bootstrap report`](docs/report.md) - it generates reStructuredText (.rst) reports describing the configuration of each node.
* [`symbol-bootstrap resetData`](docs/resetData.md) - It removes the data keeping the generated configuration, certificates, keys and block 1.
* [`symbol-bootstrap run`](docs/run.md) - It boots the network via docker using the generated `docker-compose.yml` file and configuration. The config and compose methods/commands need to be called before this method. This is just a wrapper for the `docker-compose up` bash call.
* [`symbol-bootstrap start`](docs/start.md) - Single command that aggregates config, compose and run in one line!
* [`symbol-bootstrap stop`](docs/stop.md) - It stops the docker-compose network if running (symbol-bootstrap started with --detached). This is just a wrapper for the `docker-compose down` bash call.
* [`symbol-bootstrap updateVotingKeys`](docs/updateVotingKeys.md) - It updates the voting files containing the voting keys when required.
* [`symbol-bootstrap verify`](docs/verify.md) - It tests the installed software in the current computer reporting if there is any missing dependency, invalid version, or software related issue.
* [`symbol-bootstrap wizard`](docs/wizard.md) - An utility command that will help you configuring node!

<!-- commandsstop -->

Expand Down
62 changes: 62 additions & 0 deletions docs/pack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
`symbol-bootstrap pack`
=======================

It configures and packages your node into a zip file that can be uploaded to the final node machine.

* [`symbol-bootstrap pack`](#symbol-bootstrap-pack)

## `symbol-bootstrap pack`

It configures and packages your node into a zip file that can be uploaded to the final node machine.

```
USAGE
$ symbol-bootstrap pack
OPTIONS
-a, --assembly=assembly (required) The assembly, example "dual" for testnet.
-c, --customPreset=customPreset (required) External preset file. Values in this file will override the
provided presets
-h, --help It shows the help of this command.
-p, --preset=(bootstrap|testnet|mainnet) (required) The network preset, can be provided via custom preset or cli
parameter.
-r, --reset It resets the configuration generating a new one
-t, --target=target [default: target] The target folder where the symbol-bootstrap network is
generated
-u, --user=user [default: current] User used to run docker images when creating
configuration files like certificates or nemesis block. "current" means the
current user.
--noPassword When provided, Bootstrap will not use a password, so private keys will be
stored in plain text. Use with caution.
--password=password A password used to encrypt and decrypt private keys in preset files like
addresses.yml and preset.yml. Bootstrap prompts for a password by default,
can be provided in the command line (--password=XXXX) or disabled in the
command line (--noPassword).
--ready If --ready is provided, the command will not ask offline confirmation.
--report It generates reStructuredText (.rst) reports describing the configuration of
each node.
--upgrade It regenerates the configuration reusing the previous keys. Use this flag
when upgrading the version of bootstrap to keep your node up to date without
dropping the local data. The original preset (-t), assembly (-a), and custom
preset (-a) must be used. Backup the target folder before upgrading.
EXAMPLES
$ symbol-bootstrap pack
$ symbol-bootstrap pack -p bootstrap -c custom-preset.yml
$ symbol-bootstrap pack -p testnet -a dual -c custom-preset.yml
$ symbol-bootstrap pack -p mainnet -a dual --password 1234 -c custom-preset.yml
$ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap pack -p mainnet -a dual -c custom-preset.yml
```

_See code: [src/commands/pack.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.8/src/commands/pack.ts)_
39 changes: 39 additions & 0 deletions docs/wizard.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
`symbol-bootstrap wizard`
=========================

An utility command that will help you configuring node!

* [`symbol-bootstrap wizard`](#symbol-bootstrap-wizard)

## `symbol-bootstrap wizard`

An utility command that will help you configuring node!

```
USAGE
$ symbol-bootstrap wizard
OPTIONS
-c, --customPreset=customPreset [default: custom-preset.yml] The custom preset to be created.
-h, --help It shows the help of this command.
-t, --target=target [default: target] The target folder where the symbol-bootstrap network is
generated
--network=mainnet|testnet|privateNetwork The node or network you want to create
--noPassword When provided, Bootstrap will not use a password, so private keys will be
stored in plain text. Use with caution.
--password=password A password used to encrypt and decrypt private keys in preset files like
addresses.yml and preset.yml. Bootstrap prompts for a password by default,
can be provided in the command line (--password=XXXX) or disabled in the
command line (--noPassword).
--ready If --ready is provided, the command will not ask offline confirmation.
EXAMPLE
$ symbol-bootstrap wizard
```

_See code: [src/commands/wizard.ts](https://github.com/nemtech/symbol-bootstrap/blob/v1.0.8/src/commands/wizard.ts)_
Loading

0 comments on commit fc5a06c

Please sign in to comment.