Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/authdata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"accounts": [{
"name": "bart",
"arn": "aws::iam:123456789012:root",
"canonicalID": "79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be",
"displayName": "bart",
"keys": {
"access": "accessKey1",
"secret": "verySecretKey1"
}
}, {
"name": "lisa",
"arn": "aws::iam:123456789013:root",
"canonicalID": "79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2bf",
"displayName": "lisa",
"keys": {
"access": "accessKey2",
"secret": "verySecretKey2"
}
}]
}
20 changes: 0 additions & 20 deletions .github/docker-compose.cloudserver-metadata.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/docker-compose.cloudserver-mongo.yml

This file was deleted.

270 changes: 270 additions & 0 deletions .github/docker-compose.yml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All this new setup is just to be able to run backbeat api server. I don't particularly like it, most of it is copied from backbeat actions, and it's very long considering it's just for testing (and the tests aren't even thorough as you'll see). But it couldn't find anything else simplier

Original file line number Diff line number Diff line change
@@ -0,0 +1,270 @@
services:
# ===================
# MongoDB (base)
# ===================
mongodb:
image: mongo:5.0
platform: linux/amd64
command: --replSet rs0 --port 27018 --bind_ip_all
ports:
- "127.0.0.1:27018:27018"
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh --port 27018 --quiet
interval: 5s
timeout: 10s
retries: 5
start_period: 10s
profiles:
- mongo
- backbeat

mongodb-init:
image: mongo:5.0
platform: linux/amd64
depends_on:
mongodb:
condition: service_healthy
command: >
mongosh --host mongodb:27018 --eval
'rs.initiate({_id: "rs0", members: [{_id: 0, host: "mongodb:27018"}]})'
restart: "no"
profiles:
- mongo
- backbeat

# ===================
# Cloudserver with MongoDB backend
# ===================
cloudserver:
image: ghcr.io/scality/cloudserver:9.3.0-preview.1
platform: linux/amd64
ports:
- "127.0.0.1:8000:8000"
environment:
- S3VAULT=mem
- S3METADATA=mongodb
- S3DATA=mem
- MONGODB_HOSTS=mongodb:27018
- MONGODB_RS=rs0
- REMOTE_MANAGEMENT_DISABLE=true
- LOG_LEVEL=info
depends_on:
mongodb-init:
condition: service_completed_successfully
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
interval: 5s
timeout: 5s
retries: 12
profiles:
- mongo

# ===================
# Cloudserver with MongoDB + Backbeat
# ===================
cloudserver-backbeat:
image: ghcr.io/scality/cloudserver:9.1.4
platform: linux/amd64
ports:
- "127.0.0.1:8000:8000"
environment:
- S3VAULT=mem
- S3METADATA=mongodb
- S3DATA=mem
- MONGODB_HOSTS=mongodb:27018
- MONGODB_RS=rs0
- REMOTE_MANAGEMENT_DISABLE=true
- LOG_LEVEL=info
- CRR_METRICS_HOST=backbeat-api
- CRR_METRICS_PORT=8900
depends_on:
mongodb-init:
condition: service_completed_successfully
backbeat-api:
condition: service_started
profiles:
- backbeat

# ===================
# Metadata backend services
# ===================
metadata-standalone:
image: ghcr.io/scality/metadata:8.11.0-standalone
platform: linux/amd64
network_mode: 'host'
volumes:
- ./md-config.json:/mnt/standalone_workdir/config.json:ro
profiles:
- metadata

cloudserver-metadata:
image: ghcr.io/scality/cloudserver:9.3.0-preview.1
platform: linux/amd64
network_mode: 'host'
environment:
- S3VAULT=mem
- S3METADATA=scality
- S3DATA=mem
- REMOTE_MANAGEMENT_DISABLE=true
- LOG_LEVEL=info
depends_on:
- metadata-standalone
profiles:
- metadata

# ===================
# Backbeat services
# ===================
zookeeper:
image: zookeeper:3.8
platform: linux/amd64
ports:
- "127.0.0.1:2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
profiles:
- backbeat

kafka:
image: confluentinc/cp-kafka:7.4.0
platform: linux/amd64
ports:
- "127.0.0.1:9092:9092"
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
depends_on:
- zookeeper
profiles:
- backbeat

redis:
image: redis:7-alpine
platform: linux/amd64
ports:
- "127.0.0.1:6379:6379"
profiles:
- backbeat

backbeat-api:
image: ghcr.io/scality/backbeat:9.1.3
platform: linux/amd64
ports:
- "127.0.0.1:8900:8900"
environment:
# Kafka configuration
KAFKA_HOSTS: kafka:9092
KAFKA_COMPRESSION_TYPE: snappy

# Zookeeper configuration
ZOOKEEPER_CONNECTION_STRING: zookeeper:2181/backbeat
ZOOKEEPER_AUTO_CREATE_NAMESPACE: "true"

# Redis configuration
REDIS_HOST: redis
REDIS_PORT: 6379

# MongoDB configuration
MONGODB_HOSTS: mongodb:27018
MONGODB_DATABASE: metadata

# Management backend
MANAGEMENT_BACKEND: operator
REMOTE_MANAGEMENT_DISABLE: "true"

# Cloudserver configuration
CLOUDSERVER_HOST: cloudserver-backbeat
CLOUDSERVER_PORT: 8000

# Replication source S3
EXTENSIONS_REPLICATION_SOURCE_S3_HOST: cloudserver-backbeat
EXTENSIONS_REPLICATION_SOURCE_S3_PORT: 8000
EXTENSIONS_REPLICATION_SOURCE_AUTH_TYPE: service
EXTENSIONS_REPLICATION_SOURCE_AUTH_ACCOUNT: service-replication

# Replication destination
EXTENSIONS_REPLICATION_DEST_AUTH_TYPE: service
EXTENSIONS_REPLICATION_DEST_AUTH_ACCOUNT: service-replication
EXTENSIONS_REPLICATION_DEST_BOOTSTRAPLIST: cloudserver-backbeat:8001
EXTENSIONS_REPLICATION_DEST_BOOTSTRAPLIST_MORE: '{"site": "wontwork-location", "type": "aws_s3"}, {"site": "aws-location", "type": "aws_s3"}'

# Lifecycle
EXTENSIONS_LIFECYCLE_AUTH_TYPE: service
EXTENSIONS_LIFECYCLE_AUTH_ACCOUNT: service-lifecycle

# Healthchecks
HEALTHCHECKS_ALLOWFROM: "0.0.0.0/0"

# Logging
LOG_LEVEL: info
depends_on:
mongodb-init:
condition: service_completed_successfully
kafka:
condition: service_started
redis:
condition: service_started
command: node bin/backbeat.js
profiles:
- backbeat

backbeat-queue-processor:
image: ghcr.io/scality/backbeat:9.1.3
platform: linux/amd64
ports:
- "127.0.0.1:4043:4043"
environment:
# Kafka configuration
KAFKA_HOSTS: kafka:9092
KAFKA_COMPRESSION_TYPE: snappy

# Zookeeper configuration
ZOOKEEPER_CONNECTION_STRING: zookeeper:2181/backbeat
ZOOKEEPER_AUTO_CREATE_NAMESPACE: "true"

# Redis configuration
REDIS_HOST: redis
REDIS_PORT: 6379

# MongoDB configuration
MONGODB_HOSTS: mongodb:27018
MONGODB_DATABASE: metadata

# Management backend
MANAGEMENT_BACKEND: operator
REMOTE_MANAGEMENT_DISABLE: "true"

# Cloudserver configuration
CLOUDSERVER_HOST: cloudserver-backbeat
CLOUDSERVER_PORT: 8000

# Replication source S3
EXTENSIONS_REPLICATION_SOURCE_S3_HOST: cloudserver-backbeat
EXTENSIONS_REPLICATION_SOURCE_S3_PORT: 8000
EXTENSIONS_REPLICATION_SOURCE_AUTH_TYPE: service
EXTENSIONS_REPLICATION_SOURCE_AUTH_ACCOUNT: service-replication

# Replication destination
EXTENSIONS_REPLICATION_DEST_AUTH_TYPE: service
EXTENSIONS_REPLICATION_DEST_AUTH_ACCOUNT: service-replication
EXTENSIONS_REPLICATION_DEST_BOOTSTRAPLIST: cloudserver-backbeat:8001
EXTENSIONS_REPLICATION_DEST_BOOTSTRAPLIST_MORE: '{"site": "wontwork-location", "type": "aws_s3"}, {"site": "aws-location", "type": "aws_s3"}'

# Probe server port
LIVENESS_PROBE_PORT: 4043

# Logging
LOG_LEVEL: info
depends_on:
mongodb-init:
condition: service_completed_successfully
cloudserver-backbeat:
condition: service_started
backbeat-api:
condition: service_started
command: node extensions/replication/queueProcessor/task.js
profiles:
- backbeat
Loading
Loading