bigchaindb/k8s/tendermint/tendermint_container
Ahmed Muawia Khan 9be68c972d Problem: standardize docker-compose workflows (#2130)
- Standardize docker-compose workflow
- Change docker-compose version to 2.1
  - why one might ask? because compose version
    3.0 does not support depends on and inherits
    like we want to and is more aimed towards migration to using
    `docker stack`, for our current strategy `2.1` is a better choice.
- change `bdb` service `bigchaindb` service
  - why? Introduced a new proxy service `bdb` which is just a dummy
    `busybox` image.
    - why? because this ensure via healthcheck of bigchaindb that BigchainDB
      has started properly and makes a `curl` to ensure HTTP API server is up
      and running.
      - why? Because we have had scenarios where BigchainDB is not started
        via docker compose and user has to check out the logs to find out what
        the problem might be. This ensure that bigchaindb is up and running.
- Does this change deployment workflow? No.
  - The only thing change is that if you want to run commands inside a bigchaindb
    container e.g. `pytest` now you have to run the following command:
    `docker-compose run --rm --no-deps bigchaindb pytest -v --cov=bigchaindb`
     as opposed to `docker-compose run --rm --no-deps bdb pytest -v --cov=bigchaindb`
- Remove env variable `BIGCHAINDB_START_TENDERMINT`
- Remove TENDERMINT_INTEGRATION.rst and move to the new docs
- Change mdb -> mongodb because the other services were named with
  full name.
- Add example to run specific tests or from a file
- Update config.toml for tendermint to use `bigchaindb` as proxy app
  instead of `bdb`
- Remove `network` directory because it is deprecated
- Add comment about why PYTHONBUFFERED is used
2018-03-21 12:42:43 +01:00
..
2018-01-11 12:17:55 +01:00

Tendermint container used for BFT replication and consensus

Step 1: Build and Push the Latest Container

Use the docker_build_and_push.bash script to build the latest docker image and upload it to Docker Hub. Ensure that the image tag is updated to a new version number to properly reflect any changes made to the container.

Step 2: Run the container

docker run \
  --name=tendermint \
  --env TM_PUB_KEY_ACCESS_PORT=<port to access public keys hosted by nginx> \
  --env TM_SEEDS=<commad separated list of all nodes IP addresses/Hostnames> \
  --env TM_VALIDATOR_POWER=<voting power of node> \
  --env TM_VALIDATORS=<list of all validators> \
  --env TM_GENESIS_TIME=<genesis time> \
  --env TM_CHAIN_ID=<chain id> \
  --env TM_P2P_PORT=<Port used by all peers to communicate> \
  --env TMHOME=<Tendermint home directory containing all config files> \
  --env TM_PROXY_APP=<Hostname/IP address of app> \
  --publish=<rpc port on host>:<rpc port> \
  --publish=<p2p port on host>:<p2p port> \
  --volume <host dir for tendermint data>:/tendermint \
  --volume=<host dir for public key>:/tendermint_node_data \
  bigchaindb/tendermint:<version_number>