paritytech/parity-deploy

Name: parity-deploy

Owner: Parity Technologies

Description: Parity deployment script.

Created: 2017-05-12 13:53:21.0

Updated: 2018-05-19 13:47:06.0

Pushed: 2018-03-22 16:55:50.0

Homepage:

Size: 10941

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Parity Deploy

The parity deploy script is used to generate parity deployment configurations. These can range from a single instance development node to a proof of authority network with an arbitrary amount of authority nodes.

Requirements

There are multiple dependencies for this script to work. Most modern operating systems should have the base of these already installed. On Ubuntu systems these will automatically be installed if not already present on the system.

Requires:

  1. openssl (which supports secp256k1 curves)
  2. python pip
  3. docker
  4. docker-compose

CLI Usage Options

There are currently three main options which can be used with the parity-deploy tool. They are:

Required:

stantseal - Instant sealing of blocks for development mode. Expected to be run on a single node.
ra - Authority Round consensus engine, where all the authorities take a turn being the block created, based on unix/linux epoch, so the time need to be syncronized between hosts.
ndermint - Tendermint is another consensus engine that can be used with parity, however not as well tested as Authority Round.  
lidatorset - Validtor Set is used to transition a chain from one validator to another at a certain block.
put.json - Use a custom input chain spec file used on all of the nodes.

onal:
-nodes``` The amount of nodes that will be used with an aura or tendermint network. By default one non-authority node is also created. Default value is 2 nodes.
-expose``` This option will expose ports 8080, 8180, 8545 and 30303 on the container name given as an argument.


ing the tool

ently this scripts supports two types of chains, either instant sealing for development and aura for proof of authority with multiple validators.

 examples of using the script are:

ngle node instant seal node, accessible via 127.0.0.1:8180:

./parity-deploy.sh –config dev

ree node proof of authority chain with one client acessable via 127.0.0.1:8180:

./parity-deploy.sh –config aura

output of this tool are two main items:
 docker-compose.yml file which can be used with docker-compose to bring up and down the host(s). 
 deployments directory which will contain the keys, spec files and everything else required to configure the chain.

unch the parity chain

 the configuration is created you just need to run the docker-compose command to launch the machine or machines. This can be done via:

docker-compose up -d

will then be able to see the logs by running:

docker-compose logs -f

hese logs you should see a token being generated to login to parity. Alternatively you can run the command:

docker-compose logs | grep token

 you are logged into the web interface if you go to Add Accounts, then select the option recovery phrase and enter the account recovery phrase as ```password``` 

now have an account with lots of ether to send around. 

top the containers run:

docker-compose down

nfiguration of parity deploy

 parity-deploy has been run it will generate configuration files which are kept in the ```deployment``` folder. There are a few subdirectories that may exist in this location:

eployment/chain - this contains chain information such as spec file (spec.json) and other files like the reserved_peers file.

eployment/is_authority - this directory contains the configuration for an instant sealing authority. It has key.priv (private key file), key.pub (public key file), address.txt (pre-created authority address), password (plain text password file) and authority.toml (authority's parity config file).

eployment/client - this directory contains the configuration for an instant sealing client. It has key.priv (private key file), key.pub (public key file), address.txt (pre-created client address), password (plain text password file) and client.toml (client's parity config file).

eployment/[1/2/3] - these directories are used when you are using multiple aura validators -  It has key.priv (private key file), key.pub (public key file), address.txt (pre-created authority address), password (plain text password file) and authority.toml (authority's parity config file).

of these nodes are then added to the to the chains/reserved_peers file.

stomisation of the chain configs.

of the chains are templated from the config directory. Inside the config directory there are multiple possible sources of templates:

onfig/docker - This contains three example yml template files.
onfig/docker/authority.yml is a config file used for an aura authority.
onfig/docker/client.yml is a config file used to connect a client to the authority nodes.
onfig/docker/instantseal.yml is a config file used for an instantseal authority node.

onfig/spec/acccounts - This directory contains the accounts that will be added to the spec files.
onfig/specs/accounts/aura - This file contains the accounts that will be added to the default aura chain.
onfig/specs/accounts/instantseal - This file contains accounts that will be added to the default instantseal chain.
onfig/specs/accounts/tendermint - This file contains accounts that will be added to the default tendermint chain.

onfig/spec/engine - This directory contains the consensus engine information for each chain.
onfig/spec/engine/aura - This file contains the engine information for the aura chain.
onfig/spec/engine/instantseal - This file contains the engine information for the instantseal chain.
onfig/spec/engine/tendermint - This file contains the engine information for the tendermint chain.
onfig/spec/engine/validatorset - This file contains the engine information for the validator set example chain.


onfig/spec/genesis - This directory contains genesis information for each chain.
onfig/spec/genesis/aura - This file contains genesis information for the aura chain.
onfig/spec/genesis/instantseal - This file contains genesis information for the instant seal chain.
onfig/spec/genesis/tendermint - This file contains genesis information for the tendermint chain.


onfig/spec/params - This directory contains additional parameters for each chain.
onfig/spec/params/aura - This file contains additional parameters for the aura chain.
onfig/spec/params/instantseal - This file contains additional parameters for the instantseal chain.
onfig/spec/params/tendermint - This file contains additional parameters for the tendermint chain.

onfig/spec - This directory contains some toml spec files that are used as parity configurations.
onfig/spec/authority_round.toml - An example toml file for an aura chain.
onfig/spec/instantseal.toml - An example toml file for an instantseal chain.
onfig/spec/tendermint.tml - An example toml file for a tendermint chain.
onfig/spec/chain_header - An example header for the chain spec file.
onfig/spec/chain_footer - An example footer for the chain spec file.


ding custom containers

can also include custom containers (e.g. ethstats monitoring) by including the docker-compose configuration in include/docker-compose.yml. To add Ethstats monitoring you would need to include this in the file:

monitor:

image: buythewhale/ethstats_monitor
volumes:
  - ./monitor/app.json:/home/ethnetintel/eth-net-intelligence-api/app.json:ro

dashboard:

image: buythewhale/ethstats
volumes:
  - ./dashboard/ws_secret.json:/eth-netstats/ws_secret.json:ro
ports:
  - 3001:3000

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.