Skip to content

CLI tools to create node clusters for new or existing Symbol networks.

Notifications You must be signed in to change notification settings

fboucquez/symbol-network

Repository files navigation

symbol-network

CLI tools to create node clusters for new or existing Symbol networks. This cli handles the creation and distribution of the nemesis block.

oclif Version Downloads/week License Build Coverage Status Api Doc

Why this tool?

To handle dozens or hundreds of Symbol Nodes in "cattle" style, where nodes are created and managed in bundles.

If you are creating a Symbol node for the first time, please have look at the symbol-bootstrap cli.

For more information, checkout this guide/blog post.

Requirements

  • Node 12.0.0+
  • Docker 18.3.0+
  • Docker Compose 1.25.0+
  • Symbol Bootstrap 1.1.4+.

Installation

Before installing this tool, you need to install the symbol-bootstrap cli first. Please follow the Please follow the instructions.

$ npm install -g symbol-network
$ symbol-network COMMAND
running command...
$ symbol-network (-v|--version|version)
symbol-network/0.0.2 linux-x64 node-v12.22.9
$ symbol-network --help [COMMAND]
USAGE
  $ symbol-network COMMAND
...

Usage

After installing the tool. Run:

$ mkdir my-network-workspace
$ cd my-network-workspace
$ symbol-network verify
$ symbol-network init

and follow the instructions.

The wizard style CLI will guide you in the process of creating the nodes. The tool creates a bunch of files and folders.

When creating nodes to an existing network the files and folders are:

  • network-input.yml: This file is created by the symbol-network init. It generates and defines the initial node layout, describing how many nodes of each type you want to create.
  • network.yml: This file is created by the symbol-network expandNodes and maintained by the following commands. It's the "expansion" of network-input.yml file where each node layed out individually. It defines your node cluster.
  • nodes: The folder that contains the final node configurations ready to deploy. The folder is created and maintained by the symbol-network configureNodes command.
  • key-store.yml: A file that stores the private keys and voting key files of the nodes. This file is created by the default private data storage. This can be extended to store data somewhere else, like for example AWS Secrets.

In addition, for new networks, you will see the following files and folders are:

  • custom-network-preset.yml: This files defines the configuration of it. It's the --preset mainnet/testnet for your new network. You can share this file with other members that want to connect to your new private network.
  • nemesis-target: The target of the nemesis node. You can use this initial node to try the network before deploying the final nodes.
  • nemesis-seed: The seed folder copied from the nemesis-target. You can share with other members that want to connect to your network.

Development

If you want to contribute to this tool, clone this repo, and run:

npm install -g

Then, symbol-network runs from the source code. You can now try your features after changing the code.

Pull Requests are appreciated! Please follow the contributing guidelines.

Note: cloning this repo is only for people that want to tune the tool in a way it cannot be configured. If this is your case, please provide a feature request.

General users should install this tool like any other node module.

Code style

To format the source code, verify/fix lint issues, and generate the commands docs, run:

npm run style:fix

Support

Symbol Network is a personal project maintained on my free time.

If you like it, please consider supporting it by delegating your Symbol account to my node:

name: symbol-node-dual-1.tawa.solutions
publicKey: 6DB275B83F4839768821FF621DD90358F99A84EC61EB7DE1F6947E5B0926B9BB

If you don't like it, let me know by creating issues on GitHub. Pull Requests are welcome!

Command Topics

About

CLI tools to create node clusters for new or existing Symbol networks.

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published