Skip to content

fix: wait for healthy services #1183

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

Merged
merged 4 commits into from
Feb 12, 2025
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
2 changes: 2 additions & 0 deletions Dockerfile.debug
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ RUN cargo build
# final stage
FROM docker.io/debian:bookworm-slim

RUN apt update && apt install -y curl

WORKDIR /parseable

# Copy the static binary into the final image
Expand Down
18 changes: 12 additions & 6 deletions docker-compose-distributed-test-with-kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ services:
volumes:
- ./parseable-ingest-haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
depends_on:
- parseable-ingest-one
- parseable-ingest-two
parseable-ingest-one:
condition: service_healthy
parseable-ingest-two:
condition: service_healthy
networks:
- parseable-internal
healthcheck:
Expand Down Expand Up @@ -55,7 +57,7 @@ services:
parseable-query:
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.debug
platform: linux/amd64
command: [ "parseable", "s3-store" ]
ports:
Expand All @@ -72,6 +74,7 @@ services:
- P_CHECK_UPDATE=false
- P_PARQUET_COMPRESSION_ALGO=snappy
- P_MODE=query
- RUST_LOG=warn
networks:
- parseable-internal
healthcheck:
Expand Down Expand Up @@ -210,9 +213,12 @@ services:
networks:
- parseable-internal
depends_on:
- parseable-query
- parseable-ingest-haproxy
- minio
parseable-query:
condition: service_healthy
parseable-ingest-haproxy:
condition: service_healthy
minio:
condition: service_healthy
deploy:
restart_policy:
condition: on-failure
Expand Down
24 changes: 16 additions & 8 deletions docker-compose-distributed-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ services:
parseable-query:
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.debug
platform: linux/amd64
command: [ "parseable", "s3-store" ]
ports:
Expand All @@ -45,6 +45,7 @@ services:
- P_CHECK_UPDATE=false
- P_PARQUET_COMPRESSION_ALGO=snappy
- P_MODE=query
- RUST_LOG=warn
networks:
- parseable-internal
healthcheck:
Expand All @@ -53,7 +54,8 @@ services:
timeout: 20s
retries: 5
depends_on:
- minio
minio:
condition: service_healthy
deploy:
restart_policy:
condition: on-failure
Expand All @@ -63,7 +65,7 @@ services:
parseable-ingest-one:
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.debug
platform: linux/amd64
command: [ "parseable", "s3-store", ]
ports:
Expand All @@ -81,6 +83,7 @@ services:
- P_PARQUET_COMPRESSION_ALGO=snappy
- P_MODE=ingest
- P_INGESTOR_ENDPOINT=parseable-ingest-one:8000
- RUST_LOG=warn
networks:
- parseable-internal
healthcheck:
Expand All @@ -89,8 +92,10 @@ services:
timeout: 20s
retries: 5
depends_on:
- parseable-query
- minio
parseable-query:
condition: service_healthy
minio:
condition: service_healthy
deploy:
restart_policy:
condition: on-failure
Expand Down Expand Up @@ -121,9 +126,12 @@ services:
networks:
- parseable-internal
depends_on:
- parseable-query
- parseable-ingest-one
- minio
parseable-query:
condition: service_healthy
parseable-ingest-one:
condition: service_healthy
minio:
condition: service_healthy
deploy:
restart_policy:
condition: on-failure
Expand Down
14 changes: 9 additions & 5 deletions docker-compose-test-with-kafka.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ services:
- P_KAFKA_BOOTSTRAP_SERVERS=kafka-0:9092
# additional settings like security, tuning, etc.
depends_on:
- minio
- kafka-0
minio:
condition: service_healthy
kafka-0:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/liveness" ]
interval: 15s
Expand Down Expand Up @@ -82,7 +84,8 @@ services:
"parseable"
]
depends_on:
- parseable
parseable:
condition: service_healthy
networks:
- parseable-internal
deploy:
Expand Down Expand Up @@ -146,14 +149,15 @@ services:
kafka-log-generator:
build:
context: ./scripts
dockerfile: Dockerfile
dockerfile: Dockerfile.debug
environment:
- KAFKA_BROKERS=kafka-0:9092
- KAFKA_TOPIC=test-logs-stream
- LOG_RATE=5000
- TOTAL_LOGS=500_000
depends_on:
- kafka-0
kafka-0:
condition: service_healthy
networks:
- parseable-internal
deploy:
Expand Down
9 changes: 6 additions & 3 deletions docker-compose-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ services:
parseable:
build:
context: .
dockerfile: Dockerfile
dockerfile: Dockerfile.debug
platform: linux/amd64
command: [ "parseable", "s3-store", ]
ports:
Expand All @@ -43,8 +43,10 @@ services:
- P_PASSWORD=parseableadmin
- P_CHECK_UPDATE=false
- P_PARQUET_COMPRESSION_ALGO=snappy
- RUST_LOG=warn
depends_on:
- minio
minio:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8000/api/v1/liveness" ]
interval: 15s
Expand Down Expand Up @@ -76,7 +78,8 @@ services:
"parseable"
]
depends_on:
- parseable
parseable:
condition: service_healthy
networks:
- parseable-internal
deploy:
Expand Down
Loading