-
Notifications
You must be signed in to change notification settings - Fork 756
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
222 lines (210 loc) · 7.11 KB
/
Copy pathdocker-compose.yml
File metadata and controls
222 lines (210 loc) · 7.11 KB
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
x-automq-common: &automq-common
build:
context: .
dockerfile: Dockerfile
stop_grace_period: 1m
volumes:
- ${AUTOMQ_DEV_HOME}:/opt/automq
- ./.devkit/config:/config
restart: unless-stopped
cap_add:
- NET_ADMIN
labels:
com.automq.devkit: "true"
environment:
- KAFKA_S3_ACCESS_KEY=${KAFKA_S3_ACCESS_KEY}
- KAFKA_S3_SECRET_KEY=${KAFKA_S3_SECRET_KEY}
- KAFKA_HEAP_OPTS=${KAFKA_HEAP_OPTS:--Xms1g -Xmx4g -XX:MetaspaceSize=96m -XX:MaxDirectMemorySize=1G}
- KAFKA_JVM_PERFORMANCE_OPTS=-server -XX:+UseZGC -XX:ZCollectionInterval=5
- LOG_DIR=/tmp/kafka-logs
depends_on:
mc:
condition: service_completed_successfully
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
x-automq-healthcheck: &automq-healthcheck
interval: 20s
timeout: 20s
retries: 5
start_period: 20s
services:
# ==================== Infrastructure ====================
minio:
image: minio/minio:RELEASE.2025-05-24T17-08-30Z
hostname: warehouse.minio
environment:
- MINIO_ROOT_USER=admin
- MINIO_ROOT_PASSWORD=password
- MINIO_DOMAIN=minio
ports:
- "${MINIO_API_PORT:-9000}:9000"
- "${MINIO_CONSOLE_PORT:-9001}:9001"
command: ["server", "/data", "--console-address", ":9001"]
healthcheck:
test: ["CMD", "curl", "-f", "http://minio:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 3
mc:
image: minio/mc:RELEASE.2025-05-21T01-59-54Z
depends_on:
minio:
condition: service_healthy
entrypoint: >
/bin/sh -c "
until (/usr/bin/mc alias set minio http://minio:9000 admin password) do echo '...waiting...' && sleep 1; done;
/usr/bin/mc mb --ignore-existing minio/automq-data;
/usr/bin/mc mb --ignore-existing minio/automq-ops;
/usr/bin/mc mb --ignore-existing minio/warehouse;
exit 0;
"
# ==================== AutoMQ Nodes ====================
node-0:
<<: *automq-common
hostname: node-0
profiles: [single, cluster, cluster4, cluster5]
ports:
- "${NODE0_KAFKA_PORT:-9092}:9192"
- "${NODE0_DEBUG_PORT:-5005}:5005"
- "${NODE0_JMX_PORT:-9999}:9999"
command:
- bash
- -c
- |
KAFKA_HEAP_OPTS="$$KAFKA_HEAP_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" JMX_PORT="9999" \
exec /opt/automq/bin/kafka-server-start.sh /config/node-0.properties
healthcheck:
test: ["CMD-SHELL", "KAFKA_JVM_PERFORMANCE_OPTS='' KAFKA_HEAP_OPTS='-Xms256m -Xmx256m' /opt/automq/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092"]
<<: *automq-healthcheck
node-1:
<<: *automq-common
hostname: node-1
profiles: [cluster, cluster4, cluster5]
ports:
- "${NODE1_KAFKA_PORT:-19092}:9192"
- "${NODE1_DEBUG_PORT:-5006}:5005"
command:
- bash
- -c
- |
KAFKA_HEAP_OPTS="$$KAFKA_HEAP_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" JMX_PORT="9999" \
exec /opt/automq/bin/kafka-server-start.sh /config/node-1.properties
healthcheck:
test: ["CMD-SHELL", "KAFKA_JVM_PERFORMANCE_OPTS='' KAFKA_HEAP_OPTS='-Xms256m -Xmx256m' /opt/automq/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092"]
<<: *automq-healthcheck
node-2:
<<: *automq-common
hostname: node-2
profiles: [cluster, cluster4, cluster5]
ports:
- "${NODE2_KAFKA_PORT:-29092}:9192"
- "${NODE2_DEBUG_PORT:-5007}:5005"
command:
- bash
- -c
- |
KAFKA_HEAP_OPTS="$$KAFKA_HEAP_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" JMX_PORT="9999" \
exec /opt/automq/bin/kafka-server-start.sh /config/node-2.properties
healthcheck:
test: ["CMD-SHELL", "KAFKA_JVM_PERFORMANCE_OPTS='' KAFKA_HEAP_OPTS='-Xms256m -Xmx256m' /opt/automq/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092"]
<<: *automq-healthcheck
node-3:
<<: *automq-common
hostname: node-3
profiles: [cluster4, cluster5]
ports:
- "${NODE3_KAFKA_PORT:-39092}:9192"
- "${NODE3_DEBUG_PORT:-5008}:5005"
command:
- bash
- -c
- |
KAFKA_HEAP_OPTS="$$KAFKA_HEAP_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" JMX_PORT="9999" \
exec /opt/automq/bin/kafka-server-start.sh /config/node-3.properties
healthcheck:
test: ["CMD-SHELL", "KAFKA_JVM_PERFORMANCE_OPTS='' KAFKA_HEAP_OPTS='-Xms256m -Xmx256m' /opt/automq/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092"]
<<: *automq-healthcheck
node-4:
<<: *automq-common
hostname: node-4
profiles: [cluster5]
ports:
- "${NODE4_KAFKA_PORT:-49092}:9192"
- "${NODE4_DEBUG_PORT:-5009}:5005"
command:
- bash
- -c
- |
KAFKA_HEAP_OPTS="$$KAFKA_HEAP_OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" JMX_PORT="9999" \
exec /opt/automq/bin/kafka-server-start.sh /config/node-4.properties
healthcheck:
test: ["CMD-SHELL", "KAFKA_JVM_PERFORMANCE_OPTS='' KAFKA_HEAP_OPTS='-Xms256m -Xmx256m' /opt/automq/bin/kafka-broker-api-versions.sh --bootstrap-server localhost:9092"]
<<: *automq-healthcheck
# ==================== TableTopic ====================
schema-registry:
image: confluentinc/cp-schema-registry:7.7.8
hostname: schema-registry
profiles: [tabletopic]
ports:
- "${SCHEMA_REGISTRY_PORT:-8081}:8081"
environment:
SCHEMA_REGISTRY_HOST_NAME: schema-registry
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: node-0:9092
SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081
restart: on-failure
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8081 || exit 1"]
interval: 10s
timeout: 60s
retries: 30
rest:
image: apache/iceberg-rest-fixture
hostname: rest
profiles: [tabletopic]
ports:
- "${ICEBERG_REST_PORT:-8181}:8181"
depends_on:
minio:
condition: service_healthy
environment:
- AWS_ACCESS_KEY_ID=admin
- AWS_SECRET_ACCESS_KEY=password
- AWS_REGION=us-east-1
- CATALOG_WAREHOUSE=s3://warehouse/
- CATALOG_IO__IMPL=org.apache.iceberg.aws.s3.S3FileIO
- CATALOG_S3_ENDPOINT=http://minio:9000
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8181/v1/config || exit 1"]
interval: 10s
timeout: 5s
retries: 20
start_period: 30s
# ==================== Analytics ====================
spark-iceberg:
image: tabulario/spark-iceberg:3.5.5_1.8.1
hostname: spark-iceberg
profiles: [analytics]
depends_on:
minio:
condition: service_healthy
environment:
- AWS_ACCESS_KEY_ID=admin
- AWS_SECRET_ACCESS_KEY=password
- AWS_REGION=us-east-1
ports:
- "${SPARK_NOTEBOOK_PORT:-8888}:8888"
- "${SPARK_UI_PORT:-8080}:8080"
trino:
image: trinodb/trino:472
hostname: trino
profiles: [analytics]
depends_on:
minio:
condition: service_healthy
ports:
- "${TRINO_PORT:-8090}:8080"
volumes:
- ./config/trino-catalog:/etc/trino/catalog