Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ before_script:
- VERSION="$(node_load_version)"
- if [[ ! -z "$DOCKER_USERNAME" ]] ; then echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin; fi
- log_env_variables
- if ! [ -x "$(command -v aws)" ]; then curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" ; unzip awscliv2.zip ; sudo ./aws/install ; fi
- aws s3 ls s3://symbol-bootstrap
script:
- npm pack
- npm test
Expand All @@ -37,14 +39,14 @@ jobs:
name: github alpha pages
script: /bin/bash travis/node-functions.sh node_push_github_pages
if: branch = env(DEV_BRANCH) AND type = push
- name: alpha npm
script: npm pack && /bin/bash travis/node-functions.sh node_publish_alpha
- name: alpha npm - s3
script: npm pack && /bin/bash travis/node-functions.sh node_publish_alpha && npm run dist && npm run publish
if: (branch = env(DEV_BRANCH) AND type = push) OR (type = api AND commit_message = alpha)
- stage: release
name: release npm
script: npm pack && /bin/bash travis/node-functions.sh node_publish_release
name: release npm - s3
script: npm pack && /bin/bash travis/node-functions.sh node_publish_release && npm run dist && npm run publish
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
- stage: post release
name: tag and version upgrade
script: npm pack && /bin/bash travis/node-functions.sh node_post_release
script: npm pack && /bin/bash travis/node-functions.sh node_post_release && npm run dist && npm run publish
if: branch = env(RELEASE_BRANCH) AND type = api AND commit_message = env(RELEASE_MESSAGE)
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ General users should install this tool like any other node module.
* [`symbol-bootstrap autocomplete`](docs/autocomplete.md) - display autocomplete installation instructions
* [`symbol-bootstrap clean`](docs/clean.md) - It removes the target folder deleting the generated configuration and data
* [`symbol-bootstrap compose`](docs/compose.md) - It generates the `docker-compose.yml` file from the configured network.
* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network
* [`symbol-bootstrap config`](docs/config.md) - Command used to set up the configuration files and the nemesis block for the current network.
* [`symbol-bootstrap decrypt`](docs/decrypt.md) - It decrypts a yml file using the provided password. The source file can be a custom preset file, a preset.yml file or an addresses.yml.
* [`symbol-bootstrap encrypt`](docs/encrypt.md) - It encrypts a yml file using the provided password. The source files would be a custom preset file, a preset.yml file or an addresses.yml.
* [`symbol-bootstrap enrolRewardProgram`](docs/enrolRewardProgram.md) - It enrols the nodes in the rewards program by announcing the enrol transaction to the registration address. You can also use this command to update the program registration when you change the node public key or server host.
Expand Down
5 changes: 5 additions & 0 deletions docs/clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

It removes the target folder deleting the generated configuration and data

This command can be used in OFFLINE mode.

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

## `symbol-bootstrap clean`
Expand All @@ -17,6 +19,9 @@ OPTIONS
-h, --help It shows the help of this command.
-t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated

DESCRIPTION
This command can be used in OFFLINE mode.

EXAMPLE
$ symbol-bootstrap clean
```
Expand Down
5 changes: 5 additions & 0 deletions docs/compose.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

It generates the `docker-compose.yml` file from the configured network.

This command can be used in OFFLINE mode.

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

## `symbol-bootstrap compose`
Expand All @@ -29,6 +31,9 @@ OPTIONS

--upgrade It regenerates the docker compose and utility files from the <target>/docker folder

DESCRIPTION
This command can be used in OFFLINE mode.

EXAMPLE
$ symbol-bootstrap compose
```
Expand Down
27 changes: 22 additions & 5 deletions docs/config.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
`symbol-bootstrap config`
=========================

Command used to set up the configuration files and the nemesis block for the current network
Command used to set up the configuration files and the nemesis block for the current network.

This command is by default an ONLINE tool, as it may use docker to run some operations like nemesis or certificate generation.
It's possible to run this command in OFFLINE mode, without using docker, by providing the --offline parameter.

Note: OFFLINE requires Linux/Mac OS, and the openssl command installed. If you are creating a new network (bootstrap preset),
the nemesis seed needs to be provided with a `nemesisSeedFolder` preset property. Nemesis generation is an online feature that requires catapult tools and docker.

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

## `symbol-bootstrap config`

Command used to set up the configuration files and the nemesis block for the current network
Command used to set up the configuration files and the nemesis block for the current network.

```
USAGE
Expand All @@ -33,14 +39,14 @@ OPTIONS
--noPassword When provided, Bootstrap will not use a password, so private keys will be stored in
plain text. Use with caution.

--offline If --offline is used, Bootstrap rejects any online operation when generating the
configuration.

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

--pullImages It pulls the utility images from DockerHub when running the configuration. It only
affects alpha/dev docker images.

--report It generates reStructuredText (.rst) reports describing the configuration of each
node.

Expand All @@ -49,8 +55,19 @@ OPTIONS
local data. The original preset (-t), assembly (-a), and custom preset (-a) must be
used. Backup the target folder before upgrading.

DESCRIPTION
This command is by default an ONLINE tool, as it may use docker to run some operations like nemesis or certificate
generation.
It's possible to run this command in OFFLINE mode, without using docker, by providing the --offline parameter.

Note: OFFLINE requires Linux/Mac OS, and the openssl command installed. If you are creating a new network (bootstrap
preset),
the nemesis seed needs to be provided with a `nemesisSeedFolder` preset property. Nemesis generation is an online
feature that requires catapult tools and docker.

EXAMPLES
$ symbol-bootstrap config -p bootstrap
$ symbol-bootstrap config -p testnet -a dual --customPreset my-encrypted-custom-preset.yml --offline
$ symbol-bootstrap config -p testnet -a dual --password 1234
$ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap config -p testnet -a dual
```
Expand Down
4 changes: 4 additions & 0 deletions docs/decrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ It decrypts a yml file using the provided password. The source file can be a cus

The main use case of this command is to verify private keys in encrypted files after encrypting a custom preset or running a bootstrap command with a provided --password.

This command can be used in OFFLINE mode.

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

## `symbol-bootstrap decrypt`
Expand All @@ -29,6 +31,8 @@ DESCRIPTION
The main use case of this command is to verify private keys in encrypted files after encrypting a custom preset or
running a bootstrap command with a provided --password.

This command can be used in OFFLINE mode.

EXAMPLES

$ symbol-bootstrap start --password 1234 --preset testnet --assembly dual --customPreset decrypted-custom-preset.yml
Expand Down
4 changes: 4 additions & 0 deletions docs/encrypt.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ It encrypts a yml file using the provided password. The source files would be a

The main use case of this command is encrypting custom presets files. If your custom preset contains private keys, it's highly recommended to encrypt it and use provide --password when starting or configuring the node with Bootstrap.

This command can be used in OFFLINE mode.

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

## `symbol-bootstrap encrypt`
Expand All @@ -30,6 +32,8 @@ DESCRIPTION
The main use case of this command is encrypting custom presets files. If your custom preset contains private keys,
it's highly recommended to encrypt it and use provide --password when starting or configuring the node with Bootstrap.

This command can be used in OFFLINE mode.

EXAMPLES

$ symbol-bootstrap encrypt --source plain-custom-preset.yml --destination encrypted-custom-preset.yml
Expand Down
5 changes: 5 additions & 0 deletions docs/enrolRewardProgram.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ It enrols the nodes in the rewards program by announcing the enrol transaction t

Currently, the only program that can be enrolled post-launch is 'SuperNode'.

This is an ONLINE command as it creates the transaction depending on the main account type (simple or multisig), and it announces the transaction to the network.

* [`symbol-bootstrap enrolRewardProgram`](#symbol-bootstrap-enrolrewardprogram)

## `symbol-bootstrap enrolRewardProgram`
Expand Down Expand Up @@ -39,6 +41,9 @@ OPTIONS
DESCRIPTION
Currently, the only program that can be enrolled post-launch is 'SuperNode'.

This is an ONLINE command as it creates the transaction depending on the main account type (simple or multisig), and
it announces the transaction to the network.

EXAMPLES
$ symbol-bootstrap enrolRewardProgram
$ symbol-bootstrap enrolRewardProgram --noPassword
Expand Down
5 changes: 5 additions & 0 deletions docs/healthCheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This command checks:

The health check process handles 'repeat' and custom 'openPort' services.

Although it's highly possible your node is connected to the internet, this is an OFFLINE command as it health checks the local nodes and services.

* [`symbol-bootstrap healthCheck`](#symbol-bootstrap-healthcheck)

## `symbol-bootstrap healthCheck`
Expand All @@ -32,6 +34,9 @@ DESCRIPTION

The health check process handles 'repeat' and custom 'openPort' services.

Although it's highly possible your node is connected to the internet, this is an OFFLINE command as it health checks
the local nodes and services.

EXAMPLE
$ symbol-bootstrap healthCheck
```
Expand Down
6 changes: 6 additions & 0 deletions docs/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

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.

This is an ONLINE command as it creates the transactions depending on the main account type (simple or multisig), the main account link status, and it announces the transactions to the network.

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

## `symbol-bootstrap link`
Expand Down Expand Up @@ -36,6 +38,10 @@ OPTIONS
--useKnownRestGateways Use the best NEM node available when announcing. Otherwise the command will use the node
provided by the --url parameter.

DESCRIPTION
This is an ONLINE command as it creates the transactions depending on the main account type (simple or multisig), the
main account link status, and it announces the transactions to the network.

EXAMPLES
$ symbol-bootstrap link
$ echo "$MY_ENV_VAR_PASSWORD" | symbol-bootstrap link --unlink --useKnownRestGateways
Expand Down
5 changes: 5 additions & 0 deletions docs/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

it generates reStructuredText (.rst) reports describing the configuration of each node.

This command can be used in OFFLINE mode.

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

## `symbol-bootstrap report`
Expand All @@ -17,6 +19,9 @@ OPTIONS
-h, --help It shows the help of this command.
-t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated

DESCRIPTION
This command can be used in OFFLINE mode.

EXAMPLE
$ symbol-bootstrap report
```
Expand Down
5 changes: 5 additions & 0 deletions docs/resetData.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

It removes the data keeping the generated configuration, certificates, keys and block 1.

This command can be used in OFFLINE mode.

* [`symbol-bootstrap resetData`](#symbol-bootstrap-resetdata)

## `symbol-bootstrap resetData`
Expand All @@ -17,6 +19,9 @@ OPTIONS
-h, --help It shows the help of this command.
-t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated

DESCRIPTION
This command can be used in OFFLINE mode.

EXAMPLE
$ symbol-bootstrap resetData
```
Expand Down
11 changes: 10 additions & 1 deletion docs/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

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.

This command can only be used in ONLINE mode. It uses docker, docker compose, and images must be pulled from the internet. It's expected for a mainnet/testnet node to be connected to the internet.

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

## `symbol-bootstrap run`
Expand Down Expand Up @@ -40,15 +42,22 @@ OPTIONS

The health check process handles 'repeat' and custom 'openPort' services.

Although it's highly possible your node is connected to the internet, this is an OFFLINE command as it health checks
the local nodes and services.

--pullImages
It pulls the images from DockerHub when running the configuration. It only affects alpha/dev docker images.
It pulls the utility images from DockerHub when running the configuration. It only affects alpha/dev docker images.

--resetData
It reset the database and node data but keeps the generated configuration, keys, voting tree files and block 1

--timeout=timeout
[default: 60000] If running in detached mode, how long before timing out (in milliseconds)

DESCRIPTION
This command can only be used in ONLINE mode. It uses docker, docker compose, and images must be pulled from the
internet. It's expected for a mainnet/testnet node to be connected to the internet.

EXAMPLE
$ symbol-bootstrap run
```
Expand Down
18 changes: 18 additions & 0 deletions docs/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@

Single command that aggregates config, compose and run in one line!

This command is typically run in ONLINE mode. It uses docker, docker compose, and images must be pulled from the internet. It's expected for a mainnet/testnet node to be connected to the internet.

However, if you require your setup to be OFFLINE, you can run `config`, and `compose` in your offline machine,
zip and copy the target folder into the online machine, and execute `run` or `start` there.

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

## `symbol-bootstrap start`
Expand Down Expand Up @@ -56,9 +61,15 @@ OPTIONS

The health check process handles 'repeat' and custom 'openPort' services.

Although it's highly possible your node is connected to the internet, this is an OFFLINE command as it health checks
the local nodes and services.

--noPassword
When provided, Bootstrap will not use a password, so private keys will be stored in plain text. Use with caution.

--offline
If --offline is used, Bootstrap rejects any online operation when generating the configuration.

--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
Expand All @@ -81,6 +92,13 @@ OPTIONS
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.

DESCRIPTION
This command is typically run in ONLINE mode. It uses docker, docker compose, and images must be pulled from the
internet. It's expected for a mainnet/testnet node to be connected to the internet.

However, if you require your setup to be OFFLINE, you can run `config`, and `compose` in your offline machine,
zip and copy the target folder into the online machine, and execute `run` or `start` there.

EXAMPLES
$ symbol-bootstrap start
$ symbol-bootstrap start -p bootstrap
Expand Down
5 changes: 5 additions & 0 deletions docs/stop.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

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.

This command can be run in OFFLINE mode, since it just stops the docker services.

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

## `symbol-bootstrap stop`
Expand All @@ -17,6 +19,9 @@ OPTIONS
-h, --help It shows the help of this command.
-t, --target=target [default: target] The target folder where the symbol-bootstrap network is generated

DESCRIPTION
This command can be run in OFFLINE mode, since it just stops the docker services.

EXAMPLE
$ symbol-bootstrap stop
```
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
"coveralls-report": "cat ./coverage/lcov.info | coveralls",
"version": "echo $npm_package_version",
"install-cli": "npm pack && npm i -g",
"publish": "aws s3 cp --recursive ./dist/symbol-bootstrap-* s3://symbol-bootstrap/dist/v$npm_package_version --acl public-read",
"dist": "oclif-dev pack",
"clean-network": "symbol-bootstrap clean -t target/bootstrap-test",
"start-network": "symbol-bootstrap start -t target/bootstrap-test -u 'current'"
},
Expand Down
5 changes: 4 additions & 1 deletion src/commands/clean.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import { BootstrapUtils } from '../service';
import { CommandUtils } from '../service/CommandUtils';

export default class Clean extends Command {
static description = 'It removes the target folder deleting the generated configuration and data';
static description = `It removes the target folder deleting the generated configuration and data

This command can be used in OFFLINE mode.
`;

static examples = [`$ symbol-bootstrap clean`];

Expand Down
5 changes: 4 additions & 1 deletion src/commands/compose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ import { BootstrapService, BootstrapUtils, ComposeService } from '../service';
import { CommandUtils } from '../service/CommandUtils';

export default class Compose extends Command {
static description = 'It generates the `docker-compose.yml` file from the configured network.';
static description = `It generates the \`docker-compose.yml\` file from the configured network.

This command can be used in OFFLINE mode.
`;

static examples = [`$ symbol-bootstrap compose`];

Expand Down
Loading