From f4192c1adb9728200191f14402d520a3ccbc40ad Mon Sep 17 00:00:00 2001 From: Tom Wilkie Date: Sun, 18 Oct 2015 11:06:47 +0000 Subject: [PATCH] Some extended basic documentation. --- README.md | 4 -- docs/scope.md | 141 +++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 139 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ee5a09b99..bd8eed0b1 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,6 @@ 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 **prerelease** state. Please take a look, but don't be surprised if you -hit bugs or missing pieces. - ## Getting started diff --git a/docs/scope.md b/docs/scope.md index d0782bebc..70a25990a 100644 --- a/docs/scope.md +++ b/docs/scope.md @@ -1,10 +1,147 @@ +# Weave Scope + +Weave Scope automatically generates a map of your containers, enabling you to +intuitively understand, monitor, and control your applications. + +Scope does not need any configuration and does not require the Weave Network. + +## Architecture + +Weave Scope consists of two components: the App and the Probe. These two +components are deployed as a single Docker container using the ```scope``` +script: + +``` +sudo scope launch +``` + +The Probe is responsible for gathering information about the host is it running +on. This information is sent to the app in the form of a report. The App is +responsible for processing reports from the probe into useable topologies, +serving the UI and pushing these topologies to the UI. + +``` ++-------------------------------+ +-------------------------------+ +| | | | +| Docker Host | | Your laptop | +| | | | +| +---------------------------+ | | +-----------------------+ | +| | | | | | | | +| | Weave Scope Container | | -------->| Your web browser | | +| | | | / | | | | +| | +-----------------------+ | | / | +-----------------------+ | +| | | | | | / | | +| | | Scope-app |<------- +-------------------------------+ +| | | | | | +| | +------------+----------+ | | +| | ^ | | +| | | | | +| | +------------+----------+ | | +| | | | | | +| | | Scope-probe | | | +| | | | | | +| | +-----------------------+ | | +| | | | +| +---------------------------+ | +| | ++-------------------------------+ +``` ## Multi host setup -Weave Scope uses WeaveDNS to automatically discover other instances of Scope running on your network. If you have a running WeaveDNS setup, you do not need any further steps. +When running Scope in a cluster, each Probe sends reports to each App. +The App merges the reports from each probe into a more complete report. -If you do not wish to use WeaveDNS, you can instruct Scope to cluster with other Scope instances on the command line. Hostnames and IP addresses are acceptable, both with and without ports: +``` ++-------------------------------+ +-------------------------------+ +| | | | +| Docker Host 1 | | Docker Host 2 | +| | | | +| +---------------------------+ | | +---------------------------+ | +| | | | | | | | +| | Weave Scope Container | | | | Weave Scope Container | | +| | | | | | | | +| | +-----------------------+ | | | | +-----------------------+ | | +| | | | | | | | | | | | +| | | Scope-app |<------ ------>| Scope-app | | | +| | | | | | \ / | | | | | | +| | +------------+----------+ | | \ / | | +------------+----------+ | | +| | ^ | | \/ | | ^ | | +| | | | | /\ | | | | | +| | +------------+----------+ | | / \ | | +------------+----------+ | | +| | | | | | / \ | | | | | | +| | | Scope-probe +------- -------+ Scope-probe | | | +| | | | | | | | | | | | +| | +-----------------------+ | | | | +-----------------------+ | | +| | | | | | | | +| +---------------------------+ | | +---------------------------+ | +| | | | ++-------------------------------+ +-------------------------------+ +``` + +If you run Scope on the same machine as the Weave Network, the Probe will use +WeaveDNS to automatically discover other Apps on your network. Therefore, if +you have a running WeaveDNS setup, you do not need to take any further steps. + +If you do not wish to use WeaveDNS, you can instruct Scope to cluster with +other Scope instances on the command line. Hostnames and IP addresses are +acceptable, both with and without ports: ``` # weave launch scope1:4030 192.168.0.12 192.168.0.11:4030 ``` + +## Using Scope Service + +Scope can also be used to feed reports to the Scope Service. The Scope +Service allows you centrally manage and share access to your Scope UI. In this +configuration, you only run the Probe locally - the Apps are hosted for you. + +To get an account on the Scope Service, sign up at scope.weave.works. You need +to run a Probe on every machine you want to monitor with Scope. To launch a +Probe and send reports to the service, run the following command: + +``` +sudo scope launch --service-token= +``` + +``` + ___ ,'""""'. + ,""" """"' `. + ,' `._ + ,' `"""'. + ,' `. + ,' : + ,' `. + ,""""' `"""". + ,' `. + ,' scope.weave.works `. + ,-""' `. + ,' `. + ; ,' ',' `. + ,' ; ,' `. + ,' ; ( , `. + ; ` `. ,' ,' + ; \ `. ,' ,' ,' + '. ' `. ,''. ,' `--' + `"-----"" _.-'' .-'`-.:..___...--' `-._ ,-"' `-' + /\ `""""" + || ++-----------------------------+ || +-----------------------------+ +| | || | | +| Docker Host | || | Docker Host | +| | || | | +| +-------------------------+ | || | +-------------------------+ | +| | | | || | | | | +| | Weave Scope Container | | || | | Weave Scope Container | | +| | | | || | | | | +| | +------------+--------+ | | / \ | | +------------+--------+ | | +| | | | | | / \ | | | | | | +| | | Scope-probe +--------- ---------+ Scope-probe | | | +| | | | | | | | | | | | +| | +---------------------+ | | | | +---------------------+ | | +| | | | | | | | +| +-------------------------+ | | +-------------------------+ | +| | | | ++-----------------------------+ +-----------------------------+ +````