Repository navigation
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
222 lines (205 loc) · 7.22 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
222 lines (205 loc) · 7.22 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-lakekeeper-image: &lakekeeper-image
image: ${LAKEKEEPER__SERVER_IMAGE:-quay.io/lakekeeper/catalog:latest-main}
x-lakekeeper-environment: &lakekeeper-environment
- LAKEKEEPER__PG_ENCRYPTION_KEY=This-is-NOT-Secure!
- LAKEKEEPER__PG_DATABASE_URL_READ=postgresql://postgres:postgres@lakekeeper-db:5432/postgres
- LAKEKEEPER__PG_DATABASE_URL_WRITE=postgresql://postgres:postgres@lakekeeper-db:5432/postgres
- LAKEKEEPER__AUTHZ_BACKEND=allowall
# Externally taken from environment variables if set
- LAKEKEEPER__OPENID_PROVIDER_URI
- LAKEKEEPER__OPENID_AUDIENCE
- LAKEKEEPER__OPENID_ADDITIONAL_ISSUERS
- LAKEKEEPER__UI__OPENID_CLIENT_ID
- LAKEKEEPER__UI__OPENID_SCOPE
services:
minio:
image: "quay.io/minio/minio:latest"
command:
- server
- "--address"
- "0.0.0.0:9301"
- "--console-address"
- "0.0.0.0:9400"
- /data
ports:
- "9301:9301"
- "9400:9400"
volumes:
- "minio:/data"
entrypoint: "
/bin/sh -c 'mkdir -p \"/data/iceberg\" && mkdir -p \"/data/hummock001\"
/usr/bin/docker-entrypoint.sh \"$$0\" \"$$@\"
'"
environment:
MINIO_CI_CD: "1"
MINIO_ROOT_PASSWORD: minioadmin
MINIO_ROOT_USER: minioadmin
MINIO_DOMAIN: minio
postgres:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
command:
- postgres
- -c
- wal_level=logical
- -c
- max_replication_slots=10
- -c
- max_wal_senders=10
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
rw-svc:
image: risingwavelabs/risingwave:v2.6.2
ports:
- 4566:4566
- 5690:5690
- 5691:5691
- 1250:1250
command: "standalone --meta-opts=\" \
--listen-addr 0.0.0.0:5690 \
--advertise-addr rw-svc:5690 \
--dashboard-host 0.0.0.0:5691 \
--prometheus-host 0.0.0.0:1250 \
--backend sql \
--sql-endpoint postgres://postgres:postgres@postgres:5432/postgres \
--state-store hummock+minio://minioadmin:minioadmin@minio:9301/hummock001 \
--data-directory hummock_001\" \
--compute-opts=\" \
--listen-addr 0.0.0.0:5688 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr rw-svc:5688 \
--async-stack-trace verbose \
--parallelism 4 \
--total-memory-bytes 2147483648 \
--role both \
--meta-address http://0.0.0.0:5690\" \
--frontend-opts=\" \
--listen-addr 0.0.0.0:4566 \
--advertise-addr rw-svc:4566 \
--prometheus-listener-addr 0.0.0.0:1250 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690 \
--frontend-total-memory-bytes=500000000\" \
--compactor-opts=\" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr rw-svc:6660 \
--meta-address http://0.0.0.0:5690 \
--compactor-total-memory-bytes=1000000000\""
# Lakekeeper Services
lakekeeper:
<<: *lakekeeper-image
pull_policy: always
environment: *lakekeeper-environment
command: [ "serve" ]
healthcheck:
test: [ "CMD", "/home/nonroot/lakekeeper", "healthcheck" ]
interval: 1s
timeout: 10s
retries: 3
start_period: 3s
depends_on:
lakekeeper-migrate:
condition: service_completed_successfully
ports:
- "8181:8181"
lakekeeper-bootstrap:
image: alpine:3.20
restart: "no"
depends_on:
lakekeeper:
condition: service_healthy
command: |
sh -lc '
set -e
apk add --no-cache curl >/dev/null
echo "Waiting for Lakekeeper to be ready..."
sleep 5
echo "Bootstrapping Lakekeeper..."
for attempt in 1 2 3 4 5; do
http=$$(curl -s -o /tmp/bootstrap.json -w "%{http_code}" -X POST \
-H "Content-Type: application/json" \
-d "{\"accept-terms-of-use\": true}" \
http://lakekeeper:8181/management/v1/bootstrap)
case "$$http" in
200|201) echo "✓ Successfully bootstrapped Lakekeeper!"; break ;;
400|409) echo "✓ Already bootstrapped or conflict; continuing..."; break ;;
*) echo "Bootstrap attempt $$attempt failed (HTTP $$http)"; \
[ $$attempt -eq 5 ] && { cat /tmp/bootstrap.json 2>/dev/null || true; exit 1; }; \
sleep $$((2 ** attempt)) ;;
esac
done
echo "Creating warehouse risingwave-warehouse..."
sleep 2
for attempt in 1 2 3 4 5; do
http=$$(curl -s -o /tmp/warehouse.json -w "%{http_code}" -X POST \
-H "Content-Type: application/json" \
-d "{
\"warehouse-name\": \"risingwave-warehouse\",
\"delete-profile\": { \"type\": \"hard\" },
\"storage-credential\": {
\"type\": \"s3\",
\"credential-type\": \"access-key\",
\"aws-access-key-id\": \"minioadmin\",
\"aws-secret-access-key\": \"minioadmin\"
},
\"storage-profile\": {
\"type\": \"s3\",
\"bucket\": \"iceberg\",
\"region\": \"us-east-1\",
\"flavor\": \"s3-compat\",
\"endpoint\": \"http://minio:9301\",
\"path-style-access\": true,
\"sts-enabled\": false,
\"key-prefix\": \"risingwave-lakekeeper\"
}
}" \
http://lakekeeper:8181/management/v1/warehouse)
case "$$http" in
200|201) echo "✓ Successfully created warehouse!"; break ;;
400|409) echo "✓ Warehouse already exists/overlaps; continuing..."; break ;;
*) echo "Warehouse creation attempt $$attempt failed (HTTP $$http)"; \
[ $$attempt -eq 5 ] && { cat /tmp/warehouse.json 2>/dev/null || true; exit 1; }; \
sleep $$((2 ** attempt)) ;;
esac
done
echo "🎉 Lakekeeper setup completed successfully!"
echo "Lakekeeper is ready with warehouse: risingwave-warehouse"
'
lakekeeper-migrate:
<<: *lakekeeper-image
pull_policy: always
environment: *lakekeeper-environment
restart: "no"
command: [ "migrate" ]
depends_on:
lakekeeper-db:
condition: service_healthy
lakekeeper-db:
image: "postgres:16-alpine"
environment:
- POSTGRES_PASSWORD=postgres
- PGDATA=/var/lib/postgresql/data/pgdata
expose:
- "5432"
ports:
- "8433:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -p 5432 -d postgres" ]
interval: 2s
timeout: 10s
retries: 2
start_period: 10s
restart: always
volumes:
- "lakekeeper-db:/var/lib/postgresql/data/pgdata"
volumes:
minio:
pgdata:
data-store:
lakekeeper-db: