-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
243 lines (226 loc) · 7.46 KB
/
docker-compose.yaml
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
---
version: '3.1'
volumes:
prometheus-r11_data: {}
prometheus-r12_data: {}
# grafana_data: {}
minio_data: {}
services:
prometheus-r11:
image: prom/prometheus:v2.24.1
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus-r11_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus1.yaml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.max-block-duration=30m'
- '--storage.tsdb.min-block-duration=30m'
- '--web.enable-lifecycle'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9081:9090
links:
- cadvisor:cadvisor
- alertmanager:alertmanager
depends_on:
- cadvisor
restart: always
prometheus-r12:
image: prom/prometheus:v2.24.1
volumes:
- ./prometheus/:/etc/prometheus/
- prometheus-r12_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus2.yaml'
- '--storage.tsdb.path=/prometheus'
- '--storage.tsdb.max-block-duration=30m'
- '--storage.tsdb.min-block-duration=30m'
- '--web.enable-lifecycle'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
ports:
- 9082:9090
links:
- cadvisor:cadvisor
- alertmanager:alertmanager
depends_on:
- cadvisor
restart: always
thanos-sidecar-r11:
image: quay.io/thanos/thanos:v0.18.0
volumes:
- ./thanos/:/etc/thanos/
- prometheus-r11_data:/prometheus
command:
- 'sidecar'
- '--tsdb.path=/prometheus'
- '--prometheus.url=http://prometheus-r11:9090'
- '--grpc-address=0.0.0.0:10091'
- '--http-address=0.0.0.0:10902'
- '--objstore.config-file=/etc/thanos/bucket_config.yaml'
depends_on:
- prometheus-r11
- minio
restart: always
thanos-sidecar-r12:
image: quay.io/thanos/thanos:v0.18.0
volumes:
- ./thanos/:/etc/thanos/
- prometheus-r12_data:/prometheus
command:
- 'sidecar'
- '--tsdb.path=/prometheus'
- '--prometheus.url=http://prometheus-r12:9090'
- '--grpc-address=0.0.0.0:10091'
- '--http-address=0.0.0.0:10902'
- '--objstore.config-file=/etc/thanos/bucket_config.yaml'
depends_on:
- prometheus-r12
- minio
restart: always
thanos-querier:
image: quay.io/thanos/thanos:v0.18.0
command:
- 'query'
- '--grpc-address=0.0.0.0:10091'
- '--http-address=0.0.0.0:10902'
- '--query.replica-label=replica'
- '--store=thanos-sidecar-1:10091'
- '--store=thanos-sidecar-2:10091'
- '--store=thanos-store-gateway:10091'
ports:
- 10902:10902
depends_on:
- thanos-sidecar-r11
- thanos-sidecar-r12
restart: always
thanos-store-gateway:
image: quay.io/thanos/thanos:v0.18.0
volumes:
- ./thanos/:/etc/thanos/
command:
- 'store'
- '--grpc-address=0.0.0.0:10091'
- '--http-address=0.0.0.0:10902'
- '--data-dir=/tmp/thanos/store'
- '--objstore.config-file=/etc/thanos/bucket_config.yaml'
depends_on:
- minio
restart: always
thanos-compactor:
image: quay.io/thanos/thanos:v0.18.0
volumes:
- ./thanos/:/etc/thanos/
command:
- 'compact'
- '--log.level=debug'
- '--data-dir=/data'
- '--objstore.config-file=/etc/thanos/bucket_config.yaml'
- '--wait'
depends_on:
- minio
restart: always
thanos-ruler:
image: quay.io/thanos/thanos:v0.18.0
volumes:
- ./thanos/:/etc/thanos/
command:
- 'rule'
- '--grpc-address=0.0.0.0:10091'
- '--http-address=0.0.0.0:10902'
- '--log.level=debug'
- '--data-dir=/data'
- '--eval-interval=15s'
- '--rule-file=/etc/thanos/*.rules.yaml'
- '--alertmanagers.url=http://alertmanager:9093'
- '--query=thanos-querier:10902'
- '--objstore.config-file=/etc/thanos/bucket_config.yaml'
- "--label=ruler_cluster=\"vegas\""
- "--label=ruler_replica=\"r1\""
ports:
- 10903:10902
depends_on:
- minio
- thanos-querier
restart: always
thanos-bucket-web:
image: quay.io/thanos/thanos:v0.18.0
volumes:
- ./thanos/:/etc/thanos/
command:
- 'tools'
- 'bucket'
- 'web'
- '--http-address=0.0.0.0:10902'
- '--log.level=debug'
- '--objstore.config-file=/etc/thanos/bucket_config.yaml'
- '--refresh=5m'
- '--timeout=2m'
- '--label=replica'
ports:
- 10904:10902
depends_on:
- minio
restart: always
minio:
image: minio/minio:RELEASE.2020-05-01T22-19-14Z
volumes:
- minio_data:/data
entrypoint: sh
command: -c 'mkdir -p /data/demo-bucket && /usr/bin/minio server /data'
environment:
- MINIO_ACCESS_KEY=smth
- MINIO_SECRET_KEY=Need8Chars
- MINIO_PROMETHEUS_AUTH_TYPE=public
ports:
- 9000:9000
node-exporter:
image: prom/node-exporter:v0.18.1
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.sysfs=/host/sys'
- --collector.filesystem.ignored-mount-points
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
ports:
- 9100:9100
restart: always
alertmanager:
image: prom/alertmanager:v0.21.0
ports:
- 9093:9093
volumes:
- ./alertmanager/:/etc/alertmanager/
restart: always
command:
- '--config.file=/etc/alertmanager/config.yaml'
- '--storage.path=/alertmanager'
cadvisor:
image: gcr.io/google_containers/cadvisor:v0.36.0
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- 8080:8080
restart: always
# grafana:
# image: grafana/grafana:7.3.7
# user: "104"
# depends_on:
# - prometheus-r11
# - prometheus-r12
# ports:
# - 3000:3000
# volumes:
# - grafana_data:/var/lib/grafana
# - ./grafana/provisioning/:/etc/grafana/provisioning/
# env_file:
# - ./grafana/config.monitoring
# restart: always