-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
262 lines (242 loc) · 6.21 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# Configuration taken from https://github.com/meltwater/docker-mesos
# https://github.com/containous/traefik/blob/master/examples/compose-marathon.yml
version: '3.0'
services:
zookeeper:
image: zookeeper:3.4.11
hostname: zookeeper
ports:
- '2181:2181'
- '2888:2888'
- '3888:3888'
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zookeeper:2888:3888
restart: always
wait_zookeeper:
image: "waisbrot/wait"
restart: "no"
environment:
TARGETS: "zookeeper:2181"
TIMEOUT: 60
depends_on:
- zookeeper
mesos_master:
image: mesosphere/mesos-master:1.3.0
hostname: mesosmaster
volumes:
- ./log/mesos/master:/var/log/mesos/master:rw
- ./tmp/mesos/master:/var/tmp/mesos:rw
environment:
MESOS_PORT: 5050
MESOS_ZK: 'zk://zookeeper:2181/mesos'
MESOS_QUORUM: '1'
MESOS_REGISTRY: 'in_memory'
MESOS_CLUSTER: 'local'
MESOS_HOSTNAME: 'mesosmaster.docker'
MESOS_LOG_DIR: '/var/log/mesos/master'
MESOS_WORK_DIR: '/var/lib/mesos'
depends_on:
- zookeeper
wait_mesos_master:
image: "waisbrot/wait"
restart: "no"
environment:
TARGETS: "mesos_master:5050"
TIMEOUT: 60
depends_on:
- mesos_master
mesos_slave:
image: mesosphere/mesos-slave:1.3.0
hostname: mesosslave
privileged: true
volumes:
- ./log/mesos/slave:/var/log/mesos/slave:rw
- ./tmp/mesos/slave:/var/tmp/mesos:rw
- /sys:/sys
#- /cgroup:/cgroup is it really needed for the demo? Not compatible with docker machine on MacOSX, try /sys/fs/cgroups...
# /usr/bin/docker is needed if you're running an older docker version
#- /usr/bin/docker:/usr/bin/docker:r
- /var/run/docker.sock:/var/run/docker.sock:rw
environment:
MESOS_MASTER: 'zk://zookeeper:2181/mesos'
MESOS_PORT: '5051'
MESOS_LOG_DIR: '/var/log/mesos/slave'
MESOS_WORK_DIR: '/var/tmp/mesos'
MESOS_CONTAINERIZERS: 'docker,mesos'
MESOS_EXECUTOR_REGISTRATION_TIMEOUT: '5mins'
MESOS_EXECUTOR_SHUTDOWN_GRACE_PERIOD: '90secs'
MESOS_DOCKER_STOP_TIMEOUT: '60secs'
# If your workstation doesn't have a resolvable hostname/FQDN then $MESOS_HOSTNAME needs to be set to its IP-address
MESOS_HOSTNAME: 'mesosslave.docker'
MESOS_SWITCH_USER: 0
# see bug resolution for "Failed to determine the hierarchy where the subsystem freezer is attached" at https://github.com/eBayClassifiedsGroup/PanteraS/issues/142
MESOS_LAUNCHER: "posix"
depends_on:
- zookeeper
- mesos_master
chronos:
image: mesosphere/chronos:v3.0.2
command: '--zk_hosts zookeeper:2181 --master zk://zookeeper:2181/mesos --zk_timeout 30000'
restart: "always"
hostname: chronos
ports:
- "4400:4400"
- "4401:4401"
environment:
PORT0: 4400
PORT1: 4401
depends_on:
- zookeeper
- mesos_slave
wait_chronos:
image: "waisbrot/wait"
restart: "no"
environment:
TARGETS: "chronos:4400"
TIMEOUT: 60
depends_on:
- chronos
# Expose the database to the host
db:
image: postgres:9.6.5-alpine
ports:
- "5432:5432"
hostname: db
environment:
POSTGRES_PASSWORD: test
wait_dbs:
image: "waisbrot/wait"
restart: "no"
environment:
TARGETS: "db:5432"
TIMEOUT: 60
depends_on:
- db
create_dbs:
image: "hbpmip/create-databases:1.0.0"
restart: "no"
environment:
DB_HOST: db
DB_PORT: 5432
DB_ADMIN_USER: postgres
DB_ADMIN_PASSWORD: test
DB1: meta
USER1: meta
PASSWORD1: metapwd
DB2: features
USER2: features
PASSWORD2: featurespwd
DB3: woken
USER3: woken
PASSWORD3: wokenpwd
depends_on:
- db
sample_meta_db_setup:
image: "hbpmip/sample-meta-db-setup:0.6.0"
container_name: "sample-meta-db-setup"
restart: "no"
environment:
FLYWAY_HOST: db
FLYWAY_PORT: 5432
FLYWAY_DATABASE_NAME: meta
FLYWAY_USER: postgres
FLYWAY_PASSWORD: test
depends_on:
- db
sample_data_db_setup:
image: "hbpmip/sample-data-db-setup:0.6.2"
container_name: "sample-data-db-setup"
restart: "no"
environment:
FLYWAY_HOST: db
FLYWAY_PORT: 5432
FLYWAY_DATABASE_NAME: features
FLYWAY_USER: postgres
FLYWAY_PASSWORD: test
depends_on:
- db
woken_db_setup:
image: "hbpmip/woken-db-setup:1.2.2"
container_name: "woken-db-setup"
restart: "no"
environment:
FLYWAY_HOST: db
FLYWAY_PORT: 5432
FLYWAY_DATABASE_NAME: woken
FLYWAY_USER: postgres
FLYWAY_PASSWORD: test
depends_on:
- db
woken:
build:
context: .
dockerfile: Dockerfile.woken
ports:
- "8087:8087"
- "8088:8088"
- "9095:9095"
- "8000:8000"
environment:
CLUSTER_PORT: 8088
CLUSTER_IP: woken
WOKEN_PORT_8088_TCP_ADDR: woken
DOCKER_BRIDGE_NETWORK: "algorithmfactorydemo_default"
LOG_LEVEL: DEBUG
KAMON_ENABLED: "yes"
ZIPKIN_ENABLED: "yes"
PROMETHEUS_ENABLED: "yes"
SIGAR_SYSTEM_METRICS: "no"
JVM_SYSTEM_METRICS: "no"
depends_on:
- chronos
- db
wait_woken:
image: "waisbrot/wait"
restart: "no"
environment:
TARGETS: "woken:8087,chronos:4400"
TIMEOUT: 60
depends_on:
- woken
- chronos
wokenvalidation:
image: hbpmip/woken-validation:2.5.3
ports:
- "8081:8081"
- "8082:8082"
environment:
CLUSTER_PORT: 8082
CLUSTER_IP: wokenvalidation
WOKEN_PORT_8088_TCP_ADDR: woken
LOG_LEVEL: DEBUG
depends_on:
- woken
wait_wokenvalidation:
image: "waisbrot/wait"
restart: "no"
environment:
TARGETS: "wokenvalidation:8081"
TIMEOUT: 60
depends_on:
- woken
- chronos
tester:
build:
context: .
dockerfile: Dockerfile.tester
environment:
CLUSTER_PORT: 8197
CLUSTER_IP: wokentest
WOKEN_PORT_8088_TCP_ADDR: woken
depends_on:
- woken
# An example of algorithm
knn-algorithm:
image: hbpmip/python-knn:0.4.0
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.18.30.0/24