Skip to content
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

Ingest storage local dev env: configure Mimir components to start after Kafka is healthy #7153

Merged
merged 1 commit into from
Jan 17, 2024
Merged
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
12 changes: 11 additions & 1 deletion development/mimir-ingest-storage/docker-compose.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,13 @@ std.manifestYamlDoc({
ports: [
'29092:29092',
],
healthcheck: {
test: 'nc -z localhost 9092 || exit -1',
start_period: '1s',
interval: '1s',
timeout: '1s',
retries: '30',
},
},
},

Expand Down Expand Up @@ -164,7 +171,10 @@ std.manifestYamlDoc({
name: error 'missing name',
target: error 'missing target',
publishedHttpPort: error 'missing publishedHttpPort',
dependsOn: ['minio', 'kafka'],
dependsOn: {
minio: { condition: 'service_started' },
kafka: { condition: 'service_healthy' },
},
env: {},
extraVolumes: [],
memberlistBindPort: self.publishedHttpPort + 2000,
Expand Down
48 changes: 34 additions & 14 deletions development/mimir-ingest-storage/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
- "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT,ORBSTACK:PLAINTEXT"
- "KAFKA_INTER_BROKER_LISTENER_NAME=PLAINTEXT"
- "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1"
"healthcheck":
"interval": "1s"
"retries": "30"
"start_period": "1s"
"test": "nc -z localhost 9092 || exit -1"
"timeout": "1s"
"image": "confluentinc/cp-kafka:latest"
"ports":
- "29092:29092"
Expand All @@ -46,8 +52,10 @@
- "-target=backend"
- "-activity-tracker.filepath=/activity/mimir-backend-1"
"depends_on":
- "minio"
- "kafka"
"kafka":
"condition": "service_healthy"
"minio":
"condition": "service_started"
"environment": []
"hostname": "mimir-backend-1"
"image": "mimir"
Expand All @@ -66,8 +74,10 @@
- "-target=backend"
- "-activity-tracker.filepath=/activity/mimir-backend-2"
"depends_on":
- "minio"
- "kafka"
"kafka":
"condition": "service_healthy"
"minio":
"condition": "service_started"
"environment": []
"hostname": "mimir-backend-2"
"image": "mimir"
Expand All @@ -86,8 +96,10 @@
- "-target=read"
- "-activity-tracker.filepath=/activity/mimir-read-1"
"depends_on":
- "minio"
- "kafka"
"kafka":
"condition": "service_healthy"
"minio":
"condition": "service_started"
"environment": []
"hostname": "mimir-read-1"
"image": "mimir"
Expand All @@ -106,8 +118,10 @@
- "-target=read"
- "-activity-tracker.filepath=/activity/mimir-read-2"
"depends_on":
- "minio"
- "kafka"
"kafka":
"condition": "service_healthy"
"minio":
"condition": "service_started"
"environment": []
"hostname": "mimir-read-2"
"image": "mimir"
Expand All @@ -126,8 +140,10 @@
- "-target=write"
- "-activity-tracker.filepath=/activity/mimir-write-1"
"depends_on":
- "minio"
- "kafka"
"kafka":
"condition": "service_healthy"
"minio":
"condition": "service_started"
"environment": []
"hostname": "mimir-write-1"
"image": "mimir"
Expand All @@ -147,8 +163,10 @@
- "-target=write"
- "-activity-tracker.filepath=/activity/mimir-write-2"
"depends_on":
- "minio"
- "kafka"
"kafka":
"condition": "service_healthy"
"minio":
"condition": "service_started"
"environment": []
"hostname": "mimir-write-2"
"image": "mimir"
Expand All @@ -168,8 +186,10 @@
- "-target=write"
- "-activity-tracker.filepath=/activity/mimir-write-3"
"depends_on":
- "minio"
- "kafka"
"kafka":
"condition": "service_healthy"
"minio":
"condition": "service_started"
"environment": []
"hostname": "mimir-write-3"
"image": "mimir"
Expand Down
Loading