This repository has been archived by the owner on Jan 5, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
320 lines (303 loc) · 7.46 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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
version: "2.3"
services:
nginx:
build: ./nginx
restart: always
ports:
- "8888:80"
volumes:
- nginx-log:/var/log/nginx
depends_on:
storage:
condition: service_started
facade:
condition: service_started
filebeat:
condition: service_started
networks:
- data
controller:
image: ansys-controller
environment:
BACKEND_LOG: "warn"
ETCD_ENDPOINTS: '["etcd1:2379","etcd2:2379","etcd3:2379"]'
RABBIT_HOST: rabbit
RABBIT_PORT: 5672
RABBIT_USER: "${RABBIT_USER}"
RABBIT_PASS: "${RABBIT_PASS}"
STORAGE_URL: "http://storage:3000"
LOG_HOST: logstash
LOG_PORT: 5044
depends_on:
rabbit:
condition: service_healthy
logstash:
condition: service_healthy
networks:
- data
storage:
image: ansys-storage
restart: always
environment:
BACKEND_LOG: "warn"
DATA_PATH: "/ansys"
LOG_HOST: logstash
LOG_PORT: 5044
volumes:
- /mnt/ansys-moe/storage:/ansys
depends_on:
logstash:
condition: service_healthy
networks:
- data
facade:
image: ansys-facade
restart: always
environment:
BACKEND_LOG: "warn"
ETCD_ENDPOINTS: '["etcd1:2379","etcd2:2379","etcd3:2379"]'
RABBIT_HOST: rabbit
RABBIT_PORT: 5672
RABBIT_MGMT_PORT: 15672
RABBIT_USER: "${RABBIT_USER}"
RABBIT_PASS: "${RABBIT_PASS}"
LOG_HOST: logstash
LOG_PORT: 5044
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
depends_on:
rabbit:
condition: service_healthy
logstash:
condition: service_healthy
networks:
- data
pythond:
image: ansys-commond-python
restart: always
environment:
REMOTE_URL: http://nginx
RABBIT_HOST: rabbit
RABBIT_PORT: 5672
RABBIT_USER: "${RABBIT_USER}"
RABBIT_PASS: "${RABBIT_PASS}"
LOG_HOST: logstash
LOG_PORT: 5044
PYTHON: 2
depends_on:
rabbit:
condition: service_healthy
logstash:
condition: service_healthy
networks:
- data
rlangd:
image: ansys-commond-rlang
restart: always
environment:
REMOTE_URL: http://nginx
RABBIT_HOST: rabbit
RABBIT_PORT: 5672
RABBIT_USER: "${RABBIT_USER}"
RABBIT_PASS: "${RABBIT_PASS}"
LOG_HOST: logstash
LOG_PORT: 5044
RLANG: 2
depends_on:
rabbit:
condition: service_healthy
logstash:
condition: service_healthy
networks:
- data
etcd1:
image: quay.io/coreos/etcd:v3.2.18
restart: always
ports:
- "23791:2379"
environment:
ETCD_DATA_DIR: /etcd_data
ETCD_NAME: etcd1
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd1:2380
ETCD_INITIAL_CLUSTER: etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_INITIAL_CLUSTER_TOKEN: ansys-moe-etcd
ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_ADVERTISE_CLIENT_URLS: http://etcd1:2379
volumes:
- /mnt/ansys-moe/etcd1:/etcd_data
logging:
driver: gelf
options:
gelf-address: "udp://127.0.0.1:12201"
depends_on:
logstash:
condition: service_healthy
networks:
- data
etcd2:
image: quay.io/coreos/etcd:v3.2.18
restart: always
ports:
- "23792:2379"
environment:
ETCD_DATA_DIR: /etcd_data
ETCD_NAME: etcd2
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd2:2380
ETCD_INITIAL_CLUSTER: etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_INITIAL_CLUSTER_TOKEN: ansys-moe-etcd
ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_ADVERTISE_CLIENT_URLS: http://etcd2:2379
volumes:
- /mnt/ansys-moe/etcd2:/etcd_data
logging:
driver: gelf
options:
gelf-address: "udp://127.0.0.1:12201"
depends_on:
logstash:
condition: service_healthy
networks:
- data
etcd3:
image: quay.io/coreos/etcd:v3.2.18
restart: always
ports:
- "23793:2379"
environment:
ETCD_DATA_DIR: /etcd_data
ETCD_NAME: etcd3
ETCD_INITIAL_ADVERTISE_PEER_URLS: http://etcd3:2380
ETCD_INITIAL_CLUSTER: etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
ETCD_INITIAL_CLUSTER_STATE: new
ETCD_INITIAL_CLUSTER_TOKEN: ansys-moe-etcd
ETCD_LISTEN_PEER_URLS: http://0.0.0.0:2380
ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379
ETCD_ADVERTISE_CLIENT_URLS: http://etcd3:2379
volumes:
- /mnt/ansys-moe/etcd3:/etcd_data
logging:
driver: gelf
options:
gelf-address: "udp://127.0.0.1:12201"
depends_on:
logstash:
condition: service_healthy
networks:
- data
rabbit:
image: rabbitmq:management-alpine
hostname: rabbit
restart: always
ports:
- "9511:5672"
- "9512:15672"
environment:
RABBITMQ_LOGS: /var/log/rabbitmq/rabbit.log
RABBITMQ_DEFAULT_USER: ansys-moe
RABBITMQ_DEFAULT_PASS: "${RABBIT_PASS}"
volumes:
- rabbit-log:/var/log/rabbitmq
- /mnt/ansys-moe/rabbit:/var/lib/rabbitmq/mnesia
healthcheck:
test: ["CMD", "rabbitmqctl", "node_health_check"]
interval: 15s
timeout: 10s
retries: 8
depends_on:
filebeat:
condition: service_started
logstash:
condition: service_healthy
networks:
- data
filebeat:
build: ./filebeat
restart: always
environment:
LOGSTASH_HOST: logstash:5044
volumes:
- nginx-log:/var/log/nginx:ro
- rabbit-log:/var/log/rabbitmq:ro
depends_on:
logstash:
condition: service_healthy
networks:
- ctrl
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4
restart: always
ulimits:
memlock:
soft: -1
hard: -1
ports:
- "9200:9200"
environment:
cluster.name: docker-cluster
bootstrap.memory_lock: "true"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
volumes:
- /mnt/ansys-moe/es:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD", "wget", "-O-", "http://localhost:9200"]
interval: 15s
timeout: 10s
retries: 8
networks:
- ctrl
kibana:
image: docker.elastic.co/kibana/kibana-oss:6.2.4
restart: always
ports:
- "5601:5601"
environment:
SERVER_NAME: elasticsearch
ELASTICSEARCH_URL: http://elasticsearch:9200
depends_on:
elasticsearch:
condition: service_started
networks:
- ctrl
logstash:
build: ./logstash
restart: always
ports:
- "12201:12201/udp"
- "5044:5044/udp"
volumes:
- /dev/urandom:/dev/random
healthcheck:
test: ["CMD", "curl", "http://localhost:9600/?pretty"]
interval: 15s
timeout: 10s
retries: 16
depends_on:
elasticsearch:
condition: service_started
networks:
- data
- ctrl
elastalert:
build: ./elastalert
restart: always
volumes:
- /mnt/ansys-moe/rules:/opt/elastalert/rules
depends_on:
elasticsearch:
condition: service_healthy
networks:
- ctrl
volumes:
nginx-log:
driver: local
rabbit-log:
driver: local
networks:
data:
driver: bridge
ctrl:
driver: bridge