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.
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:
There are currently three main options which can be used with the parity-deploy tool. They are:
Required:
--config
This option allows you to set the conensus engine of the chain. Multiple methods are supported:
Optional:
--name
This option allows you to set the name of the chain in use. Default chain name is parity.
--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.
--ethstats
This option will start an ethstats monitoring instance that can be connected to on http://localhost:3001
--expose
This option will expose ports 8080, 8180, 8545 and 30303 on the container name given as an argument.
--release
This option will let you select the release of the docker image.
--entrypoint
This option will override the default entrypoint in the docker image.
Currently this scripts supports two types of chains, either instant sealing for development and aura for proof of authority with multiple validators.
Some examples of using the script are:
A single node instant seal node, accessible via 127.0.0.1:8180:
./parity-deploy.sh --config dev
A three node proof of authority chain with one client acessable via 127.0.0.1:8180:
./parity-deploy.sh --config aura
The output of this tool are two main items:
Once 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
You will then be able to see the logs by running:
docker-compose logs -f
In these logs you should see a token being generated to login to parity. Alternatively you can run the command:
docker-compose logs | grep token
Once 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
You now have an account with lots of ether to send around.
To stop the containers run:
docker-compose down
Once 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:
deployment/chain - this contains chain information such as spec file (spec.json) and other files like the reserved_peers file.
deployment/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).
deployment/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).
deployment/[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).
All of these nodes are then added to the to the chains/reserved_peers file.
All of the chains are templated from the config directory. Inside the config directory there are multiple possible sources of templates:
config/docker - This contains three example yml template files.
config/spec/acccounts - This directory contains the accounts that will be added to the spec files.
config/spec/engine - This directory contains the consensus engine information for each chain.
config/spec/genesis - This directory contains genesis information for each chain.
config/spec/params - This directory contains additional parameters for each chain.
config/spec - This directory contains some toml spec files that are used as parity configurations.
You 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