-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
229 lines (221 loc) · 9.18 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
version: "3.8"
services:
kafka01:
container_name: kafka01
image: confluentinc/confluent-local:7.7.0
# build: # build section is used to specify the configuration for building Docker images
# context: docker-build # Specifies the directory containing the Dockerfile and the files needed to build the Docker image
ports:
- 29192:29192
dns:
- 8.8.8.8
- 4.4.4.4
restart: always
# networks:
# kafka-net:
# ipv4_address: 10.0.0.11
# volumes:
# - ./config/kafka01/server.properties:/kafka/config/kraft/server.properties
#- ./data/data_kafka_01:/kafka-data/kraft-combined-logs
# - data_kafka_01:/kafka-data/kraft-combined-logs
# - data_kafka_01:/var/lib/kafka/data
# - ./scripts/update_run.sh:/tmp/update_run.sh
environment: # MUST BE ALL UPPERCASE
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_NODE_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka01:9093,2@kafka02:9093,3@kafka03:9093
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093,JINPC_PLAINTEXT://0.0.0.0:29192
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka01:9092,JINPC_PLAINTEXT://localhost:29192
KAFKA_DELETE_TOPIC_ENABLE: true
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL,JINPC_PLAINTEXT:PLAINTEXT
KAFKA_NUM_NETWORK_THREADS: 3
KAFKA_NUM_IO_THREADS: 8
KAFKA_SOCKET_SEND_BUFFER_BYTES: 102400
KAFKA_SOCKET_RECEIVE_BUFFER_BYTES: 102400
KAFKA_SOCKET_REQUEST_MAX_BYTES: 104857600
# KAFKA_LOG_DIRS: /kafka-data/kraft-combined-logs
KAFKA_NUM_PARTITIONS: 8
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
KAFKA_MIN_INSYNC_REPLICAS: 2
KAFKA_NUM_RECOVERY_THREADS_PER_DATA_DIR: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 2
KAFKA_LOG_RETENTION_HOURS: 168
KAFKA_LOG_SEGMENT_BYTES: 1073741824
KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 300000
KAFKA_CONTROLLED_SHUTDOWN_ENABLE: true
KAFKA_OFFSETS_RETENTION_MINUTES: 10080
KAFKA_REPLICA_LAG_TIME_MAX_MS: 30000
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_REST_BOOTSTRAP_SERVERS: localhost:29192
CLUSTER_ID: 4L6g3nShT-eMCtK--X86sw
KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: https://schema-registry:8081
# KAFKA_REST_LISTENERS not set. Setting it to default value: "http://0.0.0.0:8082"
# KAFKA_REST_HOST_NAME not set. Setting it to default value: "rest-proxy"
# command: "bash -c 'chmod +x /tmp/update_run.sh && /tmp/update_run.sh && /etc/confluent/docker/run'"
kafka02:
container_name: kafka02
image: confluentinc/confluent-local:7.7.0
# build:
# context: ./docker-build
# dockerfile: Dockerfile
ports:
- 29292:29292
dns:
- 8.8.8.8
- 4.4.4.4
restart: always
# networks:
# kafka-net:
# ipv4_address: 10.0.0.12
# volumes:
# - ./config/kafka02/server.properties:/kafka/config/kraft/server.properties
#- ./data/data_kafka_02:/kafka-data/kraft-combined-logs
# - data_kafka_02:/kafka-data/kraft-combined-logs
# - data_kafka_02:/var/lib/kafka/data
# - ./scripts/update_run.sh:/tmp/update_run.sh
environment:
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_NODE_ID: 2
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka01:9093,2@kafka02:9093,3@kafka03:9093
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093,JINPC_PLAINTEXT://0.0.0.0:29292
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka02:9092,JINPC_PLAINTEXT://localhost:29292
KAFKA_DELETE_TOPIC_ENABLE: true
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL,JINPC_PLAINTEXT:PLAINTEXT
KAFKA_NUM_NETWORK_THREADS: 3
KAFKA_NUM_IO_THREADS: 8
KAFKA_SOCKET_SEND_BUFFER_BYTES: 102400
KAFKA_SOCKET_RECEIVE_BUFFER_BYTES: 102400
KAFKA_SOCKET_REQUEST_MAX_BYTES: 104857600
# KAFKA_LOG_DIRS: /kafka-data/kraft-combined-logs
KAFKA_NUM_PARTITIONS: 8
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
KAFKA_MIN_INSYNC_REPLICAS: 2
KAFKA_NUM_RECOVERY_THREADS_PER_DATA_DIR: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 2
KAFKA_LOG_RETENTION_HOURS: 168
KAFKA_LOG_SEGMENT_BYTES: 1073741824
KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 300000
KAFKA_CONTROLLED_SHUTDOWN_ENABLE: true
KAFKA_OFFSETS_RETENTION_MINUTES: 10080
KAFKA_REPLICA_LAG_TIME_MAX_MS: 30000
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_REST_BOOTSTRAP_SERVERS: localhost:29292
CLUSTER_ID: 4L6g3nShT-eMCtK--X86sw
KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: https://schema-registry:8081
# KAFKA_REST_LISTENERS not set. Setting it to default value: "http://0.0.0.0:8082"
# KAFKA_REST_HOST_NAME not set. Setting it to default value: "rest-proxy"
# command: "bash -c 'chmod +x /tmp/update_run.sh && /tmp/update_run.sh && /etc/confluent/docker/run'"
kafka03:
container_name: kafka03
image: confluentinc/confluent-local:7.7.0
# build:
# context: docker-build
ports:
- 29392:29392
dns:
- 8.8.8.8
- 4.4.4.4
restart: always
# networks:
# kafka-net:
# ipv4_address: 10.0.0.13
# volumes:
# - ./config/kafka03/server.properties:/kafka/config/kraft/server.properties
#- ./data/data_kafka_03:/kafka-data/kraft-combined-logs
# - data_kafka_03:/kafka-data/kraft-combined-logs
# - data_kafka_03:/var/lib/kafka/data
# - ./scripts/update_run.sh:/tmp/update_run.sh
environment:
KAFKA_PROCESS_ROLES: broker,controller
KAFKA_NODE_ID: 3
KAFKA_CONTROLLER_QUORUM_VOTERS: 1@kafka01:9093,2@kafka02:9093,3@kafka03:9093
KAFKA_LISTENERS: PLAINTEXT://:9092,CONTROLLER://:9093,JINPC_PLAINTEXT://0.0.0.0:29392
KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka03:9092,JINPC_PLAINTEXT://localhost:29392
KAFKA_DELETE_TOPIC_ENABLE: true
KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,SSL:SSL,SASL_PLAINTEXT:SASL_PLAINTEXT,SASL_SSL:SASL_SSL,JINPC_PLAINTEXT:PLAINTEXT
KAFKA_NUM_NETWORK_THREADS: 3
KAFKA_NUM_IO_THREADS: 8
KAFKA_SOCKET_SEND_BUFFER_BYTES: 102400
KAFKA_SOCKET_RECEIVE_BUFFER_BYTES: 102400
KAFKA_SOCKET_REQUEST_MAX_BYTES: 104857600
# KAFKA_LOG_DIRS: /kafka-data/kraft-combined-logs
KAFKA_NUM_PARTITIONS: 8
KAFKA_DEFAULT_REPLICATION_FACTOR: 3
KAFKA_MIN_INSYNC_REPLICAS: 2
KAFKA_NUM_RECOVERY_THREADS_PER_DATA_DIR: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 3
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 2
KAFKA_LOG_RETENTION_HOURS: 168
KAFKA_LOG_SEGMENT_BYTES: 1073741824
KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 300000
KAFKA_CONTROLLED_SHUTDOWN_ENABLE: true
KAFKA_OFFSETS_RETENTION_MINUTES: 10080
KAFKA_REPLICA_LAG_TIME_MAX_MS: 30000
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_REST_BOOTSTRAP_SERVERS: localhost:29392
CLUSTER_ID: 4L6g3nShT-eMCtK--X86sw
KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: https://schema-registry:8081
# KAFKA_REST_LISTENERS not set. Setting it to default value: "http://0.0.0.0:8082"
# KAFKA_REST_HOST_NAME not set. Setting it to default value: "rest-proxy"
# command: "bash -c 'chmod +x /tmp/update_run.sh && /tmp/update_run.sh && /etc/confluent/docker/run'"
my-kafka-ui:
image: provectuslabs/kafka-ui
container_name: my-kafka-ui
ports:
- "8080:8080"
restart: always
environment:
- KAFKA_CLUSTERS_0_NAME=local
- KAFKA_CLUSTERS_0_BOOTSTRAPSERVERS=kafka01:9092,kafka02:9092,kafka03:9092
# networks:
# kafka-net:
# ipv4_address: 10.0.0.10
kafka-kouncil:
image: consdata/kouncil:1.4
container_name: kafka-kouncil
ports:
- "8082:8080"
restart: always
environment:
- BOOTSTRAPSERVERS=kafka01:9092,kafka02:9092,kafka03:9092
# networks:
# kafka-net:
# ipv4_address: 10.0.0.9
schema-registry:
image: confluentinc/cp-schema-registry:7.7.0
hostname: schema-registry
container_name: schema-registry
restart: always
depends_on:
- kafka01
- kafka02
- kafka03
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: 'kafka01:9092,kafka02:9092,kafka03:9092'
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
SCHEMA_REGISTRY_LOG4J_ROOT_LOGLEVEL: INFO
SCHEMA_REGISTRY_KAFKASTORE_TOPIC_REPLICATION_FACTOR: 2
SCHEMA_REGISTRY_DEBUG: 'true'
# networks:
# kafka-net:
# ipam:
# config:
# - subnet: 10.0.0.0/24
volumes:
data_kafka_01:
data_kafka_02:
data_kafka_03: