diff --git a/docs/abci-cli.rst b/docs/abci-cli.rst index 371ec0cb..05d56b91 100644 --- a/docs/abci-cli.rst +++ b/docs/abci-cli.rst @@ -1,5 +1,5 @@ -Using the abci-cli -================== +Using ABCI +========== To facilitate testing and debugging of ABCI servers and simple apps, we built a CLI, the ``abci-cli``, for sending ABCI messages from the diff --git a/docs/mintnet-kubernetes.rst b/docs/mintnet-kubernetes.rst index b7e88665..fa4c6266 100644 --- a/docs/mintnet-kubernetes.rst +++ b/docs/mintnet-kubernetes.rst @@ -1,28 +1,24 @@ -Tendermint network powered by Kubernetes -======================================== +Using Kubernetes +================ .. figure:: assets/t_plus_k.png :alt: Tendermint plus Kubernetes Tendermint plus Kubernetes -- `QuickStart (MacOS) <#quickstart-macos>`__ -- `QuickStart (Linux) <#quickstart-linux>`__ -- `Usage <#usage>`__ -- `Security <#security>`__ -- `Fault tolerance <#fault-tolerance>`__ -- `Starting process <#starting-process>`__ - This should primarily be used for testing purposes or for tightly-defined chains operated by a single stakeholder (see `the security precautions <#security>`__). If your desire is to launch an application with many stakeholders, consider using our set of Ansible scripts. -QuickStart (MacOS) ------------------- +Quick Start +----------- -`Requirements `__ +For either platform, see the `requirements `__ + +MacOS +^^^^^ :: @@ -32,10 +28,8 @@ QuickStart (MacOS) git clone https://github.com/tendermint/tools.git && cd tools/mintnet-kubernetes/examples/basecoin && make create -QuickStart (Linux) ------------------- - -`Requirements `__ +Linux +^^^^^ :: @@ -45,23 +39,22 @@ QuickStart (Linux) git clone https://github.com/tendermint/tools.git && cd tools/mintnet-kubernetes/examples/basecoin && make create -Verify everything works -~~~~~~~~~~~~~~~~~~~~~~~ +Verify it worked +~~~~~~~~~~~~~~~~ **Using a shell:** -1. wait until all the pods are ``Running``. +First wait until all the pods are ``Running``: ``kubectl get pods -w -o wide -L tm`` -2. query the Tendermint app logs from the first pod. +then query the Tendermint app logs from the first pod: ``kubectl logs -c tm -f tm-0`` -3. use `Rest API `__ to fetch - the status of the second pod's Tendermint app. Note we are using - ``kubectl exec`` because pods are not exposed (and should not be) to - the outer network. +finally, use `Rest API `__ to fetch the status of the second pod's Tendermint app. +Note we are using ``kubectl exec`` because pods are not exposed (and should not be) to the +outer network: ``kubectl exec -c tm tm-0 -- curl -s http://tm-1.basecoin:46657/status | json_pp`` @@ -81,8 +74,8 @@ Clean up Usage ----- -(1/4) Setup a Kubernetes cluster -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Setup a Kubernetes cluster +^^^^^^^^^^^^^^^^^^^^^^^^^^ - locally using `Minikube `__ - on GCE with a single click in the web UI @@ -102,8 +95,8 @@ Ocean `__. **Make sure you have Kubernetes >= 1.5, because you will be using StatefulSets, which is a beta feature in 1.5.** -(2/4) Create a configuration file -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Create a configuration file +^^^^^^^^^^^^^^^^^^^^^^^^^^^ Download a template: @@ -123,17 +116,17 @@ update ``validators`` set in ConfigMap. You will be able to scale the cluster up or down later, but new pods (nodes) won't become validators automatically. -(3/4) Deploy your application -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Deploy your application +^^^^^^^^^^^^^^^^^^^^^^^ :: kubectl create -f ./app.yaml -(4/4) Observe your cluster -~~~~~~~~~~~~~~~~~~~~~~~~~~ +Observe your cluster +^^^^^^^^^^^^^^^^^^^^ -**web UI** <-> https://github.com/kubernetes/dashboard +`web UI `__ The easiest way to access Dashboard is to use kubectl. Run the following command in your desktop environment: @@ -246,8 +239,3 @@ containers, creating public-private key pair for each pod. Every ``tm`` container then asks other pods for their public keys, which are served with nginx (``pub-key`` container). When ``tm`` container have all the keys, it forms a genesis file and starts Tendermint process. - -TODO ----- - -- [ ] run tendermint from tmuser ``securityContext: fsGroup: 999`` diff --git a/docs/terraform-digitalocean.rst b/docs/terraform-digitalocean.rst index 399a0a76..95af507f 100644 --- a/docs/terraform-digitalocean.rst +++ b/docs/terraform-digitalocean.rst @@ -1,11 +1,13 @@ -Terraform for Digital Ocean -=========================== +Using Terraform +=============== This is a generic `Terraform `__ -configuration that sets up DigitalOcean droplets. +configuration that sets up DigitalOcean droplets. See the +`terraform-digitalocean `__ +for the required files. Prerequisites -============= +------------- - Install `HashiCorp Terraform `__ on a linux machine. @@ -27,9 +29,6 @@ Prerequisites DO_API_TOKEN="" curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $DO_API_TOKEN" "https://api.digitalocean.com/v2/account/keys" -How to run -========== - Initialization -------------- @@ -110,10 +109,3 @@ define the testnet name in the firewall rule. It is not necessary to add the nodes one-by-one. Also, the firewall rule "remembers" the testnet name tag so if you change the servers but keep the name, the firewall rules will still apply. - -What's next -=========== - -After setting up the nodes, head over to the `ansible -folder `__ to -set up tendermint and basecoin. diff --git a/docs/using-ansible.rst b/docs/using-ansible.rst index b10f8cb1..33e31c3b 100644 --- a/docs/using-ansible.rst +++ b/docs/using-ansible.rst @@ -1,17 +1,13 @@ -Ansible playbook for Tendermint applications -============================================ +Using Ansible +============= .. figure:: assets/a_plus_t.png :alt: Ansible plus Tendermint Ansible plus Tendermint -- `Prerequisites <#Prerequisites>`__ -- `Ansible setup <#Ansible%20setup>`__ -- `Running the playbook <#Running%20the%20playbook>`__ - -The playbooks in this folder run `ansible `__ -roles which: +The playbooks in `our ansible directory `__ +run ansible `roles `__ which: - install and configure basecoin or ethermint - start/stop basecoin or ethermint and reset their configuration @@ -25,19 +21,18 @@ Prerequisites Optional for DigitalOcean droplets: \* DigitalOcean API Token \* python dopy package -Head over to the `Terraform -folder `__ -for a description on how to get a DigitalOcean API Token. +For a description on how to get a DigitalOcean API Token, see the explanation +in the `using terraform tutorial `__. Optional for Amazon AWS instances: \* Amazon AWS API access key ID and secret access key. The cloud inventory scripts come from the ansible team at their `GitHub `__ page. You can get the -latest version from the contrib/inventory folder. +latest version from the ``contrib/inventory`` folder. -Ansible setup -------------- +Setup +----- Ansible requires a "command machine" or "local machine" or "orchestrator machine" to run on. This can be your laptop or any machine that can run @@ -61,8 +56,7 @@ CentOS/RedHat: sudo yum install epel-release sudo yum install ansible -Mac OSX: If you have (Homebrew)[https://brew.sh] installed, then it's -simply +Mac OSX: If you have `Homebrew `__ installed, then it's: :: @@ -143,7 +137,7 @@ Mac OSX: sudo pip install boto Refreshing the DigitalOcean inventory -------------------------------------- +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you just finished creating droplets, the local DigitalOcean inventory cache is not up-to-date. To refresh it, run: @@ -154,7 +148,7 @@ cache is not up-to-date. To refresh it, run: python -u inventory/digital_ocean.py --refresh-cache 1> /dev/null Refreshing the Amazon AWS inventory ------------------------------------ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ If you just finished creating Amazon AWS EC2 instances, the local AWS inventory cache is not up-to-date. To refresh it, run: diff --git a/docs/using-docker.rst b/docs/using-docker.rst index 85a30261..b135c007 100644 --- a/docs/using-docker.rst +++ b/docs/using-docker.rst @@ -1,18 +1,10 @@ -Docker container description for Tendermint applications -======================================================== +Using Docker +============ -- Overview (#Overview) -- Tendermint (#Tendermint) -- Basecoin (#Basecoin) -- Ethermint (#Ethermint) - -Overview --------- - -This folder contains Docker container descriptions. Using this folder +`This folder `__ contains Docker container descriptions. Using this folder you can build your own Docker images with the tendermint application. -It is assumed that you set up docker already. +It is assumed that you have already setup docker. If you don't want to build the images yourself, you should be able to download them from Docker Hub.