-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
256 lines (243 loc) · 6.8 KB
/
docker-compose.yml
File metadata and controls
256 lines (243 loc) · 6.8 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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
include:
- docker-compose-airflow.yml
x-common-environment: &common-environment
AWS_ACCESS_KEY_ID: admin
AWS_SECRET_ACCESS_KEY: password
AWS_REGION: us-east-1
services:
# Redpanda was changed to Confluent cloud platform
# Redpanda cluster
# redpanda-1:
# image: redpandadata/redpanda:v24.3.8
# container_name: redpanda-1
# command:
# - redpanda
# - start
# - --smp
# - '1'
# - --reserve-memory
# - 0M
# - --overprovisioned
# - --node-id
# - '1'
# - --kafka-addr
# - PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
# - --advertise-kafka-addr
# - PLAINTEXT://redpanda-1:29092,OUTSIDE://localhost:9092
# - --pandaproxy-addr
# - PLAINTEXT://0.0.0.0:28082,OUTSIDE://0.0.0.0:8082
# - --advertise-pandaproxy-addr
# - PLAINTEXT://redpanda-1:28082,OUTSIDE://localhost:8082
# - --rpc-addr
# - 0.0.0.0:33145
# - --advertise-rpc-addr
# - redpanda-1:33145
# ports:
# # - 8081:8081
# - 8082:8082
# - 9092:9092
# - 9644:9644
# - 28082:28082
# - 29092:29092
# healthcheck:
# test: ["CMD-SHELL", "rpk cluster health | grep -q 'Healthy:.*true' || exit 1"]
# interval: 10s
# timeout: 5s
# retries: 5
# start_period: 30s
#
# redpanda-console:
# image: redpandadata/console:v2.8.4
# container_name: redpanda-console
# entrypoint: /bin/sh
# command: -c "echo \"$$CONSOLE_CONFIG_FILE\" > /tmp/config.yml; /app/console"
# environment:
# CONFIG_FILEPATH: /tmp/config.yml
# CONSOLE_CONFIG_FILE: |
# kafka:
# brokers: ["redpanda-1:29092"]
# schemaRegistry:
# enabled: false
# redpanda:
# adminApi:
# enabled: true
# urls: ["http://redpanda-1:9644"]
# connect:
# enabled: false
# ports:
# - 8084:8080
# depends_on:
# - redpanda-1
#
#
## Create topics
# redpanda-init:
# image: redpandadata/redpanda:v24.3.8
# container_name: redpanda-init
# depends_on:
# - redpanda-console
# entrypoint: ["/bin/bash","-c"]
# environment:
# RPK_BROKERS: redpanda-1:29092
# command: |
# "
# rpk topic create raw_ticks
# for i in m1 m5 m10 m15 m30 h1 h3 h4 D1 W1 M1; do echo "$$i"; rpk topic create "candle_$$i"; done;
# "
# Mock S3 service using MinIO
minio:
image: minio/minio:RELEASE.2025-04-08T15-41-24Z
container_name: minio
# networks:
# iceberg_net:
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: admin
MINIO_ROOT_PASSWORD: password
# MINIO_DOMAIN: minio
volumes:
- ./minio-data:/data
command: server /data --console-address ":9001"
minio-mc:
image: minio/mc:latest
# networks:
# iceberg_net:
depends_on:
- minio
environment:
<<: *common-environment
entrypoint: ["/bin/sh", "-c"]
command: |
"
until (/usr/bin/mc config host add minio http://minio:9000 admin password) do echo '...waiting...' && sleep 1; done;
/usr/bin/mc mb minio/stocks-warehouse;
/usr/bin/mc policy set public minio/stocks-warehouse;
tail -f /dev/null
"
# REST catalog for Iceberg
iceberg-rest:
image: tabulario/iceberg-rest:1.6.0
container_name: rest
# networks:
# iceberg_net:
depends_on:
- minio
ports:
- "8181:8181"
environment:
<<: *common-environment
CATALOG_WAREHOUSE: s3://stocks-warehouse/
CATALOG_IO__IMPL: org.apache.iceberg.aws.s3.S3FileIO
CATALOG_S3_ENDPOINT: http://minio:9000
CATALOG_S3__ENDPOINT: http://minio:9000
CATALOG_S3_PATH__STYLE__ACCESS: true
AWS_S3_PATH_STYLE_ACCESS: true
# CATALOG_URI: jdbc:postgresql://postgres/demo_catalog
# CATALOG_JDBC_USER: admin
# CATALOG_JDBC_PASSWORD: password
trino-coordinator:
image: trinodb/trino:474
container_name: trino-coordinator
# networks:
# iceberg_net:
environment:
<<: *common-environment
TRINO_CONF_PATH: /etc/trino
ports:
- "8090:8080"
deploy:
resources:
limits:
memory: 4G
reservations:
memory: 2G
volumes:
- ./trino/etc:/etc/trino:rw
# environment:
# - JAVA_HOME=/usr/lib/jvm/zulu11
# command: ["bash", "-c", "java -version && /usr/lib/trino/bin/run-trino"]
depends_on:
# - redpanda-1
- minio
- iceberg-rest
# Prometheus for metrics collection
prometheus:
image: prom/prometheus:v2.45.0
container_name: prometheus
# networks:
# iceberg_net:
ports:
- "9090:9090"
volumes:
- ./prometheus:/etc/prometheus
- prometheus_data:/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
- '--web.console.templates=/etc/prometheus/consoles'
- '--web.enable-lifecycle'
depends_on:
- trino-coordinator
# Grafana for visualization
grafana:
image: grafana/grafana:10.2.0
container_name: grafana
# networks:
# iceberg_net:
ports:
- "3000:3000"
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
- ./grafana/dashboards:/var/lib/grafana/dashboards
- grafana_data:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
- GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=trino-datasource
depends_on:
- prometheus
spark:
image: tabulario/spark-iceberg:latest
container_name: spark
# networks:
# iceberg_net:
ports:
- 8888:8888
- 8083:8080
- 10000:10000
- 10001:10001
depends_on:
- iceberg-rest
- minio
environment:
<<: *common-environment
stdin_open: true
tty: true
command: >
spark-sql
--conf spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
--conf spark.sql.catalog.demo=org.apache.iceberg.spark.SparkCatalog
--conf spark.sql.catalog.demo.type=rest
--conf spark.sql.catalog.demo.uri=http://rest:8181
--conf spark.sql.catalog.demo.io-impl=org.apache.iceberg.aws.s3.S3FileIO
--conf spark.sql.catalog.demo.warehouse=s3://stocks-warehouse/
--conf spark.sql.catalog.demo.s3.endpoint=http://minio:9000
--conf spark.sql.defaultCatalog=demo
--conf spark.eventLog.enabled=true
--conf spark.eventLog.dir=/home/iceberg/spark-events
--conf spark.history.fs.logDirectory=/home/iceberg/spark-events
--conf spark.sql.catalogImplementation=in-memory
volumes:
minio-data:
prometheus_data:
grafana_data:
#networks:
# iceberg_net:
#networks:
# default:
# name: trino-network
## external: true