-
Notifications
You must be signed in to change notification settings - Fork 68
Expand file tree
/
Copy pathcompose.yaml
More file actions
137 lines (124 loc) · 3.54 KB
/
compose.yaml
File metadata and controls
137 lines (124 loc) · 3.54 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
volumes:
rustfs_data:
azurite-data:
services:
rustfs:
container_name: icechunk_rustfs
image: rustfs/rustfs:1.0.0-alpha.85
hostname: rustfs
healthcheck:
test: curl 127.0.0.1:9000/health
interval: 1s
retries: 30
entrypoint: |
/bin/sh -c '
for bucket in testbucket
do
echo creating bucket "$$bucket";
mkdir -p /data/"$$bucket"
done;
rustfs --access-key minio123 --secret-key minio123 --console-enable /data
'
volumes:
- rustfs_data:/data
ports:
- '9000:9000'
- '9001:9001'
rustfs_init:
container_name: icechunk_rustfs_init
image: rustfs/rc:v0.1.4
restart: "no"
depends_on:
rustfs:
condition: service_healthy
restart: true
entrypoint:
- /bin/sh
- '-c'
- |
set -ex
rc alias set local http://rustfs:9000 minio123 minio123
rc admin user add local readonly basicuser
echo '{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowGetObjectOnly",
"Effect": "Allow",
"Principal": { "AWS": ["readonly"] },
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::testbucket",
"arn:aws:s3:::testbucket/*"
]
}
]
}' > policy.json
rc admin policy create local readonly policy.json
rc admin policy attach local --user readonly readonly
rc admin user add local modify modifydata
echo '{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowToModify",
"Effect": "Allow",
"Principal": { "AWS": ["modify"] },
"Action": [
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:ListBucket"
],
"Resource": [
"arn:aws:s3:::testbucket",
"arn:aws:s3:::testbucket/*"
]
}
]
}' > policy.json
rc admin policy create local modify policy.json
rc admin policy attach local --user modify modify
exit 0
toxiproxy:
container_name: icechunk_toxiproxy
image: ghcr.io/shopify/toxiproxy
ports:
- '8474:8474'
- '9002:9002'
- '9003:9003'
azurite:
image: mcr.microsoft.com/azure-storage/azurite:3.33.0
container_name: azurite
hostname: azurite
healthcheck:
test: nc 127.0.0.1 10000 -z
interval: 1s
retries: 30
command: azurite --silent --blobHost 0.0.0.0 --queueHost 0.0.0.0 --tableHost 0.0.0.0 -l /workspace
ports:
- "10000:10000" # Blob
- "10001:10001" # Queue
- "10002:10002" # Table
volumes:
- azurite-data:/workspace
azurite-init:
image: mcr.microsoft.com/azure-storage/azurite:3.33.0
container_name: azurite_init
restart: "no"
depends_on:
azurite:
condition: service_healthy
restart: true
entrypoint: |
/bin/sh -c '
apk add --no-cache curl
for _ in {1..10}; do
if curl --silent --fail -XPUT "http://azurite:10000/devstoreaccount1/testcontainer?sv=2023-01-03&ss=btqf&srt=sco&spr=https%2Chttp&st=2025-01-06T14%3A53%3A30Z&se=2035-01-07T14%3A53%3A00Z&sp=rwdftlacup&sig=jclETGilOzONYp4Y0iK9SpVRLGyehaS5lg5booJ9VYA%3D&restype=container"; then
break
fi
sleep 1
done
'