From 95e3e7afcd6c4b7a9a4473d0e99439996a20c1ec Mon Sep 17 00:00:00 2001 From: Zach Date: Wed, 6 Jun 2018 08:53:58 -0400 Subject: [PATCH] remove deprecated docker directory & docs: rst2md (#102) --- README.md | 3 +- docker/README.rst | 71 --------------------- docker/ethermint/Dockerfile | 15 ----- docker/tendermint-automated/Dockerfile | 21 ------- docker/tendermint-automated/README.rst | 1 - docker/tendermint/Dockerfile | 14 ----- tm-bench/README.md | 49 +++++++++++++++ tm-bench/README.rst | 87 -------------------------- tm-monitor/{README.rst => README.md} | 66 ++++++++----------- 9 files changed, 76 insertions(+), 251 deletions(-) delete mode 100644 docker/README.rst delete mode 100644 docker/ethermint/Dockerfile delete mode 100644 docker/tendermint-automated/Dockerfile delete mode 100644 docker/tendermint-automated/README.rst delete mode 100644 docker/tendermint/Dockerfile create mode 100644 tm-bench/README.md delete mode 100644 tm-bench/README.rst rename tm-monitor/{README.rst => README.md} (72%) diff --git a/README.md b/README.md index 70c7f5c34..aeb411410 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # tools -Tools for working with tendermint and associated technologies. See the documentation at: http://tendermint.readthedocs.io/en/master/index.html#tendermint-tools + +Tools for working with tendermint and associated technologies. Documentation can be found in the `README.md` of each the `tm-bench/` and `tm-monitor/` directories. diff --git a/docker/README.rst b/docker/README.rst deleted file mode 100644 index 951fa4b76..000000000 --- a/docker/README.rst +++ /dev/null @@ -1,71 +0,0 @@ -Using Docker -============ - -It is assumed that you have already `setup docker `__. - -Tendermint ----------- - -The application configuration and data will be stored at ``/tendermint`` in the -container. This directory will also be exposed as a volume. The ports 46656 and -46657 will be open for ABCI applications to connect. - -Initialize tendermint: - -:: - - mkdir /tmdata - docker run --rm -v /tmdata:/tendermint tendermint/tendermint init - -Change ``/tmdata`` folder to any destination where you want to store Tendermint -configuration and data. - -Tendermint docker image is stored on `docker hub `__. - -Get the public key of tendermint: - -:: - - docker run --rm -v /tmdata:/tendermint tendermint/tendermint show_validator - -Run the docker tendermint application with: - -:: - - docker run --rm -d -v /tmdata:/tendermint tendermint/tendermint node - -Building images by yourself: - -`This folder `__ -contains Docker container descriptions. Using this folder you can build your -own Docker images with the tendermint application. - -Ethermint ---------- - -The application configuration will be stored at ``/ethermint``. - -Initialize ethermint: - -:: - - mkdir /ethermintdata - wget -O /ethermintdata/genesis.json https://github.com/tendermint/ethermint/raw/master/setup/genesis.json - docker run --rm -v /ethermintdata:/ethermint tendermint/ethermint ethermint --datadir /ethermint init /ethermint/genesis.json - -Start ethermint as a validator node: This is a two-step process: \* Run the -tendermint container and expose the ports that allow clients to connect. \* Run -the ethermint container. You will have to define where tendermint runs as the -ethermint binary connects to it explicitly. The --proxy\_app should contain the -ethermint application's IP address and port. - -:: - - docker run --rm -d -v /tmdata:/tendermint tendermint/tendermint node --proxy_app=tcp://172.17.0.3:46658 - docker run --rm -d -v /ethermintdata:/ethermint tendermint/ethermint ethermint --tendermint_addr tcp://172.17.0.2:46657 - -Building images by yourself: - -`This folder `__ -contains Docker container descriptions. Using this folder you can build your -own Docker images with the ethermint application. diff --git a/docker/ethermint/Dockerfile b/docker/ethermint/Dockerfile deleted file mode 100644 index 3f5a9ab94..000000000 --- a/docker/ethermint/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM busybox -#Use --build-arg to change where the ethermint binary and setup directory resides -ARG ETHERMINT_BINARY=ethermint -ARG SETUP_DIR=setup -ENV EMHOME /ethermint -COPY $ETHERMINT_BINARY /usr/bin/ethermint -COPY $SETUP_DIR /setup -RUN adduser -h $EMHOME -D ethermint -VOLUME [ $EMHOME ] -EXPOSE 46658 -USER ethermint -ENTRYPOINT ["/usr/bin/ethermint","--datadir","$EMHOME"] -WORKDIR $EMHOME -STOPSIGNAL SIGTERM - diff --git a/docker/tendermint-automated/Dockerfile b/docker/tendermint-automated/Dockerfile deleted file mode 100644 index 73497c5a0..000000000 --- a/docker/tendermint-automated/Dockerfile +++ /dev/null @@ -1,21 +0,0 @@ -FROM ubuntu:16.04 -MAINTAINER Greg Szabo - -#Default home for tendermint. The node command will look for $TMHOME/config/genesis.json at initialization. -ENV TMHOME /tendermint -RUN apt-get -y update && \ - apt-get -y upgrade && \ - apt-get -y install curl jq && \ - adduser --system --home "$TMHOME" --group tmuser - -USER tmuser -VOLUME [ $TMHOME ] -WORKDIR $TMHOME -EXPOSE 46656 46657 -ENTRYPOINT ["/usr/bin/tendermint"] -CMD ["node", "--moniker=`hostname`"] -STOPSIGNAL SIGTERM - -ARG BINARY=tendermint -COPY $BINARY /usr/bin/tendermint - diff --git a/docker/tendermint-automated/README.rst b/docker/tendermint-automated/README.rst deleted file mode 100644 index f5582ce80..000000000 --- a/docker/tendermint-automated/README.rst +++ /dev/null @@ -1 +0,0 @@ -This is a temporary folder to contain the Dockerfile used for automated builds, until it is merged with the tendermint repository. diff --git a/docker/tendermint/Dockerfile b/docker/tendermint/Dockerfile deleted file mode 100644 index 3344c1fd0..000000000 --- a/docker/tendermint/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM busybox -#Use --build-arg to change where the tendermint binary resides -ARG TENDERMINT_BINARY=tendermint -ENV TMHOME /tendermint -COPY $TENDERMINT_BINARY /usr/bin/tendermint -RUN adduser -h $TMHOME -D tendermint -VOLUME [ $TMHOME ] -EXPOSE 46656 46657 -USER tendermint -ENTRYPOINT ["/usr/bin/tendermint"] -CMD ["node"] -WORKDIR $TMHOME -STOPSIGNAL SIGTERM - diff --git a/tm-bench/README.md b/tm-bench/README.md new file mode 100644 index 000000000..1d84b31c1 --- /dev/null +++ b/tm-bench/README.md @@ -0,0 +1,49 @@ +# tm-bench + +Tendermint blockchain benchmarking tool: + +- https://github.com/tendermint/tools/tree/master/tm-bench + +For example, the following: + + tm-bench -T 10 -r 1000 localhost:46657 + +will output: + + Stats Avg Stdev Max + Block latency 6.18ms 3.19ms 14ms + Blocks/sec 0.828 0.378 1 + Txs/sec 963 493 1811 + +## Quick Start + +[Install Tendermint](https://github.com/tendermint/tendermint#install) + +then run: + + tendermint init + tendermint node --proxy_app=kvstore + + tm-bench localhost:46657 + +with the last command being in a seperate window. + +## Usage + + tm-bench [-c 1] [-T 10] [-r 1000] [endpoints] + + Examples: + tm-bench localhost:46657 + Flags: + -T int + Exit after the specified amount of time in seconds (default 10) + -c int + Connections to keep open per endpoint (default 1) + -r int + Txs per second to send in a connection (default 1000) + -v Verbose output + +## Development + + make get_vendor_deps + make test diff --git a/tm-bench/README.rst b/tm-bench/README.rst deleted file mode 100644 index b64dbbd36..000000000 --- a/tm-bench/README.rst +++ /dev/null @@ -1,87 +0,0 @@ -Benchmarking -============ - -tm-bench --------- - -Tendermint blockchain benchmarking tool: https://github.com/tendermint/tools/tree/master/tm-bench - -For example, the following: - -:: - - tm-bench -T 10 -r 1000 localhost:46657 - -will output: - -:: - - Stats Avg Stdev Max - Block latency 6.18ms 3.19ms 14ms - Blocks/sec 0.828 0.378 1 - Txs/sec 963 493 1811 - -Quick Start -^^^^^^^^^^^ - -Docker -~~~~~~ - -:: - - docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint:0.12.1 init - docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm tendermint/tendermint:0.12.1 - - docker run -it --rm --link=tm tendermint/bench tm:46657 - -Binaries -~~~~~~~~ - -If **Linux**, start with: - -:: - - curl -L https://s3-us-west-2.amazonaws.com/tendermint/0.12.1/tendermint_linux_amd64.zip && sudo unzip -d /usr/local/bin tendermint_linux_amd64.zip && sudo chmod +x tendermint - -if **Mac OS**, start with: - -:: - - curl -L https://s3-us-west-2.amazonaws.com/tendermint/0.12.1/tendermint_darwin_amd64.zip && sudo unzip -d /usr/local/bin tendermint_darwin_amd64.zip && sudo chmod +x tendermint - -then run: - -:: - - tendermint init - tendermint node --proxy_app=dummy - - tm-bench localhost:46657 - -with the last command being in a seperate window. - -Usage -^^^^^ - -:: - - tm-bench [-c 1] [-T 10] [-r 1000] [endpoints] - - Examples: - tm-bench localhost:46657 - Flags: - -T int - Exit after the specified amount of time in seconds (default 10) - -c int - Connections to keep open per endpoint (default 1) - -r int - Txs per second to send in a connection (default 1000) - -v Verbose output - -Development -^^^^^^^^^^^ - -:: - - make get_vendor_deps - make test diff --git a/tm-monitor/README.rst b/tm-monitor/README.md similarity index 72% rename from tm-monitor/README.rst rename to tm-monitor/README.md index 9750fe79a..02c4c9c4c 100644 --- a/tm-monitor/README.rst +++ b/tm-monitor/README.md @@ -1,55 +1,44 @@ -Monitoring -========== +# tm-monitor -tm-monitor ----------- +Tendermint blockchain monitoring tool; watches over one or more nodes, +collecting and providing various statistics to the user: -Tendermint blockchain monitoring tool; watches over one or more nodes, collecting and providing various statistics to the user: https://github.com/tendermint/tools/tree/master/tm-monitor +- https://github.com/tendermint/tools/tree/master/tm-monitor -Quick Start -^^^^^^^^^^^ +## Quick Start -Docker -~~~~~~ +### Docker -Assuming your application is running in another container with the name ``app``: - -:: +Assuming your application is running in another container with the name +`app`: docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm --link=app tendermint/tendermint node --proxy_app=tcp://app:46658 docker run -it --rm -p "46670:46670" --link=tm tendermint/monitor tm:46657 -If you don't have an application yet, but still want to try monitor out, use ``kvstore``: - -:: +If you don't have an application yet, but still want to try monitor out, +use `kvstore`: docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm tendermint/tendermint node --proxy_app=kvstore docker run -it --rm -p "46670:46670" --link=tm tendermint/monitor tm:46657 -Binaries -~~~~~~~~ +### Using Binaries -:: +[Install Tendermint](https://github.com/tendermint/tendermint#install) - tm-monitor localhost:46657 +then run: -Build from source -~~~~~~~~~~~~~~~~~ + tendermint init + tendermint node --proxy_app=kvstore -:: - - make get_tools - make get_vendor_deps - make install + tm-monitor localhost:46657 -Usage -^^^^^ +with the last command being in a seperate window. -:: +## Usage tm-monitor [-v] [-no-ton] [-listen-addr="tcp://0.0.0.0:46670"] [endpoints] @@ -66,13 +55,10 @@ Usage Do not show ton (table of nodes) -v verbose logging -RPC UI -^^^^^^ +### RPC UI -Run ``tm-monitor`` and visit http://localhost:46670 -You should see the list of the available RPC endpoints: - -:: +Run `tm-monitor` and visit http://localhost:46670 You should see the +list of the available RPC endpoints: http://localhost:46670/status http://localhost:46670/status/network @@ -80,13 +66,11 @@ You should see the list of the available RPC endpoints: http://localhost:46670/status/node?name=_ http://localhost:46670/unmonitor?endpoint=_ -The API is available as GET requests with URI encoded parameters, or as JSONRPC -POST requests. The JSONRPC methods are also exposed over websocket. - -Development -^^^^^^^^^^^ +The API is available as GET requests with URI encoded parameters, or as +JSONRPC POST requests. The JSONRPC methods are also exposed over +websocket. -:: +## Development make get_tools make get_vendor_deps