0.0.1 • Published 2 years ago

symbol-network v0.0.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
2 years ago

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

Requirements

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

Installation

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

It's recommended to run the commands from en empty working dir.

$ npm install -g symbol-network
$ symbol-network COMMAND
running command...
$ symbol-network (-v|--version|version)
symbol-network/0.0.1-alpha-202110181929 linux-x64 node-v12.22.1
$ 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 mantained 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, the you sill 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.

Commands

Command Topics

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.