diff --git a/README.md b/README.md index c0b16ee..eeff769 100644 --- a/README.md +++ b/README.md @@ -1,59 +1,66 @@ -# Wownero +# docker-wownero -Container images for the official Wownero software code compiled or downloaded to provide daemon, wallet CLI, and wallet RPC binaries. +Simple way to run a Wownero node with some basic monitoring tools packaged in. -[Dockerfiles](./dockerfiles/) are available for building images of your choice; `wownerod_nocompile` can be used for fetching pre-built binaries, the `wownerod_compile_*` are used for fully building and compiling the C++ software. +Leverages [Prometheus](https://prometheus.io/docs/introduction/overview/), [Grafana](https://grafana.com/), [nodemapper](./dockerfiles/nodemapper.py), and [monero-exporter](https://github.com/cirocosta/monero-exporter) on top of `wownerod`. -## Node-in-a-box +## Setup -The simplest way to get started is to use `docker-compose` and turn up the provided services, including the Wownero daemon, monitoring tools, and a visualization/graphing tool. +The only requirements are [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/). Ensure those are installed on your system. There's an optional `Makefile` provided if you'd like to use that, just ensure `make` is installed. ``` -docker-compose up -d -# wownerod available at ports 34567 and 34568 -# prometheus available at port 9090 -# exporter (/metrics) available at port 9000 -# grafana available at port 3000 +# Clone and enter the repository +git clone https://git.cloud.lzahq.tech/nerodev/docker-wownero +cd docker-wownero + +# OPTIONAL: Setup Grafana password, blockchain storage location, or port and container image tag overrides +cp env-example .env +vim .env + +# Build containers +docker-compose build # make build ``` -You can host the node on an official DNS endpoint for public usage or keep it local for your own private usage. +The following ports will be bound for `wownerod` by default, but you can override in `.env`: +- 34567 # p2p +- 34568 # restricted rpc +- 34570 # unrestricted rpc -![](files/static/graf1.png) +The following ports are commented out but can be enabled to test things locally: +- 9090 # prometheus web ui +- 3000 # grafana web ui +- 9000 # exporter web api (/metrics) +- 5000 # nodemapper web api (/metrics) -![](files/static/graf2.png) +You will want to open/allow ports 34567 and 34568 in your firewall for usage as a remote/public node (or whichever p2p and restricted ports you picked). + +Also, you may want to setup a reverse proxy to Grafana if you would like to expose the visualizations for the world to see. Be sure to lock down the administrative settings or leave login disabled! -## Manual Daemon and Wallet Setup +## Usage -The node and wallet software is in the same package, so both can be used from within the Docker container. +It's fairly simple, use `docker-compose` to bring the containers up and down and look at logs. ``` -# build container image by fetching binaries -docker build -t wownero -f dockerfiles/wownerod_nocompile dockerfiles - -# or build container image by compiling from source (simple) -docker build -t wownero -f dockerfiles/wownerod_compile_simple dockerfiles - -# create network bridge so containers can communicate -docker network create --driver=bridge wownero - -# run wownero daemon with RPC bindings -docker run -d --rm --name wownero-daemon \ - --net=wownero \ - -v daemon:/data \ - -p 34568:34568 \ - wownero \ - wownerod \ - --data-dir=/data \ - --rpc-bind-ip=0.0.0.0 \ - --confirm-external-bind \ - --non-interactive - -# run wownero-wallet-cli -docker run --rm -it --name wownero-wallet \ - --net=wownero \ - -v wallet:/data \ - wownero \ - wownero-wallet-cli \ - --trusted-daemon \ - --daemon-address wownero-daemon:34568 +# Run containers +docker-compose up -d # make up + +# Check all logs +docker-compose logs -f + +# Check monerod logs +docker-compose logs -f monerod # make logs ``` + +Navigate to http://localhost:3000 and log into Grafana. Find the `Node Stats` dashboard to get those sweet, sweet graphs. + +If you've installed this on another system you will want to use [SSH tunnels](https://www.ssh.com/ssh/tunneling/example) (local forwarding) to reach Grafana (if not exposing via reverse proxy): + +``` +ssh -L 3000:localhost:3000 +``` + +Then navigate to http://localhost:3000. Here is what the graph looks like: + +![](files/static/graf1.png) + +![](files/static/graf2.png) diff --git a/files/static/graf1.png b/files/static/graf1.png index 37f26fd..ce5fc89 100644 Binary files a/files/static/graf1.png and b/files/static/graf1.png differ diff --git a/files/static/wownerod-grafana.png b/files/static/wownerod-grafana.png deleted file mode 100644 index 79b4b26..0000000 Binary files a/files/static/wownerod-grafana.png and /dev/null differ