# Move to Production
How would you apply what you learned about running in production to your checkers blockchain?
# Prepare the node
On each of your nodes, create a new user:
Validators are going to use three different computers:
- A high-availability node server, typically running on a cloud service.
- A high-availability key management server, typically accessible by and running close to the operator.
- A desktop computer to manage both servers.
# Prepare executables
Now, take a closer look at how to prepare the executables.
This takes place on the desktop computer. Add a
Makefile for the targets you want to support:
.gitignore. Now run:
# Sharing and download
Make these files publicly downloadable.
Download them to the node servers, including the validator nodes, and put them in place. You can use a new script
prepare-node.sh that describes the steps:
Now run the script on the node:
# As a service
Prepare to run the executable as a service. Create a
/etc/systemd/system/checkersd.service file with:
# Prepare keys
This only applies to validators.
On the key management server, the validator operator installs the Tendermint KMS and gets the consensus key - for instance
Prepare the key management server to be able to connect to the node server.
On the desktop computer, select the keyring you want to use.
# Prepare the genesis
Now focus on preparing the genesis to continue to prepare to run your checkers blockchain in production. It involves some back and forth.
# Centralized creation
The validator operator that is in charge of assembling the genesis creates it on the node server:
Next, they attribute the initial stakes of everyone, including the validators, by running as many times as necessary:
Then they make it publicly downloadable.
# First distribution to validators
Each validator node operator downloads this genesis to their desktop computer and:
- Confirms their address is present and has the right balance.
- Checks their account number, say
Then for their address, they need to create the genesis transaction:
Then each validator sends the new file found in
~/.checkers/config/gentx back to the operator that centralizes the creation of the genesis.
# Addition of genesis transactions
The centralized operator now puts all the received genesis transactions on the node server in their own
/home/checkersuser/config/gentx. When they have all or enough of them by weight, they do:
They make this publicly available for everyone, including non-validators.
# Final distribution to operators
All operators download this genesis to their node servers, scrutinize it for confirmation that it conforms to their expectations, and put it in their own
# Prepare the network
Socially, operators exchange their addresses and ports with each other as they see fit. Presumably, they do not create two separate networks but a single one eventually.
They save their choices in
# Launch the executable
Here, each operator is free to architect their nodes as sentry, seed, or other types as they please.
Around the time that has been agreed on to start the network, they all enable the service:
When 2/3rds of the validators by weight are online, the network starts off the genesis.
To summarize, this section has explored:
- Applying the knowledge you have gained in the practical exercises to the checkers blockchain.
- How to prepare the necessary new users for the different nodes.
- How to prepare, share, and run the executables that must be downloaded to the validators' servers.
- How to run the executable as a service.
- How to prepare keys (only applies to validators).
- How to prepare the genesis on the node server and distribute it to validators.
- How to add the genesis transactions returned by the validators and make it available to all nodes.
- How to prepare the network and launch the executable.