From 39597f6e2eb9d17ce5fa34b079c6df0b91438ab3 Mon Sep 17 00:00:00 2001 From: Mikolaj Pawlikowski Date: Tue, 4 Dec 2018 16:53:17 -0500 Subject: [PATCH 1/4] add a quick start section Signed-off-by: Mikolaj Pawlikowski --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8df7e45..823a6f2 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Oh, and it gives you the graph below for your cluster. ## On the menu - [Rationale](#rationale) +- [Quick start](#quick-start) - [Building](#building) - [Installation](#installation) - [Authentication with Kubernetes API](#authentication-with-kubernetes-api) @@ -31,6 +32,16 @@ We built __Goldpinger__ to troubleshoot, visualise and alert on our networking l It's small, simple and you'll wonder why you hadn't had it before. +## Quick start + +```sh +go get github.com/bloomberg/goldpinger/cmd/goldpinger +goldpinger --help +``` + +Note, that in order to guarantee correct versions of dependencies, the project [uses `dep`](./Makefile) + + ## Building In order to build `Goldpinger`, you are going to need `go` version 1.10+, `dep`, and `docker`. @@ -39,11 +50,13 @@ Building from source code consists of compiling the binary and building a [Docke ```sh # step 0: check out the code into your $GOPATH +go get github.com/bloomberg/goldpinger/cmd/goldpinger +cd $GOPATH/src/github.com/bloomberg/goldpinger # step 1: download the dependencies via dep ensure make vendor -# step 2: compile the binary +# step 2: compile the binary for the desired architecture make bin/goldpinger # at this stage you should be able to run the binary ./bin/goldpinger --help From aad615915ed3a932c1ae278cd0cd7a83281ebafd Mon Sep 17 00:00:00 2001 From: Mikolaj Pawlikowski Date: Tue, 4 Dec 2018 16:57:54 -0500 Subject: [PATCH 2/4] Update README.md Signed-off-by: Mikolaj Pawlikowski --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 823a6f2..a8589a8 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ go get github.com/bloomberg/goldpinger/cmd/goldpinger goldpinger --help ``` -Note, that in order to guarantee correct versions of dependencies, the project [uses `dep`](./Makefile) +Note, that in order to guarantee correct versions of dependencies, the project [uses `dep`](./Makefile). ## Building From 1421d5fd74455613495bd8669465224b032bb8be Mon Sep 17 00:00:00 2001 From: Mikolaj Pawlikowski Date: Tue, 4 Dec 2018 17:01:39 -0500 Subject: [PATCH 3/4] Make bin/goldpinger the default Makefile target Signed-off-by: Mikolaj Pawlikowski --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 6dd5e02..3e324ed 100644 --- a/Makefile +++ b/Makefile @@ -6,6 +6,10 @@ tag = $(name):$(version) namespace ?= "" files = $(shell find . -iname "*.go") + +bin/$(bin): $(files) + PKG=${pkg} ARCH=amd64 VERSION=${version} BIN=${bin} ./build/build.sh + clean: rm -rf ./vendor rm -f ./bin/$(bin) @@ -18,9 +22,6 @@ swagger: swagger generate server -t pkg -f ./swagger.yml --exclude-main -A goldpinger && \ swagger generate client -t pkg -f ./swagger.yml -A goldpinger -bin/$(bin): $(files) - PKG=${pkg} ARCH=amd64 VERSION=${version} BIN=${bin} ./build/build.sh - build: bin/$(bin) sudo docker build -t $(tag) -f ./build/Dockerfile . From 5fec1edf2ea420964388819bba2196e679829dcd Mon Sep 17 00:00:00 2001 From: Mikolaj Pawlikowski Date: Tue, 4 Dec 2018 17:02:41 -0500 Subject: [PATCH 4/4] Create .travis.yml Signed-off-by: Mikolaj Pawlikowski --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8c7989b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,5 @@ +language: go + +go: + - "1.10.x" + - master