Explore Applications Running on Docker
To explore your app in Weave Cloud, run the following on all of your hosts:
sudo curl -L git.io/scope -o /usr/local/bin/scope
sudo chmod a+x /usr/local/bin/scope
scope launch --service-token=[service-token]
Where,
- [service-token] is the token you obtained from the right-hand corner on the setup page in Weave Cloud.
Docker Compose
To start exploring your app in Docker decide on the Compose format version to use:
Docker Compose Format Version 1:
probe:
image: weaveworks/scope:1.3.0
net: "host"
pid: "host"
privileged: true
labels:
- "works.weave.role=system"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:rw"
command:
- "--probe.docker=true"
- "--service-token=${SCOPE_SERVICE_TOKEN}"
Docker Compose Format Version 2:
version: '2'
services:
probe:
image: weaveworks/scope:1.3.0
network_mode: "host"
pid: "host"
privileged: true
labels:
- "works.weave.role=system"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:rw"
command:
- "--probe.docker=true"
- "--service-token=${SCOPE_SERVICE_TOKEN}"
Version 2 of this YAML file supports a network mode that may be required with any Docker plugins that you are using. See Compose File Reference for more information.
And once you’ve set up a compose file, you can launch Scope (the Explore Agent) onto your local machine:
SCOPE_SERVICE_TOKEN=<token> docker-compose up -d
Where,
SCOPE_SERVICE_TOKEN=<token>
is the Service token that appears on the right-hand corner after you signed up for Weave Cloud.
Note: Scope must be launched onto every node that you want to monitor.
Go to https://cloud.weave.works and click Explore from your instance.