-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
229 lines (217 loc) · 5.8 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
version: '3.3'
services:
dps:
image: defreitas/dns-proxy-server
hostname: dns.mageddo
networks:
- kafka
volumes:
- /etc/resolv.conf:/etc/resolv.conf
- /var/run/docker.sock:/var/run/docker.sock
zk-1:
image: confluentinc/cp-zookeeper:5.3.1
container_name: zk-1
hostname: zk-1
environment:
ZOOKEEPER_SERVER_ID: 1
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_INIT_LIMIT: 5
ZOOKEEPER_SYNC_LIMIT: 2
ZOOKEEPER_SERVERS: zk-1:2888:3888;zk-2:2888:3888;zk-3:2888:3888
ZOOKEEPER_JMX_PORT: 9999
networks:
- kafka
volumes:
- volume-zk-1:/var/lib/zookeeper/data
zk-2:
image: confluentinc/cp-zookeeper:5.3.1
container_name: zk-2
hostname: zk-2
environment:
ZOOKEEPER_SERVER_ID: 2
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_INIT_LIMIT: 5
ZOOKEEPER_SYNC_LIMIT: 2
ZOOKEEPER_SERVERS: zk-1:2888:3888;zk-2:2888:3888;zk-3:2888:3888
ZOOKEEPER_JMX_PORT: 9999
networks:
- kafka
volumes:
- volume-zk-2:/var/lib/zookeeper/data
zk-3:
image: confluentinc/cp-zookeeper:5.3.1
container_name: zk-3
hostname: zk-3
environment:
ZOOKEEPER_SERVER_ID: 3
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
ZOOKEEPER_INIT_LIMIT: 5
ZOOKEEPER_SYNC_LIMIT: 2
ZOOKEEPER_SERVERS: zk-1:2888:3888;zk-2:2888:3888;zk-3:2888:3888
ZOOKEEPER_JMX_PORT: 9999
networks:
- kafka
volumes:
- volume-zk-3:/var/lib/zookeeper/data
kafka-1:
image: confluentinc/cp-kafka:5.3.1
container_name: kafka-1
hostname: kafka-1
networks:
- kafka
depends_on:
- zk-1
- zk-2
- zk-3
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: zk-1:2181,zk-1:2181,zk-2:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-1:9092
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_JMX_PORT: 9999
volumes:
- volume-kafka-1:/var/lib/kafka/data
kafka-1-jmx-exporter:
container_name: kafka-1-jmx-exporter
hostname: kafka-1-jmx-exporter
image: sscaling/jmx-prometheus-exporter
environment:
- SERVICE_PORT=80
- CONFIG_YML=/config/kafka-1-jmx.yml
volumes:
- ./prometheus-config/:/config/
networks:
- kafka
depends_on:
- kafka-1
kafka-2:
image: confluentinc/cp-kafka:5.3.1
container_name: kafka-2
hostname: kafka-2
networks:
- kafka
depends_on:
- zk-1
- zk-2
- zk-3
environment:
KAFKA_BROKER_ID: 2
KAFKA_ZOOKEEPER_CONNECT: zk-1:2181,zk-1:2181,zk-2:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-2:9092
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_JMX_PORT: 9999
volumes:
- volume-kafka-2:/var/lib/kafka/data
kafka-2-jmx-exporter:
container_name: kafka-2-jmx-exporter
hostname: kafka-2-jmx-exporter
image: sscaling/jmx-prometheus-exporter
environment:
- SERVICE_PORT=80
- CONFIG_YML=/config/kafka-2-jmx.yml
volumes:
- ./prometheus-config/:/config/
networks:
- kafka
depends_on:
- kafka-2
kafka-3:
image: confluentinc/cp-kafka:5.3.1
container_name: kafka-3
hostname: kafka-3
networks:
- kafka
depends_on:
- zk-1
- zk-2
- zk-3
environment:
KAFKA_BROKER_ID: 3
KAFKA_ZOOKEEPER_CONNECT: zk-1:2181,zk-1:2181,zk-2:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka-3:9092
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_JMX_PORT: 9999
volumes:
- volume-kafka-3:/var/lib/kafka/data
kafka-3-jmx-exporter:
container_name: kafka-3-jmx-exporter
hostname: kafka-3-jmx-exporter
image: sscaling/jmx-prometheus-exporter
environment:
- SERVICE_PORT=80
- CONFIG_YML=/config/kafka-3-jmx.yml
volumes:
- ./prometheus-config/:/config/
networks:
- kafka
depends_on:
- kafka-3
prometheus:
container_name: prometheus
hostname: prometheus
networks:
- kafka
ports:
- 9090:9090
image: prom/prometheus:0.18.0
volumes:
- ./prometheus-config/:/etc/prometheus
- prometheus:/prometheus
grafana:
container_name: grafana
hostname: grafana
image: grafana/grafana:6.4.4
networks:
- kafka
ports:
- 3000:3000
volumes:
- grafana:/var/lib/grafana
toolbox:
container_name: toolbox
image: itadventurer/kafka-toolbox:kafka-2.3.0
environment:
KAFKA_BOOTSTRAP_SERVERS: "kafka-1:9092,kafka-2:9092,kafka-3:9092"
KAFKA_ZOOKEEPER: "zk-1:2181,zk-2:2181,zk-3:2181"
command: ["sleep", "infinity"]
networks:
- kafka
volumes:
- ./toolbox/:/toolbox/
connect:
container_name: connect
image: confluentinc/cp-kafka-connect:5.3.1
hostname: connect
networks:
- kafka
ports:
- 8083:8083
volumes:
- ./connect:/connect/
environment:
CONNECT_BOOTSTRAP_SERVERS: "kafka-1:9092,kafka-2:9092,kafka-3:9092"
CONNECT_REST_PORT: 80
CONNECT_GROUP_ID: "kafka-connect"
CONNECT_CONFIG_STORAGE_TOPIC: "connect-config"
CONNECT_OFFSET_STORAGE_TOPIC: "connect-offsets"
CONNECT_STATUS_STORAGE_TOPIC: "connect-status"
CONNECT_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_INTERNAL_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_INTERNAL_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_REST_ADVERTISED_HOST_NAME: "connect"
CONNECT_PLUGIN_PATH: /usr/share/java
networks:
kafka:
volumes:
volume-kafka-1:
volume-kafka-2:
volume-kafka-3:
volume-zk-1:
volume-zk-2:
volume-zk-3:
grafana:
prometheus: