forked from tchiotludo/akhq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-multiple-clusters.yml
176 lines (176 loc) · 6.41 KB
/
docker-compose-multiple-clusters.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
version: '3.6'
volumes:
zookeeper-data-0:
driver: local
zookeeper-log-0:
driver: local
kafka-data-0:
driver: local
zookeeper-data-1:
driver: local
zookeeper-log-1:
driver: local
kafka-data-1:
driver: local
services:
akhq:
image: tchiotludo/akhq
environment:
AKHQ_CONFIGURATION: |
akhq:
connections:
docker-kafka-server-1:
properties:
bootstrap.servers: "kafka-0:29092"
schema-registry:
url: "http://schema-registry-0:8085"
connect:
- name: connect-1
url: "http://connect-0:8083"
- name: connect-2
url: "http://connect-1:8084"
docker-kafka-server-2:
properties:
bootstrap.servers: "kafka-1:29072"
ports:
- 8080:8080
links:
- kafka-0
- schema-registry-0
- connect-0
- connect-1
- kafka-1
zookeeper-0:
image: confluentinc/cp-zookeeper
volumes:
- zookeeper-data-0:/var/lib/zookeeper/data
- zookeeper-log-0:/var/lib/zookeeper/log
environment:
ZOOKEEPER_CLIENT_PORT: 2181
kafka-0:
image: confluentinc/cp-kafka
volumes:
- kafka-data-0:/var/lib/kafka
ports:
- 9092:9092
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper-0:2181
KAFKA_NUM_PARTITIONS: 12
KAFKA_COMPRESSION_TYPE: gzip
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_JMX_PORT: 9091
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.auth.SimpleAclAuthorizer
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true'
KAFKA_LISTENERS: INTERNAL://kafka-0:29092,OUTSIDE://kafka-0:9092
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka-0:29092,OUTSIDE://localhost:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
links:
- zookeeper-0
schema-registry-0:
image: confluentinc/cp-schema-registry
ports:
- 8085:8085
depends_on:
- kafka-0
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: "PLAINTEXT://kafka-0:29092"
SCHEMA_REGISTRY_HOST_NAME: schema-registry-0
SCHEMA_REGISTRY_LISTENERS: "http://schema-registry-0:8085"
SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL: INFO
connect-0:
image: confluentinc/cp-kafka-connect
ports:
- 8083:8083
depends_on:
- kafka-0
- schema-registry-0
environment:
CONNECT_BOOTSTRAP_SERVERS: kafka-0:29092
CONNECT_REST_PORT: 8083
CONNECT_HOST_NAME: connect-0
CONNECT_REST_LISTENERS: http://connect-0:8083
CONNECT_LISTENERS: http://connect-0:8083
CONNECT_REST_ADVERTISED_HOST_NAME: connect-0
CONNECT_CONFIG_STORAGE_TOPIC: __connect-0-config
CONNECT_OFFSET_STORAGE_TOPIC: __connect-0-offsets
CONNECT_STATUS_STORAGE_TOPIC: __connect-0-status
CONNECT_GROUP_ID: "kafka-connect-0"
CONNECT_KEY_CONVERTER_SCHEMAS_ENABLE: "true"
CONNECT_KEY_CONVERTER: io.confluent.connect.avro.AvroConverter
CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry-0:8085
CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE: "true"
CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry-0:8085
CONNECT_INTERNAL_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_INTERNAL_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
CONNECT_PLUGIN_PATH: ' /usr/share/java/'
connect-1:
image: confluentinc/cp-kafka-connect
ports:
- 8084:8084
depends_on:
- kafka-0
- schema-registry-0
environment:
CONNECT_BOOTSTRAP_SERVERS: kafka-0:29092
CONNECT_REST_PORT: 8084
CONNECT_HOST_NAME: connect-1
CONNECT_REST_LISTENERS: http://connect-1:8084
CONNECT_LISTENERS: http://connect-1:8084
CONNECT_REST_ADVERTISED_HOST_NAME: connect-1
CONNECT_CONFIG_STORAGE_TOPIC: __connect-1-config
CONNECT_OFFSET_STORAGE_TOPIC: __connect-1-offsets
CONNECT_STATUS_STORAGE_TOPIC: __connect-1-status
CONNECT_GROUP_ID: "kafka-connect-1"
CONNECT_KEY_CONVERTER_SCHEMAS_ENABLE: "true"
CONNECT_KEY_CONVERTER: io.confluent.connect.avro.AvroConverter
CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry-0:8085
CONNECT_VALUE_CONVERTER_SCHEMAS_ENABLE: "true"
CONNECT_VALUE_CONVERTER: io.confluent.connect.avro.AvroConverter
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: http://schema-registry-0:8085
CONNECT_INTERNAL_KEY_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_INTERNAL_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: 1
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: 1
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: 1
CONNECT_PLUGIN_PATH: ' /usr/share/java/'
# ANOTHER CLUSTER
zookeeper-1:
image: confluentinc/cp-zookeeper
volumes:
- zookeeper-data-1:/var/lib/zookeeper/data
- zookeeper-log-1:/var/lib/zookeeper/log
environment:
ZOOKEEPER_CLIENT_PORT: 2171
kafka-1:
image: confluentinc/cp-kafka
volumes:
- kafka-data-1:/var/lib/kafka
ports:
- 9072:9072
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper-1:2171
KAFKA_NUM_PARTITIONS: 12
KAFKA_COMPRESSION_TYPE: gzip
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_JMX_PORT: 9071
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.auth.SimpleAclAuthorizer
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true'
KAFKA_LISTENERS: INTERNAL://kafka-1:29072,OUTSIDE://kafka-1:9072
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka-1:29072,OUTSIDE://localhost:9072
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL
links:
- zookeeper-1