-
Notifications
You must be signed in to change notification settings - Fork 94
/
docker-compose.yml
115 lines (110 loc) · 2.97 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
version: "3"
services:
zookeeper:
image: "mesoscloud/zookeeper:latest"
restart: "unless-stopped"
network_mode: "bridge"
environment:
- MYID=1
ports:
- 2181:2181
volumes:
- /tmp/swan-tmp-data/zookeeper:/tmp/zookeeper:rw
mesos-master:
image: "mesosphere/mesos-master:1.2.1"
restart: "unless-stopped"
network_mode: "bridge"
environment:
- MESOS_ZK=zk://zookeeper:2181/mesos
- MESOS_QUORUM=1
- MESOS_PORT=5050
- MESOS_LOGGING_LEVEL=WARNING
- MESOS_CLUSTER=local
- MESOS_HOSTNAME=localhost
- MESOS_WORK_DIR=/data/mesos
volumes:
- /tmp/swan-tmp-data/mesos-master-data:/data/mesos:rw
depends_on:
- zookeeper
links:
- zookeeper
ports:
- 5050:5050
mesos-slave:
image: "mesosphere/mesos-slave:1.2.1"
restart: "unless-stopped"
network_mode: "bridge"
pid: "host"
privileged: true
environment:
- MESOS_MASTER=zk://zookeeper:2181/mesos
- MESOS_LOGGING_LEVEL=WARNING
- MESOS_PORT=5051
- MESOS_CONTAINERIZERS=docker,mesos
- MESOS_DOCKER_REMOVE_DELAY=1secs
- MESOS_ISOLATION=cgroups/cpu,cgroups/mem
- MESOS_ATTRIBUTES=vcluster:demo
- MESOS_SYSTEMD_ENABLE_SUPPORT=false
- MESOS_WORK_DIR=/data/mesos
- PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
- MESOS_HOSTNAME=127.0.0.1
- MESOS_RESOURCES=ports:[41000-42000]
volumes:
- /var/lib/docker:/data/docker:rw
- /sys/fs/cgroup:/sys/fs/cgroup:rw
- /var/run/docker.sock:/var/run/docker.sock:rw
- /tmp/swan-tmp-data/mesos-slave-data:/data/mesos:rw
depends_on:
- zookeeper
- mesos-master
links:
- mesos-master
- zookeeper
ports:
- 5051:5051
swan-master:
image: "swan:latest"
command: "manager"
network_mode: "bridge"
restart: "unless-stopped"
privileged: true
pid: "host"
environment:
- SWAN_LISTEN_ADDR=0.0.0.0:9999
- SWAN_STORE_TYPE=zk
- SWAN_MESOS_URL=zk://zookeeper:2181/mesos
- SWAN_ZK_URL=zk://zookeeper:2181/swan
- SWAN_LOG_LEVEL=debug
- SWAN_START_DELAY=2
healthcheck:
test: ["CMD", "wget", "-s", "-q", "http://127.0.0.1:9999/ping"]
interval: 5s
timeout: 5s
retries: 3
depends_on:
- zookeeper
- mesos-master
links:
- zookeeper
ports:
- 9999:9999
swan-agent:
image: "swan:latest"
command: "agent"
network_mode: "host"
restart: "unless-stopped"
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
environment:
- SWAN_LISTEN_ADDR=0.0.0.0:10000
- SWAN_JOIN_ADDRS=127.0.0.1:9999
- SWAN_LOG_LEVEL=debug
- SWAN_START_DELAY=5
- MESOS_SLAVE_IPS=127.0.0.1 # should keep same as mesos-slave.MESOS_HOSTNAME
healthcheck:
test: ["CMD", "wget", "-s", "-q", "http://127.0.0.1:10000/ping"]
interval: 5s
timeout: 5s
retries: 3
depends_on:
- swan-master