You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.8 KiB

  1. Deploy a Testnet
  2. ================
  3. Now that we've seen how ABCI works, and even played with a few
  4. applications on a single validator node, it's time to deploy a test
  5. network to four validator nodes.
  6. Manual Deployments
  7. ------------------
  8. It's relatively easy to setup a Tendermint cluster manually. The only
  9. requirements for a particular Tendermint node are a private key for the
  10. validator, stored as ``priv_validator.json``, a node key, stored as
  11. ``node_key.json`` and a list of the public keys of all validators, stored as
  12. ``genesis.json``. These files should be stored in ``~/.tendermint/config``, or
  13. wherever the ``$TMHOME`` variable might be set to.
  14. Here are the steps to setting up a testnet manually:
  15. 1) Provision nodes on your cloud provider of choice
  16. 2) Install Tendermint and the application of interest on all nodes
  17. 3) Generate a private key and a node key for each validator using
  18. ``tendermint init``
  19. 4) Compile a list of public keys for each validator into a
  20. ``genesis.json`` file and replace the existing file with it.
  21. 5) Run ``tendermint node --proxy_app=kvstore --p2p.persistent_peers=< peer addresses >`` on each node,
  22. where ``< peer addresses >`` is a comma separated list of the IP:PORT
  23. combination for each node. The default port for Tendermint is
  24. ``46656``. Thus, if the IP addresses of your nodes were
  25. ``192.168.0.1, 192.168.0.2, 192.168.0.3, 192.168.0.4``, the command
  26. would look like:
  27. ``tendermint node --proxy_app=kvstore --p2p.persistent_peers=96663a3dd0d7b9d17d4c8211b191af259621c693@192.168.0.1:46656, 429fcf25974313b95673f58d77eacdd434402665@192.168.0.2:46656, 0491d373a8e0fcf1023aaf18c51d6a1d0d4f31bd@192.168.0.3:46656, f9baeaa15fedf5e1ef7448dd60f46c01f1a9e9c4@192.168.0.4:46656``.
  28. After a few seconds, all the nodes should connect to each other and start
  29. making blocks! For more information, see the Tendermint Networks section
  30. of `the guide to using Tendermint <using-tendermint.html>`__.
  31. While the manual deployment is easy enough, an automated deployment is
  32. usually quicker. The below examples show different tools that can be used
  33. for automated deployments.
  34. Automated Deployments
  35. ---------------------
  36. Local
  37. ^^^^^
  38. With ``docker`` installed, run the command:
  39. ::
  40. make localnet-start
  41. from the root of the tendermint repository. This will spin up a 4-node local testnet.
  42. Cloud Deployment using Kubernetes
  43. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  44. The `mintnet-kubernetes tool <https://github.com/tendermint/tools/tree/master/mintnet-kubernetes>`__
  45. allows automating the deployment of a Tendermint network on an already
  46. provisioned Kubernetes cluster. For simple provisioning of a Kubernetes
  47. cluster, check out the `Google Cloud Platform <https://cloud.google.com/>`__.
  48. Cloud Deployment using Terraform and Ansible
  49. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  50. See the `next section <./terraform-and-ansible.html>`__ for details.