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.

90 lines
4.0 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. For this deployment, we'll use the
  6. ``basecoin`` application.
  7. Manual Deployments
  8. ------------------
  9. It's relatively easy to setup a Tendermint cluster manually. The only
  10. requirements for a particular Tendermint node are a private key for the
  11. validator, stored as ``priv_validator.json``, and a list of the public
  12. keys of all validators, stored as ``genesis.json``. These files should
  13. be stored in ``~/.tendermint``, or wherever the ``$TMHOME`` variable
  14. might be set to.
  15. Here are the steps to setting up a testnet manually:
  16. 1) Provision nodes on your cloud provider of choice
  17. 2) Install Tendermint and the application of interest on all nodes
  18. 3) Generate a private key for each validator using
  19. ``tendermint gen_validator``
  20. 4) Compile a list of public keys for each validator into a
  21. ``genesis.json`` file.
  22. 5) Run ``tendermint node --p2p.seeds=< seed addresses >`` on each node,
  23. where ``< seed addresses >`` is a comma separated list of the IP:PORT
  24. combination for each node. The default port for Tendermint is
  25. ``46656``. Thus, if the IP addresses of your nodes were
  26. ``192.168.0.1, 192.168.0.2, 192.168.0.3, 192.168.0.4``, the command
  27. would look like:
  28. ``tendermint node --p2p.seeds=192.168.0.1:46656,192.168.0.2:46656,192.168.0.3:46656,192.168.0.4:46656``.
  29. After a few seconds, all the nodes should connect to eachother and start
  30. making blocks! For more information, see the Tendermint Networks section
  31. of `the guide to using Tendermint <using-tendermint.html>`__.
  32. Automated Deployments
  33. ---------------------
  34. While the manual deployment is easy enough, an automated deployment is
  35. usually quicker. The below examples show different tools that can be used
  36. for automated deployments.
  37. Automated Deployment using Kubernetes
  38. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  39. The `mintnet-kubernetes tool <https://github.com/tendermint/tools/tree/master/mintnet-kubernetes>`__
  40. allows automating the deployment of a Tendermint network on an already
  41. provisioned kubernetes cluster. For simple provisioning of a kubernetes
  42. cluster, check out the `Google Cloud Platform <https://cloud.google.com/>`__.
  43. Automated Deployment using Terraform and Ansible
  44. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  45. The `terraform-digitalocean tool <https://github.com/tendermint/tools/tree/master/terraform-digitalocean>`__
  46. allows creating a set of servers on the DigitalOcean cloud.
  47. The `ansible playbooks <https://github.com/tendermint/tools/tree/master/ansible>`__
  48. allow creating and managing a ``basecoin`` or ``ethermint`` testnet on provisioned servers.
  49. Package Deployment on Linux for developers
  50. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  51. The ``tendermint`` and ``basecoin`` applications can be installed from RPM or DEB packages on
  52. Linux machines for development purposes. The packages are configured to be validators on the
  53. one-node network that the machine represents. The services are not started after installation,
  54. this way giving an opportunity to reconfigure the applications before starting.
  55. The Ansible playbooks in the previous section use this repository to install ``basecoin``.
  56. After installation, additional steps are executed to make sure that the multi-node testnet has
  57. the right configuration before start.
  58. Install from the CentOS/RedHat repository:
  59. ::
  60. rpm --import https://tendermint-packages.interblock.io/centos/7/os/x86_64/RPM-GPG-KEY-Tendermint
  61. wget -O /etc/yum.repos.d/tendermint.repo https://tendermint-packages.interblock.io/centos/7/os/x86_64/tendermint.repo
  62. yum install basecoin
  63. Install from the Debian/Ubuntu repository:
  64. ::
  65. wget -O - https://tendermint-packages.interblock.io/centos/7/os/x86_64/RPM-GPG-KEY-Tendermint | apt-key add -
  66. wget -O /etc/apt/sources.list.d/tendermint.list https://tendermint-packages.interblock.io/debian/tendermint.list
  67. apt-get update && apt-get install basecoin