From b9db87bb543e0dd023146686e6ff76af01446d10 Mon Sep 17 00:00:00 2001 From: Dmitry Date: Wed, 30 May 2018 09:09:01 +0300 Subject: [PATCH] Add readme with instructions --- .gitignore | 1 - Dockerfile | 14 ++++++++++++++ Gopkg.lock | 2 +- Gopkg.toml | 3 +-- Makefile | 9 +++++++++ README.md | 25 +++++++++++++++++++++++++ 6 files changed, 50 insertions(+), 4 deletions(-) delete mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 Makefile create mode 100644 README.md diff --git a/.gitignore b/.gitignore deleted file mode 100644 index a725465..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -vendor/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..866a900 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM golang:1.10-alpine as builder + +RUN apk add --no-cache gcc musl-dev linux-headers + +RUN mkdir -p /go/src/github.com/status-im/boothealth +ADD . /go/src/github.com/status-im/boothealth +RUN cd /go/src/github.com/status-im/boothealth && go build -o boothealth . + +FROM alpine:latest + +RUN apk add --no-cache ca-certificates bash + +COPY --from=builder /go/src/github.com/status-im/boothealth/boothealth /usr/local/bin/boothealth +ENTRYPOINT ["/usr/local/bin/boothealth"] \ No newline at end of file diff --git a/Gopkg.lock b/Gopkg.lock index 3dd0beb..84ba880 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -170,6 +170,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "517df5b32622f3e1771900b93af4035cb0aed63c293f62def8af02475d668afd" + inputs-digest = "8dd5e51f20dde29abceeed1675ff58829ee2758810b1fac4f7064dfcbd8dfa5d" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index ec14a9d..76831ba 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -27,7 +27,7 @@ [[constraint]] name = "github.com/ethereum/go-ethereum" - version = "1.8.9" + version = "1.8.5" [[constraint]] name = "github.com/prometheus/client_golang" @@ -35,4 +35,3 @@ [prune] go-tests = true - unused-packages = true diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3879a3b --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +ensure: + dep ensure + git apply patch/* --directory=vendor/github.com/ethereum/go-ethereum + +image: + docker build . -t statusteam/boothealth:latest + +push: + docker push statusteam/boothealth:latest diff --git a/README.md b/README.md new file mode 100644 index 0000000..e72d3e0 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +Bot for tracking health of the bootnodes +========================================= + +How to run? +------------- + +The only mandatory parameter is nursery nodes. For testing cluster we use: + +1. enode://1b843c7697f6fc42a1f606fb3cfaac54e025f06789dc20ad9278be3388967cf21e3a1b1e4be51faecd66c2c3adef12e942b4fcdeb8727657abe60636efb6224f@206.189.6.46:30404 +2. enode://b29100c8468e3e6604817174a15e4d71627458b0dcdbeea169ab2eb4ab2bbc6f24adbb175826726cec69db8fdba6c0dd60b3da598e530ede562180d300728659@206.189.6.48:30404 + + +Image can be built with: + +```bash +make image +``` + +Or downloaded from `statusteam/boothleath` repository. + +To execute health check run (also it can be run as a daemon): + +``` +docker run -ti statusteam/boothealth:latest -n enode://1b843c7697f6fc42a1f606fb3cfaac54e025f06789dc20ad9278be3388967cf21e3a1b1e4be51faecd66c2c3adef12e942b4fcdeb8727657abe60636efb6224f@206.189.6.46:30404 -n enode://b29100c8468e3e6604817174a15e4d71627458b0dcdbeea169ab2eb4ab2bbc6f24adbb175826726cec69db8fdba6c0dd60b3da598e530ede562180d300728659@206.189.6.48:30404 +``` \ No newline at end of file