Skip to content

Commit 0402f21

Browse files
add test pipeline
ISSUE: CLDSRVCLT-2x
1 parent b424f76 commit 0402f21

File tree

4 files changed

+118
-0
lines changed

4 files changed

+118
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
set -e
3+
4+
PORT=$1
5+
TIMEOUT=${2:-30}
6+
7+
echo "Waiting for port $PORT to be ready (timeout: ${TIMEOUT}s)..."
8+
9+
for i in $(seq 1 $TIMEOUT); do
10+
if nc -z localhost $PORT 2>/dev/null; then
11+
echo "Port $PORT is ready!"
12+
exit 0
13+
fi
14+
echo "Attempt $i/$TIMEOUT: Port $PORT not ready yet..."
15+
sleep 1
16+
done
17+
18+
echo "ERROR: Port $PORT did not become ready within ${TIMEOUT}s"
19+
exit 1
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
services:
2+
metadata-standalone:
3+
image: ghcr.io/scality/metadata:8.11.0-standalone
4+
platform: linux/amd64
5+
network_mode: 'host'
6+
volumes:
7+
- ./md-config.json:/mnt/standalone_workdir/config.json:ro
8+
9+
cloudserver-metadata:
10+
image: ghcr.io/scality/cloudserver:9.1.4
11+
platform: linux/amd64
12+
network_mode: 'host'
13+
environment:
14+
- S3VAULT=mem
15+
- S3METADATA=scality
16+
- S3DATA=mem
17+
- REMOTE_MANAGEMENT_DISABLE=true
18+
- SCALITY_ACCESS_KEY_ID=accessKey1
19+
- SCALITY_SECRET_ACCESS_KEY=verySecretKey1
20+
- LOG_LEVEL=info
21+
depends_on:
22+
- metadata-standalone
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
services:
2+
mongodb:
3+
image: mongo:5.0
4+
platform: linux/amd64
5+
command: --replSet rs0 --port 27018 --bind_ip_all
6+
ports:
7+
- "27018:27018"
8+
healthcheck:
9+
test: echo 'db.runCommand("ping").ok' | mongosh --port 27018 --quiet
10+
interval: 5s
11+
timeout: 10s
12+
retries: 5
13+
start_period: 10s
14+
15+
mongo-init:
16+
image: mongo:5.0
17+
platform: linux/amd64
18+
depends_on:
19+
mongodb:
20+
condition: service_healthy
21+
command: >
22+
mongosh --host mongodb:27018 --eval
23+
'rs.initiate({_id: "rs0", members: [{_id: 0, host: "mongodb:27018"}]})'
24+
restart: "no"
25+
26+
cloudserver:
27+
image: ghcr.io/scality/cloudserver:9.1.4
28+
platform: linux/amd64
29+
ports:
30+
- "8000:8000"
31+
environment:
32+
- S3VAULT=mem
33+
- S3METADATA=mongodb
34+
- S3DATA=mem
35+
- MONGODB_HOSTS=mongodb:27018
36+
- MONGODB_RS=rs0
37+
- REMOTE_MANAGEMENT_DISABLE=true
38+
- SCALITY_ACCESS_KEY_ID=accessKey1
39+
- SCALITY_SECRET_ACCESS_KEY=verySecretKey1
40+
- LOG_LEVEL=info
41+
depends_on:
42+
mongo-init:
43+
condition: service_completed_successfully
44+
healthcheck:
45+
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
46+
interval: 5s
47+
timeout: 5s
48+
retries: 12

md-config.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"raftSessions": 1,
3+
"raftMembers": 5,
4+
"bucketdCount": 1,
5+
"bucketdWorkers": 1,
6+
"basePorts": {
7+
"bucketd": 9000,
8+
"repd": 4200,
9+
"repdAdmin": 4250
10+
},
11+
"logLevel": "info",
12+
"env": {
13+
"METADATA_NEW_BUCKETS_VFORMAT": "v0",
14+
"S3_VERSION_ID_ENCODING_TYPE":"hex"
15+
},
16+
"migration": {
17+
"deploy": false,
18+
"raftSessions": 0,
19+
"raftMembers": 5,
20+
"bucketdCount": 1,
21+
"bucketdWorkers": 1,
22+
"basePorts": {
23+
"bucketd": 9001,
24+
"repd": 4700,
25+
"repdAdmin": 4750
26+
},
27+
"logLevel": "info"
28+
}
29+
}

0 commit comments

Comments
 (0)