-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yaml
201 lines (189 loc) · 5.79 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
networks:
kafka-cluster:
name: kafka-cluster
driver: bridge
volumes:
redis:
zookeeperController:
zookeeper1:
zookeeper2:
zookeeper-cluster3:
kafkaController:
kafka1:
kafka2:
kafka1-cluster3:
kafka2-cluster3:
kafka3-cluster3:
services:
redis:
image: bitnami/redis:6.2
container_name: redis
environment:
- REDIS_AOF_ENABLED=yes
- REDIS_APPENDFSYNC=everysec
- ALLOW_EMPTY_PASSWORD=yes
ports:
- '6379:6379'
volumes:
- redis:/bitnami/redis/data
networks:
- kafka-cluster
zookeeperController:
image: bitnami/zookeeper:3.6.2
container_name: zookeeperController
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
volumes:
- zookeeperController:/bitnami/zookeeper
networks:
- kafka-cluster
zookeeper1:
image: bitnami/zookeeper:3.6.2
container_name: zookeeper1
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
volumes:
- zookeeper1:/bitnami/zookeeper
networks:
- kafka-cluster
zookeeper2:
image: bitnami/zookeeper:3.6.2
container_name: zookeeper2
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
volumes:
- zookeeper2:/bitnami/zookeeper
networks:
- kafka-cluster
zookeeper-cluster3:
image: bitnami/zookeeper:3.6.2
container_name: zookeeper-cluster3
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
volumes:
- zookeeper-cluster3:/bitnami/zookeeper
networks:
- kafka-cluster
kafkaController:
image: bitnami/kafka:3.1.0
container_name: kafkaController
ports:
- '19093:19093'
environment:
- KAFKA_CFG_BROKER_ID=101
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeperController:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:19093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafkaController:9092,EXTERNAL://localhost:19093
- KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
depends_on:
- zookeeperController
volumes:
- kafkaController:/bitnami/kafka
networks:
- kafka-cluster
kafka1:
image: bitnami/kafka:3.1.0
container_name: kafka1
ports:
- '9093:9093'
environment:
- KAFKA_CFG_BROKER_ID=101
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper1:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka1:9092,EXTERNAL://localhost:9093
- KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
depends_on:
- zookeeper1
volumes:
- kafka1:/bitnami/kafka
networks:
- kafka-cluster
kafka2:
image: bitnami/kafka:3.1.0
container_name: kafka2
ports:
- '9094:9094'
environment:
- KAFKA_CFG_BROKER_ID=101
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper2:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9094
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka2:9092,EXTERNAL://localhost:9094
- KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
depends_on:
- zookeeper2
volumes:
- kafka2:/bitnami/kafka
networks:
- kafka-cluster
kafka1-cluster3:
image: bitnami/kafka:3.1.0
container_name: kafka1-cluster3
ports:
- '9392:9392'
environment:
- KAFKA_CFG_BROKER_ID=101
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper-cluster3:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9392
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka1-cluster3:9092,EXTERNAL://localhost:9392
- KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
- KAFKA_CFG_DEFAULT_REPLICATION_FACTOR=3
depends_on:
- zookeeper-cluster3
volumes:
- kafka1-cluster3:/bitnami/kafka
networks:
- kafka-cluster
kafka2-cluster3:
image: bitnami/kafka:3.1.0
container_name: kafka2-cluster3
ports:
- '9393:9393'
environment:
- KAFKA_CFG_BROKER_ID=102
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper-cluster3:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9393
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka2-cluster3:9092,EXTERNAL://localhost:9393
- KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
- KAFKA_CFG_DEFAULT_REPLICATION_FACTOR=3
depends_on:
- zookeeper-cluster3
volumes:
- kafka2-cluster3:/bitnami/kafka
networks:
- kafka-cluster
kafka3-cluster3:
image: bitnami/kafka:3.1.0
container_name: kafka3-cluster3
ports:
- '9394:9394'
environment:
- KAFKA_CFG_BROKER_ID=103
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper-cluster3:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
- KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9394
- KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka3-cluster3:9092,EXTERNAL://localhost:9394
- KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
- KAFKA_CFG_DEFAULT_REPLICATION_FACTOR=3
depends_on:
- zookeeper-cluster3
volumes:
- kafka3-cluster3:/bitnami/kafka
networks:
- kafka-cluster