forked from ferrosadb/ferrosa-memory
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
199 lines (192 loc) · 6.19 KB
/
Copy pathdocker-compose.test.yml
File metadata and controls
199 lines (192 loc) · 6.19 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
# ferrosa-memory-mcp ISOLATED test cluster
# 3-node Ferrosa cluster on +500 port offset, separate data volumes.
# Runs alongside the dev cluster without collision.
#
# Usage:
# scripts/start-test-cluster.sh
# FERROSA_TEST_CQL_PORT=19542 cargo test --features live-cql
# scripts/stop-test-cluster.sh
#
# Ports (dev + 500):
# 19542-19544 CQL (node1-3)
# 18187-18189 Bolt/Cypher (node1-3)
# 17974-17976 Graph HTTP (node1-3)
# 19590-19592 Web console (node1-3)
# 19500-19501 MinIO S3 + console
#
# Data volumes live under ~/data/ferrosa-memory-test/ — completely
# separate from the dev cluster at ~/data/ferrosa-memory/.
services:
# --- S3-compatible object storage for tests ---
minio-test:
image: minio/minio:latest
container_name: ferrosa-memory-minio-test
ports:
- "19500:9000"
- "19501:9001"
environment:
MINIO_ROOT_USER: minioadmin
MINIO_ROOT_PASSWORD: minioadmin # pragma: allowlist secret
volumes:
- ~/data/ferrosa-memory-test/minio:/data
command: server /data --console-address ":9001"
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:9000/minio/health/live"]
interval: 5s
timeout: 5s
retries: 10
start_period: 10s
minio-test-init:
image: minio/mc
depends_on:
minio-test:
condition: service_healthy
entrypoint: >
sh -c "mc alias set local http://minio-test:9000 minioadmin minioadmin &&
mc mb local/ferrosa-memory-test --ignore-existing &&
echo 'test bucket created'"
restart: "no"
# --- 3-node Ferrosa test cluster ---
node1-test:
image: ferrosa-memory-node
container_name: ferrosa-memory-node1-test
stop_grace_period: 35s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
depends_on:
minio-test-init:
condition: service_completed_successfully
ports:
- "19542:9042"
- "17974:7474"
- "18187:7687"
- "19590:9090"
- "18580:8080"
environment:
FERROSA_HOST_ID: "91111111-1111-1111-1111-111111111111"
FERROSA_DATA_DIR: /var/lib/ferrosa
FERROSA_AUTH_DISABLED: "true"
FERROSA_CQL_BIND: "0.0.0.0:9042"
FERROSA_CQL_BROADCAST: "127.0.0.1:19542"
FERROSA_WEB_BIND: "0.0.0.0:9090"
FERROSA_GRAPH_ENABLED: "true"
FERROSA_SPARQL_ENABLED: "true"
FERROSA_SPARQL_BIND: "0.0.0.0:8080"
FERROSA_CLUSTER_NAME: ferrosa-memory-test
FERROSA_CLUSTER_MODE: standalone
FERROSA_INTERNODE_BIND: "0.0.0.0:7000"
FERROSA_INTERNODE_BROADCAST: "node1-test:7000"
FERROSA_S3_ENDPOINT: "http://minio-test:9000"
FERROSA_S3_BUCKET: ferrosa-memory-test
FERROSA_S3_REGION: us-east-1
FERROSA_S3_ALLOW_HTTP: "true"
FERROSA_S3_ACCESS_KEY_ID: minioadmin
FERROSA_S3_SECRET_ACCESS_KEY: minioadmin # pragma: allowlist secret
FERROSA_S3_PREFIX: node1
volumes:
- ~/data/ferrosa-memory-test/node1:/var/lib/ferrosa
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/127.0.0.1/9042' || exit 1"]
interval: 5s
timeout: 5s
retries: 30
start_period: 15s
node2-test:
image: ferrosa-memory-node
container_name: ferrosa-memory-node2-test
stop_grace_period: 35s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
depends_on:
node1-test:
condition: service_healthy
ports:
- "19543:9042"
- "17975:7474"
- "18188:7687"
- "19591:9090"
environment:
FERROSA_HOST_ID: "92222222-2222-2222-2222-222222222222"
FERROSA_DATA_DIR: /var/lib/ferrosa
FERROSA_AUTH_DISABLED: "true"
FERROSA_CQL_BIND: "0.0.0.0:9042"
FERROSA_CQL_BROADCAST: "127.0.0.1:19543"
FERROSA_WEB_BIND: "0.0.0.0:9090"
FERROSA_GRAPH_ENABLED: "true"
FERROSA_SPARQL_ENABLED: "true"
FERROSA_SPARQL_BIND: "0.0.0.0:8080"
FERROSA_CLUSTER_NAME: ferrosa-memory-test
FERROSA_CLUSTER_MODE: pair
FERROSA_SEED: "node1-test:7000"
FERROSA_INTERNODE_BIND: "0.0.0.0:7000"
FERROSA_INTERNODE_BROADCAST: "node2-test:7000"
FERROSA_S3_ENDPOINT: "http://minio-test:9000"
FERROSA_S3_BUCKET: ferrosa-memory-test
FERROSA_S3_REGION: us-east-1
FERROSA_S3_ALLOW_HTTP: "true"
FERROSA_S3_ACCESS_KEY_ID: minioadmin
FERROSA_S3_SECRET_ACCESS_KEY: minioadmin # pragma: allowlist secret
FERROSA_S3_PREFIX: node2
volumes:
- ~/data/ferrosa-memory-test/node2:/var/lib/ferrosa
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/127.0.0.1/9042' || exit 1"]
interval: 5s
timeout: 5s
retries: 30
start_period: 15s
node3-test:
image: ferrosa-memory-node
container_name: ferrosa-memory-node3-test
stop_grace_period: 35s
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
depends_on:
node1-test:
condition: service_healthy
node2-test:
condition: service_healthy
ports:
- "19544:9042"
- "17976:7474"
- "18189:7687"
- "19592:9090"
environment:
FERROSA_HOST_ID: "93333333-3333-3333-3333-333333333333"
FERROSA_DATA_DIR: /var/lib/ferrosa
FERROSA_AUTH_DISABLED: "true"
FERROSA_CQL_BIND: "0.0.0.0:9042"
FERROSA_CQL_BROADCAST: "127.0.0.1:19544"
FERROSA_WEB_BIND: "0.0.0.0:9090"
FERROSA_GRAPH_ENABLED: "true"
FERROSA_SPARQL_ENABLED: "true"
FERROSA_SPARQL_BIND: "0.0.0.0:8080"
FERROSA_CLUSTER_NAME: ferrosa-memory-test
FERROSA_CLUSTER_MODE: cluster
FERROSA_SEED: "node1-test:7000"
FERROSA_INTERNODE_BIND: "0.0.0.0:7000"
FERROSA_INTERNODE_BROADCAST: "node3-test:7000"
FERROSA_S3_ENDPOINT: "http://minio-test:9000"
FERROSA_S3_BUCKET: ferrosa-memory-test
FERROSA_S3_REGION: us-east-1
FERROSA_S3_ALLOW_HTTP: "true"
FERROSA_S3_ACCESS_KEY_ID: minioadmin
FERROSA_S3_SECRET_ACCESS_KEY: minioadmin # pragma: allowlist secret
FERROSA_S3_PREFIX: node3
volumes:
- ~/data/ferrosa-memory-test/node3:/var/lib/ferrosa
healthcheck:
test: ["CMD-SHELL", "bash -c '</dev/tcp/127.0.0.1/9042' || exit 1"]
interval: 5s
timeout: 5s
retries: 30
start_period: 15s