From 13b3d6b46447b44ba8b48be497672911a79f77ed Mon Sep 17 00:00:00 2001 From: Sylvain Bellemare Date: Thu, 16 Nov 2017 00:03:56 +0100 Subject: [PATCH] Add some docs --- TENDERMINT_INTEGRATION.rst | 55 ++++++++++++++++++++++++++++++++++++++ network/health-check.sh | 27 +++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 TENDERMINT_INTEGRATION.rst create mode 100644 network/health-check.sh diff --git a/TENDERMINT_INTEGRATION.rst b/TENDERMINT_INTEGRATION.rst new file mode 100644 index 00000000..79383fa2 --- /dev/null +++ b/TENDERMINT_INTEGRATION.rst @@ -0,0 +1,55 @@ +********************** +Tendermint Integration +********************** +Quick reference for developers working on the Tendermint integration in +BigchainDB. + +Running a single node with ``docker-compose`` +============================================= + +.. code-block:: bash + + $ docker-compose -f docker-compose.tendermint.yml up bdb + +The above command will launch all 3 main required services/processes: + +* ``mongodb`` +* ``tendermint`` +* ``bigchaindb`` + +To follow the logs of the ``tendermint`` service: + +.. code-block:: bash + + $ docker-compose -f docker-compose.tendermint.yml logs -f tendermint + +Simple health check: + +.. code-block:: bash + + $ docker-compose -f docker-compose.tendermint.yml up curl-client + +Post and retrieve a transaction -- copy/paste a driver basic example of a +``CREATE`` transaction: + +.. code-block:: bash + + $ docker-compose -f docker-compose.tendermint.yml run --rm driver ipython + +.. todo:: small python script to post and retrieve a transaction. + + +Running a 4-node cluster with ``docker-compose`` +================================================ + + +.. code-block:: bash + + $ docker-compose -f docker-compose.network.yml up -d bdb-one bdb-two bdb-three bdb-four + + +Simple health check: + +.. code-block:: bash + + $ docker-compose -f docker-compose.network.yml up curl-client diff --git a/network/health-check.sh b/network/health-check.sh new file mode 100644 index 00000000..e3e2d78c --- /dev/null +++ b/network/health-check.sh @@ -0,0 +1,27 @@ +echo "########################################################################" +echo "# #" +echo "# NODE ONE #" +echo "# #" +echo "########################################################################" +curl http://tendermint-one:46657/abci_query && curl http://bdb-one:9984/ + +echo "########################################################################" +echo "# #" +echo "# NODE TWO #" +echo "# #" +echo "########################################################################" +curl http://tendermint-two:46657/abci_query && curl http://bdb-two:9984/ + +echo "########################################################################" +echo "# #" +echo "# NODE THREE #" +echo "# #" +echo "########################################################################" +curl http://tendermint-three:46657/abci_query && curl http://bdb-three:9984/ + +echo "########################################################################" +echo "# #" +echo "# NODE FOUR #" +echo "# #" +echo "########################################################################" +curl http://tendermint-four:46657/abci_query && curl http://bdb-four:9984/