Skip to content

Commit b5c4098

Browse files
zramsaymelekes
authored andcommitted
update docs/examples & terraform/ansible (tendermint#1534)
* update docs/examples * ansible: add node IDs from docs/examples * better monikers * ansible: clearer paths * upgrade version * examples: updates * docs: consolidate terraform & ansible * remove deprecated info, small reorgs * docs build fix * docs: t&a critical commit * s/dummy/kvstore/g * terraform/DO region unavailable, persistent error can't be bothered to debug rn * terraform: need vars * networks: t&a standalone integration script for DO * t&a more updates * examples: add script that shows what the testnet command does * use AMS3, since AMS2 is not available
1 parent bc8768c commit b5c4098

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1264
-456
lines changed
File renamed without changes.

docs/conf.py

-4
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,6 @@
184184
if os.path.isdir(assets_dir) != True:
185185
os.mkdir(assets_dir)
186186

187-
urllib.urlretrieve(tools_repo+tools_branch+'/ansible/README.rst', filename=tools_dir+'/ansible.rst')
188-
urllib.urlretrieve(tools_repo+tools_branch+'/ansible/assets/a_plus_t.png', filename=assets_dir+'/a_plus_t.png')
189-
190187
urllib.urlretrieve(tools_repo+tools_branch+'/docker/README.rst', filename=tools_dir+'/docker.rst')
191188

192189
urllib.urlretrieve(tools_repo+tools_branch+'/mintnet-kubernetes/README.rst', filename=tools_dir+'/mintnet-kubernetes.rst')
@@ -195,7 +192,6 @@
195192
urllib.urlretrieve(tools_repo+tools_branch+'/mintnet-kubernetes/assets/statefulset.png', filename=assets_dir+'/statefulset.png')
196193
urllib.urlretrieve(tools_repo+tools_branch+'/mintnet-kubernetes/assets/t_plus_k.png', filename=assets_dir+'/t_plus_k.png')
197194

198-
urllib.urlretrieve(tools_repo+tools_branch+'/terraform-digitalocean/README.rst', filename=tools_dir+'/terraform-digitalocean.rst')
199195
urllib.urlretrieve(tools_repo+tools_branch+'/tm-bench/README.rst', filename=tools_dir+'/benchmarking.rst')
200196
urllib.urlretrieve('https://raw.githubusercontent.com/tendermint/tools/master/tm-monitor/README.rst', filename='tools/monitoring.rst')
201197

docs/deploy-testnets.rst

+20-42
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ Deploy a Testnet
33

44
Now that we've seen how ABCI works, and even played with a few
55
applications on a single validator node, it's time to deploy a test
6-
network to four validator nodes. For this deployment, we'll use the
7-
``basecoin`` application.
6+
network to four validator nodes.
87

98
Manual Deployments
109
------------------
@@ -24,67 +23,46 @@ Here are the steps to setting up a testnet manually:
2423
``tendermint init``
2524
4) Compile a list of public keys for each validator into a
2625
``genesis.json`` file and replace the existing file with it.
27-
5) Run ``tendermint node --p2p.persistent_peers=< peer addresses >`` on each node,
26+
5) Run ``tendermint node --proxy_app=kvstore --p2p.persistent_peers=< peer addresses >`` on each node,
2827
where ``< peer addresses >`` is a comma separated list of the IP:PORT
2928
combination for each node. The default port for Tendermint is
3029
``46656``. Thus, if the IP addresses of your nodes were
3130
``192.168.0.1, 192.168.0.2, 192.168.0.3, 192.168.0.4``, the command
3231
would look like:
33-
``tendermint node --p2p.persistent_peers=96663a3dd0d7b9d17d4c8211b191af259621c693@192.168.0.1:46656, [email protected]:46656, [email protected]:46656, [email protected]:46656``.
32+
``tendermint node --proxy_app=kvstore --p2p.persistent_peers=96663a3dd0d7b9d17d4c8211b191af259621c693@192.168.0.1:46656, [email protected]:46656, [email protected]:46656, [email protected]:46656``.
3433

3534
After a few seconds, all the nodes should connect to each other and start
3635
making blocks! For more information, see the Tendermint Networks section
3736
of `the guide to using Tendermint <using-tendermint.html>`__.
3837

39-
Automated Deployments
40-
---------------------
41-
4238
While the manual deployment is easy enough, an automated deployment is
4339
usually quicker. The below examples show different tools that can be used
4440
for automated deployments.
4541

46-
Automated Deployment using Kubernetes
47-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48-
49-
The `mintnet-kubernetes tool <https://github.com/tendermint/tools/tree/master/mintnet-kubernetes>`__
50-
allows automating the deployment of a Tendermint network on an already
51-
provisioned Kubernetes cluster. For simple provisioning of a Kubernetes
52-
cluster, check out the `Google Cloud Platform <https://cloud.google.com/>`__.
53-
54-
Automated Deployment using Terraform and Ansible
55-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56-
57-
The `terraform-digitalocean tool <https://github.com/tendermint/tools/tree/master/terraform-digitalocean>`__
58-
allows creating a set of servers on the DigitalOcean cloud.
59-
60-
The `ansible playbooks <https://github.com/tendermint/tools/tree/master/ansible>`__
61-
allow creating and managing a ``basecoin`` or ``ethermint`` testnet on provisioned servers.
42+
Automated Deployments
43+
---------------------
6244

63-
Package Deployment on Linux for developers
64-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
45+
Local
46+
^^^^^
6547

66-
The ``tendermint`` and ``basecoin`` applications can be installed from RPM or DEB packages on
67-
Linux machines for development purposes. The packages are configured to be validators on the
68-
one-node network that the machine represents. The services are not started after installation,
69-
this way giving an opportunity to reconfigure the applications before starting.
48+
With ``docker`` installed, run the command:
7049

71-
The Ansible playbooks in the previous section use this repository to install ``basecoin``.
72-
After installation, additional steps are executed to make sure that the multi-node testnet has
73-
the right configuration before start.
50+
::
7451

75-
Install from the CentOS/RedHat repository:
52+
make localnet-start
7653

77-
::
54+
from the root of the tendermint repository. This will spin up a 4-node local testnet.
7855

79-
rpm --import https://tendermint-packages.interblock.io/centos/7/os/x86_64/RPM-GPG-KEY-Tendermint
80-
wget -O /etc/yum.repos.d/tendermint.repo https://tendermint-packages.interblock.io/centos/7/os/x86_64/tendermint.repo
81-
yum install basecoin
56+
Cloud Deployment using Kubernetes
57+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8258

83-
Install from the Debian/Ubuntu repository:
59+
The `mintnet-kubernetes tool <https://github.com/tendermint/tools/tree/master/mintnet-kubernetes>`__
60+
allows automating the deployment of a Tendermint network on an already
61+
provisioned Kubernetes cluster. For simple provisioning of a Kubernetes
62+
cluster, check out the `Google Cloud Platform <https://cloud.google.com/>`__.
8463

85-
::
64+
Cloud Deployment using Terraform and Ansible
65+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8666

87-
wget -O - https://tendermint-packages.interblock.io/centos/7/os/x86_64/RPM-GPG-KEY-Tendermint | apt-key add -
88-
wget -O /etc/apt/sources.list.d/tendermint.list https://tendermint-packages.interblock.io/debian/tendermint.list
89-
apt-get update && apt-get install basecoin
67+
See the `next section <./terraform-and-ansible.html>`__ for details.
9068

docs/examples/getting-started.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ documentation](http://tendermint.readthedocs.io/en/master/).
1010

1111
### Quick Install
1212

13-
On a fresh Ubuntu 16.04 machine can be done with [this script](https://git.io/vNLfY), like so:
13+
On a fresh Ubuntu 16.04 machine can be done with [this script](https://git.io/vpgEI), like so:
1414

1515
```
16-
curl -L https://git.io/vxWlX | bash
16+
curl -L https://git.io/vpgEI | bash
1717
source ~/.profile
1818
```
1919

@@ -24,7 +24,7 @@ The script is also used to facilitate cluster deployment below.
2424
### Manual Install
2525

2626
Requires:
27-
- `go` minimum version 1.9
27+
- `go` minimum version 1.10
2828
- `$GOPATH` environment variable must be set
2929
- `$GOPATH/bin` must be on your `$PATH` (see https://github.com/tendermint/tendermint/wiki/Setting-GOPATH)
3030

@@ -125,7 +125,7 @@ addresses below as IP1, IP2, IP3, IP4.
125125
Then, `ssh` into each machine, and execute [this script](https://git.io/vNLfY):
126126

127127
```
128-
curl -L https://git.io/vNLfY | bash
128+
curl -L https://git.io/vpgEI | bash
129129
source ~/.profile
130130
```
131131

@@ -134,10 +134,10 @@ This will install `go` and other dependencies, get the Tendermint source code, t
134134
Next, `cd` into `docs/examples`. Each command below should be run from each node, in sequence:
135135

136136
```
137-
tendermint node --home ./node1 --proxy_app=kvstore --p2p.persistent_peers="3a558bd6f8c97453aa6c2372bb800e8b6ed8e6db@IP1:46656,ccf30d873fddda10a495f42687c8f33472a6569f@IP2:46656,9a4c3de5d6788a76c6ee3cd9ff41e3b45b4cfd14@IP3:46656,58e6f2ab297b3ceae107ba4c8c2898da5c009ff4@IP4:46656"
138-
tendermint node --home ./node2 --proxy_app=kvstore --p2p.persistent_peers="3a558bd6f8c97453aa6c2372bb800e8b6ed8e6db@IP1:46656,ccf30d873fddda10a495f42687c8f33472a6569f@IP2:46656,9a4c3de5d6788a76c6ee3cd9ff41e3b45b4cfd14@IP3:46656,58e6f2ab297b3ceae107ba4c8c2898da5c009ff4@IP4:46656"
139-
tendermint node --home ./node3 --proxy_app=kvstore --p2p.persistent_peers="3a558bd6f8c97453aa6c2372bb800e8b6ed8e6db@IP1:46656,ccf30d873fddda10a495f42687c8f33472a6569f@IP2:46656,9a4c3de5d6788a76c6ee3cd9ff41e3b45b4cfd14@IP3:46656,58e6f2ab297b3ceae107ba4c8c2898da5c009ff4@IP4:46656"
140-
tendermint node --home ./node4 --proxy_app=kvstore --p2p.persistent_peers="3a558bd6f8c97453aa6c2372bb800e8b6ed8e6db@IP1:46656,ccf30d873fddda10a495f42687c8f33472a6569f@IP2:46656,9a4c3de5d6788a76c6ee3cd9ff41e3b45b4cfd14@IP3:46656,58e6f2ab297b3ceae107ba4c8c2898da5c009ff4@IP4:46656"
137+
tendermint node --home ./node0 --proxy_app=kvstore --p2p.persistent_peers="167b80242c300bf0ccfb3ced3dec60dc2a81776e@IP1:46656,3c7a5920811550c04bf7a0b2f1e02ab52317b5e6@IP2:46656,303a1a4312c30525c99ba66522dd81cca56a361a@IP3:46656,b686c2a7f4b1b46dca96af3a0f31a6a7beae0be4@IP4:46656"
138+
tendermint node --home ./node1 --proxy_app=kvstore --p2p.persistent_peers="167b80242c300bf0ccfb3ced3dec60dc2a81776e@IP1:46656,3c7a5920811550c04bf7a0b2f1e02ab52317b5e6@IP2:46656,303a1a4312c30525c99ba66522dd81cca56a361a@IP3:46656,b686c2a7f4b1b46dca96af3a0f31a6a7beae0be4@IP4:46656"
139+
tendermint node --home ./node2 --proxy_app=kvstore --p2p.persistent_peers="167b80242c300bf0ccfb3ced3dec60dc2a81776e@IP1:46656,3c7a5920811550c04bf7a0b2f1e02ab52317b5e6@IP2:46656,303a1a4312c30525c99ba66522dd81cca56a361a@IP3:46656,b686c2a7f4b1b46dca96af3a0f31a6a7beae0be4@IP4:46656"
140+
tendermint node --home ./node3 --proxy_app=kvstore --p2p.persistent_peers="167b80242c300bf0ccfb3ced3dec60dc2a81776e@IP1:46656,3c7a5920811550c04bf7a0b2f1e02ab52317b5e6@IP2:46656,303a1a4312c30525c99ba66522dd81cca56a361a@IP3:46656,b686c2a7f4b1b46dca96af3a0f31a6a7beae0be4@IP4:46656"
141141
```
142142

143143
Note that after the third node is started, blocks will start to stream in

docs/examples/init_testnet.sh

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/usr/bin/env bash
2+
3+
# make all the files
4+
tendermint init --home ./tester/node0
5+
tendermint init --home ./tester/node1
6+
tendermint init --home ./tester/node2
7+
tendermint init --home ./tester/node3
8+
9+
file0=./tester/node0/config/genesis.json
10+
file1=./tester/node1/config/genesis.json
11+
file2=./tester/node2/config/genesis.json
12+
file3=./tester/node3/config/genesis.json
13+
14+
genesis_time=`cat $file0 | jq '.genesis_time'`
15+
chain_id=`cat $file0 | jq '.chain_id'`
16+
17+
value0=`cat $file0 | jq '.validators[0].pub_key.value'`
18+
value1=`cat $file1 | jq '.validators[0].pub_key.value'`
19+
value2=`cat $file2 | jq '.validators[0].pub_key.value'`
20+
value3=`cat $file3 | jq '.validators[0].pub_key.value'`
21+
22+
rm $file0
23+
rm $file1
24+
rm $file2
25+
rm $file3
26+
27+
echo "{
28+
\"genesis_time\": $genesis_time,
29+
\"chain_id\": $chain_id,
30+
\"validators\": [
31+
{
32+
\"pub_key\": {
33+
\"type\": \"AC26791624DE60\",
34+
\"value\": $value0
35+
},
36+
\"power:\": 10,
37+
\"name\":, \"\"
38+
},
39+
{
40+
\"pub_key\": {
41+
\"type\": \"AC26791624DE60\",
42+
\"value\": $value1
43+
},
44+
\"power:\": 10,
45+
\"name\":, \"\"
46+
},
47+
{
48+
\"pub_key\": {
49+
\"type\": \"AC26791624DE60\",
50+
\"value\": $value2
51+
},
52+
\"power:\": 10,
53+
\"name\":, \"\"
54+
},
55+
{
56+
\"pub_key\": {
57+
\"type\": \"AC26791624DE60\",
58+
\"value\": $value3
59+
},
60+
\"power:\": 10,
61+
\"name\":, \"\"
62+
}
63+
],
64+
\"app_hash\": \"\"
65+
}" >> $file0
66+
67+
cp $file0 $file1
68+
cp $file0 $file2
69+
cp $file2 $file3

docs/examples/install_tendermint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ go get $REPO
2626
cd $GOPATH/src/$REPO
2727

2828
## build
29-
git checkout v0.18.0
29+
git checkout master
3030
make get_tools
3131
make get_vendor_deps
3232
make install

0 commit comments

Comments
 (0)