From 5a8b7325c1d41320bd9aec8919264a8383743b5d Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Thu, 28 Jan 2016 08:04:04 -0800 Subject: [PATCH] Update tracer readme and makefile. --- experimental/tracer/Makefile | 19 ++++++++++++++++++- experimental/tracer/README.md | 4 ++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/experimental/tracer/Makefile b/experimental/tracer/Makefile index e66b58668..d2ae291d4 100644 --- a/experimental/tracer/Makefile +++ b/experimental/tracer/Makefile @@ -1,11 +1,28 @@ +BUILD_IN_CONTAINER=true + tracer.tar: main/main main/Dockerfile docker build -t weaveworks/tracer main/ docker save weaveworks/tracer:latest >$@ main/main: main/*.go main/static.go ptrace/*.go - go get -tags netgo ./$(@D) + +ifeq ($(BUILD_IN_CONTAINER),true) + +main/main: + docker run -ti \ + -v $(shell pwd)/../../:/go/src/github.com/weaveworks/scope \ + -e GOARCH -e GOOS -e CIRCLECI -e CIRCLE_BUILD_NUM -e CIRCLE_NODE_TOTAL \ + -e CIRCLE_NODE_INDEX -e COVERDIR -e SLOW \ + weaveworks/scope-backend-build SCOPE_VERSION=$(SCOPE_VERSION) GO_BUILD_INSTALL_DEPS=$(GO_BUILD_INSTALL_DEPS) -C experimental/tracer $@ + +else + +main/main: + #go get -tags netgo ./$(@D) go build -ldflags "-extldflags \"-static\"" -tags netgo -o $@ ./$(@D) +endif + main/static.go: ui/* esc -o main/static.go -prefix ui ui diff --git a/experimental/tracer/README.md b/experimental/tracer/README.md index 23cc29f33..235870b6f 100644 --- a/experimental/tracer/README.md +++ b/experimental/tracer/README.md @@ -1,3 +1,7 @@ +Tracer is an prototype app for doing distributed request tracing without applications modifications. + +It its very early. Ask Tom for a demo. + Run tracer: - make - ./tracer.sh start