From cab38c8515800d4a6fab7203d13184314f4d1238 Mon Sep 17 00:00:00 2001 From: Viktor Sadovnikov Date: Mon, 16 May 2016 18:58:19 +0200 Subject: [PATCH] weaveworks/scope#1507. Adding Marathon JSON for launching on minimesos cluster --- examples/mesos/README.md | 14 ++++++++++ examples/mesos/minimesos.json | 51 +++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 examples/mesos/README.md create mode 100644 examples/mesos/minimesos.json diff --git a/examples/mesos/README.md b/examples/mesos/README.md new file mode 100644 index 000000000..63e74f275 --- /dev/null +++ b/examples/mesos/README.md @@ -0,0 +1,14 @@ +# Launching Weave Scope on Apache Mesos Cluster + +## Launching on minimesos Cluster + +`minimesos` project enables running Apache Mesos cluster on a single machine for prototyping and unit testing of Mesos +frameworks. All running components of `minimesos` cluster are represented by docker containers. To enable reuse of local +docker images, docker in Mesos Agent containers reuses `docker.sock` file of the host. Therefore all started in Agents +containers are also seen on the host. This setup gives single Weave Scope container access to all containers running in +`minimesos` cluster. + +Launching of Weave Scope by providing content `minimesos.json` file to Marathon is a part of default `minimesos` cluster. If +removed from configuration, Weave Scope can be added to the running cluster by `minimesos install --marathonFile ` + +UI of Weave Scope can be accessed on http://172.17.0.1:4040/ diff --git a/examples/mesos/minimesos.json b/examples/mesos/minimesos.json new file mode 100644 index 000000000..3135f1846 --- /dev/null +++ b/examples/mesos/minimesos.json @@ -0,0 +1,51 @@ +{ + "id": "weave-scope", + "cpus": 1, + "mem": 128, + "instances": 1, + "constraints": [ + [ + "hostname", + "UNIQUE" + ] + ], + "container": { + "type": "DOCKER", + "docker": { + "image": "weaveworks/scope:0.15.0", + "network": "HOST", + "privileged": true, + "parameters": [ + { + "key": "pid", + "value": "host" + }, + { + "key": "name", + "value": "weavescope" + } + ] + }, + "volumes": [ + { + "containerPath": "/var/run/docker.sock", + "hostPath": "/var/run/docker.sock", + "mode": "RW" + } + ] + }, + "args": [ + "--probe.docker", + "true" + ], + "env": { + "CHECKPOINT_DISABLE": "" + }, + "portDefinitions": [ + { + "port": 4040, + "protocol": "tcp", + "name": "http" + } + ] +} \ No newline at end of file