-
Notifications
You must be signed in to change notification settings - Fork 0
Add backbeat route apis #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SylvainSenechal
wants to merge
3
commits into
development/1.0
Choose a base branch
from
improvement/CLDSRVCLT-5
base: development/1.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+986
−73
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } | ||
| }] | ||
| } |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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