mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 10:11:03 +00:00
Merge pull request #73 from weaveworks/update-build-instructions
Update Makefile and README
This commit is contained in:
40
Makefile
40
Makefile
@@ -1,4 +1,4 @@
|
||||
.PHONY: all static test clean
|
||||
.PHONY: all static clean
|
||||
|
||||
# If you can use Docker without being root, you can `make SUDO= <target>`
|
||||
SUDO=sudo
|
||||
@@ -14,6 +14,22 @@ SCOPE_UI_BUILD_IMAGE=weave/scope-ui-build
|
||||
|
||||
all: $(SCOPE_EXPORT)
|
||||
|
||||
$(SCOPE_EXPORT): $(APP_EXE) $(PROBE_EXE) docker/*
|
||||
cp $(APP_EXE) $(PROBE_EXE) docker/
|
||||
$(SUDO) docker build -t $(SCOPE_IMAGE) docker/
|
||||
$(SUDO) docker save $(SCOPE_IMAGE):latest > $@
|
||||
|
||||
$(APP_EXE): app/*.go report/*.go xfer/*.go
|
||||
|
||||
$(PROBE_EXE): probe/*.go report/*.go xfer/*.go
|
||||
|
||||
$(APP_EXE) $(PROBE_EXE):
|
||||
go get -tags netgo ./$(@D)
|
||||
go build -o $@ ./$(@D)
|
||||
|
||||
static: client/dist/scripts/bundle.js
|
||||
esc -o app/static.go -prefix client/dist client/dist
|
||||
|
||||
$(SCOPE_UI_BUILD_EXPORT): client/Dockerfile client/gulpfile.js client/package.json
|
||||
docker build -t $(SCOPE_UI_BUILD_IMAGE) client
|
||||
docker save $(SCOPE_UI_BUILD_IMAGE):latest > $@
|
||||
@@ -24,28 +40,6 @@ client/dist/scripts/bundle.js: client/app/scripts/*
|
||||
-v $(shell pwd)/client/dist:/home/weave/dist \
|
||||
$(SCOPE_UI_BUILD_IMAGE)
|
||||
|
||||
static: client/dist/scripts/bundle.js
|
||||
esc -o app/static.go -prefix client/dist client/dist
|
||||
|
||||
test: $(APP_EXE) $(FIXPROBE_EXE)
|
||||
# app and fixprobe needed for integration tests
|
||||
go test ./...
|
||||
|
||||
$(APP_EXE): app/*.go report/*.go xfer/*.go
|
||||
$(PROBE_EXE): probe/*.go report/*.go xfer/*.go
|
||||
|
||||
$(APP_EXE) $(PROBE_EXE):
|
||||
go get -tags netgo ./$(@D)
|
||||
go build -o $@ ./$(@D)
|
||||
|
||||
$(FIXPROBE_EXE):
|
||||
cd experimental/fixprobe && go build
|
||||
|
||||
$(SCOPE_EXPORT): $(APP_EXE) $(PROBE_EXE) docker/*
|
||||
cp $(APP_EXE) $(PROBE_EXE) docker/
|
||||
$(SUDO) docker build -t $(SCOPE_IMAGE) docker/
|
||||
$(SUDO) docker save $(SCOPE_IMAGE):latest > $@
|
||||
|
||||
clean:
|
||||
go clean ./...
|
||||
rm -rf $(SCOPE_EXPORT) $(SCOPE_UI_BUILD_EXPORT) client/dist
|
||||
|
||||
67
README.md
67
README.md
@@ -1,70 +1,55 @@
|
||||
# Scope
|
||||
|
||||
[](https://circleci.com/gh/weaveworks/scope/tree/master) [](https://coveralls.io/r/weaveworks/scope)
|
||||
[](https://circleci.com/gh/weaveworks/scope/tree/master) [](https://coveralls.io/r/weaveworks/scope) [](https://sourcegraph.com/github.com/weaveworks/scope)
|
||||
|
||||

|
||||
|
||||
|
||||
## Overview
|
||||
|
||||
Weave Scope automatically generates a map of your containers, enabling you to
|
||||
intuitively understand, monitor, and control your applications.
|
||||
|
||||
Please note that the code, and especially the building and running story, is in
|
||||
a **pre-alpha** state. Please take a look, but don't be surprised if you hit
|
||||
bugs or missing pieces.
|
||||
Please note that the code, and especially the building and running story, is
|
||||
in a **prerelease** state. Please take a look, but don't be surprised if you
|
||||
hit bugs or missing pieces.
|
||||
|
||||
## Building
|
||||
|
||||
### In-place
|
||||
|
||||
To build the binaries in-place,
|
||||
## Getting started
|
||||
|
||||
```
|
||||
make build
|
||||
sudo wget -O /usr/local/bin/scope \
|
||||
https://github.com/weaveworks/scope/releases/download/latest_release/scope
|
||||
sudo chmod a+x /usr/local/bin/scope
|
||||
sudo scope launch
|
||||
```
|
||||
|
||||
Note that this doesn't build or include the latest version of the user
|
||||
interface. The UI is decoupled, living in `client` and following a node/gulp
|
||||
workflow. To build that and include it in the application binary,
|
||||
This script will download and run a recent Scope image from the Docker Hub.
|
||||
Now, open your web browser to **http://localhost:4040**. (If you're using
|
||||
boot2docker, replace localhost with the output of `boot2docker ip`.)
|
||||
|
||||
|
||||
## Build
|
||||
|
||||
```
|
||||
make client
|
||||
make static
|
||||
make build
|
||||
make
|
||||
```
|
||||
|
||||
Or, as a shortcut,
|
||||
This will produce a Docker container called **weaveworks/scope**.
|
||||
|
||||
```
|
||||
make dist
|
||||
```
|
||||
|
||||
### Docker container
|
||||
|
||||
To build a Docker container,
|
||||
|
||||
```
|
||||
make docker
|
||||
```
|
||||
|
||||
### The UI
|
||||
|
||||
This repository contains a copy of the compiled UI. To build a fresh UI, run:
|
||||
Note that the repository contains a copy of the compiled UI. To build a fresh
|
||||
UI from the source in the client subdirectory, and re-build the Docker
|
||||
container,
|
||||
|
||||
```
|
||||
make scope_ui_build.tar
|
||||
make static
|
||||
make
|
||||
```
|
||||
|
||||
## Running
|
||||
|
||||
### Manually
|
||||
|
||||
1. Launch a probe process on each physical host you intend to monitor, via `sudo probe`
|
||||
2. Launch an app process, and configure it to talk to probes, via `app -probes="probe-host-1:4030,probe-host-2:4030"`.
|
||||
3. Load the user interface, via **http://app-host:4040**
|
||||
|
||||
### As a Docker container
|
||||
|
||||
TODO
|
||||
## Run
|
||||
|
||||
```
|
||||
./scope launch
|
||||
```
|
||||
|
||||
4607
app/static.go
4607
app/static.go
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user