Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added note about docker and go dependency to the readme #966

Merged
merged 3 commits into from
Feb 19, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,6 @@ endif

static: prog/static.go

prog/static.go: client/build/app.js
esc -o $@ -prefix client/build client/build

ifeq ($(BUILD_IN_CONTAINER),true)
client/build/app.js: $(shell find client/app/scripts -type f) $(SCOPE_UI_BUILD_UPTODATE)
mkdir -p client/build
Expand All @@ -106,9 +103,21 @@ client-start: $(SCOPE_UI_BUILD_UPTODATE)
$(SUDO) docker run $(RM) $(RUN_FLAGS) --net=host -v $(shell pwd)/client/app:/home/weave/app \
-v $(shell pwd)/client/build:/home/weave/build \
$(SCOPE_UI_BUILD_IMAGE) npm start

prog/static.go: client/build/app.js $(SCOPE_BACKEND_BUILD_UPTODATE)
$(SUDO) docker run $(RM) $(RUN_FLAGS) --net=host \
-v $(shell pwd):/go/src/github.com/weaveworks/scope \
-v $(shell pwd)/.pkg:/go/pkg \
-w /go/src/github.com/weaveworks/scope \
--entrypoint=make \
$(SCOPE_BACKEND_BUILD_IMAGE) BUILD_IN_CONTAINER=false prog/static.go

else
client/build/app.js:
cd client && npm run build

prog/static.go: client/build/app.js
esc -o $@ -prefix client/build client/build
endif

$(SCOPE_UI_BUILD_UPTODATE): client/Dockerfile client/package.json client/webpack.local.config.js client/webpack.production.config.js client/server.js client/.eslintrc
Expand All @@ -129,5 +138,4 @@ deps:
$(GO) get -u -f -tags netgo \
github.com/FiloSottile/gvt \
github.com/mattn/goveralls \
github.com/mjibson/esc \
github.com/weaveworks/github-release
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,14 +217,16 @@ kubectl create -f scope-probe-ds.yaml

## <a name="developing"></a>Developing

The build is in two stages. `make deps` installs some tools we use later in
the build. `make` builds the UI build container, builds the UI in said
container, builds the backend build container, builds the app and probe in a
said container, and finally pushes the lot into a Docker image called
**weaveworks/scope**.
Building Scope from source depends on the latest version of

This comment was marked as abuse.

This comment was marked as abuse.

[docker](https://www.docker.com/), so please install that before
proceeding.

The main build is `make`, which builds the UI build container, builds
the UI in said container, builds the backend build container, builds
the app and probe in a said container, and finally pushes the lot into
a Docker image called **weaveworks/scope**.

```
make deps
make
```

Expand All @@ -234,6 +236,15 @@ Then, run the local build via
./scope launch
```

If needed, install tools used for managing dependencies, managing releases, and doing coverage analysis via

```
make deps
```

Note that the tools from `make deps` will depend on a local install of
[go](https://golang.org).

## <a name="developing"></a>Debugging

Scope has a collection of built in debugging tools to aid Scope delevopers.
Expand Down
5 changes: 3 additions & 2 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ ENV GO15VENDOREXPERIMENT 1
RUN apt-get update && apt-get install -y libpcap-dev python-requests time
RUN go clean -i net && go install -tags netgo std && go install -race -tags netgo std
RUN go get -tags netgo \
github.com/golang/lint/golint \
github.com/fzipp/gocyclo \
github.com/kisielk/errcheck
github.com/golang/lint/golint \
github.com/kisielk/errcheck \
github.com/mjibson/esc
COPY build.sh /
ENTRYPOINT ["/build.sh"]