Skip to content

Commit

Permalink
fix(cli/quickstart): handle docker hangs gracefully (datahub-project#…
Browse files Browse the repository at this point in the history
…8211)

Co-authored-by: Pedro Silva <[email protected]>
  • Loading branch information
2 people authored and tusharm committed Jun 20, 2023
1 parent 33c2cab commit fcd5029
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 65 deletions.
18 changes: 9 additions & 9 deletions docker/docker-compose-without-neo4j.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ services:
env_file: datahub-gms/env/docker-without-neo4j.env
healthcheck:
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
start_period: 20s
start_period: 90s
interval: 1s
retries: 20
retries: 3
timeout: 5s
depends_on:
datahub-upgrade:
Expand Down Expand Up @@ -116,9 +116,9 @@ services:
memory: 1G
healthcheck:
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
start_period: 5s
start_period: 20s
interval: 1s
retries: 5
retries: 3
timeout: 5s
volumes:
- esdata:/usr/share/elasticsearch/data
Expand All @@ -131,9 +131,9 @@ services:
env_file: schema-registry/env/docker.env
healthcheck:
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
start_period: 5s
start_period: 30s
interval: 1s
retries: 5
retries: 3
timeout: 5s
depends_on:
broker:
Expand All @@ -147,7 +147,7 @@ services:
env_file: broker/env/docker.env
healthcheck:
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
start_period: 5s
start_period: 30s
interval: 1s
retries: 5
timeout: 5s
Expand All @@ -165,9 +165,9 @@ services:
env_file: zookeeper/env/docker.env
healthcheck:
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
start_period: 2s
start_period: 10s
interval: 5s
retries: 5
retries: 3
timeout: 5s
volumes:
- zkdata:/var/lib/zookeeper
Expand Down
4 changes: 2 additions & 2 deletions docker/docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ services:
restart: on-failure
healthcheck:
test: mysqladmin ping -h mysql -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
start_period: 2s
start_period: 10s
interval: 1s
retries: 5
retries: 3
timeout: 5s
volumes:
- ./mysql/init.sql:/docker-entrypoint-initdb.d/init.sql
Expand Down
18 changes: 9 additions & 9 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ services:
dockerfile: docker/datahub-gms/Dockerfile
healthcheck:
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
start_period: 20s
start_period: 90s
interval: 1s
retries: 20
retries: 3
timeout: 5s
depends_on:
datahub-upgrade:
Expand Down Expand Up @@ -119,9 +119,9 @@ services:
memory: 1G
healthcheck:
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
start_period: 5s
start_period: 20s
interval: 1s
retries: 5
retries: 3
timeout: 5s
volumes:
- esdata:/usr/share/elasticsearch/data
Expand Down Expand Up @@ -150,9 +150,9 @@ services:
env_file: schema-registry/env/docker.env
healthcheck:
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
start_period: 5s
start_period: 30s
interval: 1s
retries: 5
retries: 3
timeout: 5s
depends_on:
broker:
Expand All @@ -166,7 +166,7 @@ services:
env_file: broker/env/docker.env
healthcheck:
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
start_period: 5s
start_period: 30s
interval: 1s
retries: 5
timeout: 5s
Expand All @@ -184,9 +184,9 @@ services:
env_file: zookeeper/env/docker.env
healthcheck:
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
start_period: 2s
start_period: 10s
interval: 5s
retries: 5
retries: 3
timeout: 5s
volumes:
- zkdata:/var/lib/zookeeper
Expand Down
22 changes: 11 additions & 11 deletions docker/quickstart/docker-compose-m1.quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
healthcheck:
interval: 1s
retries: 5
start_period: 5s
start_period: 30s
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
timeout: 5s
hostname: broker
Expand Down Expand Up @@ -105,8 +105,8 @@ services:
- METADATA_SERVICE_AUTH_ENABLED=false
healthcheck:
interval: 1s
retries: 20
start_period: 20s
retries: 3
start_period: 90s
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
timeout: 5s
hostname: datahub-gms
Expand Down Expand Up @@ -162,8 +162,8 @@ services:
- ES_JAVA_OPTS=-Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
healthcheck:
interval: 1s
retries: 5
start_period: 5s
retries: 3
start_period: 20s
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
timeout: 5s
hostname: elasticsearch
Expand Down Expand Up @@ -211,8 +211,8 @@ services:
- MYSQL_ROOT_PASSWORD=datahub
healthcheck:
interval: 1s
retries: 5
start_period: 2s
retries: 3
start_period: 10s
test: mysqladmin ping -h mysql -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
timeout: 5s
hostname: mysql
Expand Down Expand Up @@ -268,8 +268,8 @@ services:
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=broker:29092
healthcheck:
interval: 1s
retries: 5
start_period: 5s
retries: 3
start_period: 30s
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
timeout: 5s
hostname: schema-registry
Expand All @@ -283,8 +283,8 @@ services:
- ZOOKEEPER_TICK_TIME=2000
healthcheck:
interval: 5s
retries: 5
start_period: 2s
retries: 3
start_period: 10s
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
timeout: 5s
hostname: zookeeper
Expand Down
18 changes: 9 additions & 9 deletions docker/quickstart/docker-compose-without-neo4j-m1.quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
healthcheck:
interval: 1s
retries: 5
start_period: 5s
start_period: 30s
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
timeout: 5s
hostname: broker
Expand Down Expand Up @@ -100,8 +100,8 @@ services:
- UI_INGESTION_ENABLED=true
healthcheck:
interval: 1s
retries: 20
start_period: 20s
retries: 3
start_period: 90s
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
timeout: 5s
hostname: datahub-gms
Expand Down Expand Up @@ -155,8 +155,8 @@ services:
- ES_JAVA_OPTS=-Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
healthcheck:
interval: 1s
retries: 5
start_period: 5s
retries: 3
start_period: 20s
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
timeout: 5s
hostname: elasticsearch
Expand Down Expand Up @@ -242,8 +242,8 @@ services:
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=broker:29092
healthcheck:
interval: 1s
retries: 5
start_period: 5s
retries: 3
start_period: 30s
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
timeout: 5s
hostname: schema-registry
Expand All @@ -257,8 +257,8 @@ services:
- ZOOKEEPER_TICK_TIME=2000
healthcheck:
interval: 5s
retries: 5
start_period: 2s
retries: 3
start_period: 10s
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
timeout: 5s
hostname: zookeeper
Expand Down
18 changes: 9 additions & 9 deletions docker/quickstart/docker-compose-without-neo4j.quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
healthcheck:
interval: 1s
retries: 5
start_period: 5s
start_period: 30s
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
timeout: 5s
hostname: broker
Expand Down Expand Up @@ -100,8 +100,8 @@ services:
- UI_INGESTION_ENABLED=true
healthcheck:
interval: 1s
retries: 20
start_period: 20s
retries: 3
start_period: 90s
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
timeout: 5s
hostname: datahub-gms
Expand Down Expand Up @@ -155,8 +155,8 @@ services:
- ES_JAVA_OPTS=-Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
healthcheck:
interval: 1s
retries: 5
start_period: 5s
retries: 3
start_period: 20s
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
timeout: 5s
hostname: elasticsearch
Expand Down Expand Up @@ -242,8 +242,8 @@ services:
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=broker:29092
healthcheck:
interval: 1s
retries: 5
start_period: 5s
retries: 3
start_period: 30s
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
timeout: 5s
hostname: schema-registry
Expand All @@ -257,8 +257,8 @@ services:
- ZOOKEEPER_TICK_TIME=2000
healthcheck:
interval: 5s
retries: 5
start_period: 2s
retries: 3
start_period: 10s
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
timeout: 5s
hostname: zookeeper
Expand Down
22 changes: 11 additions & 11 deletions docker/quickstart/docker-compose.quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
healthcheck:
interval: 1s
retries: 5
start_period: 5s
start_period: 30s
test: nc -z broker $${DATAHUB_MAPPED_KAFKA_BROKER_PORT:-9092}
timeout: 5s
hostname: broker
Expand Down Expand Up @@ -105,8 +105,8 @@ services:
- METADATA_SERVICE_AUTH_ENABLED=false
healthcheck:
interval: 1s
retries: 20
start_period: 20s
retries: 3
start_period: 90s
test: curl -sS --fail http://datahub-gms:${DATAHUB_MAPPED_GMS_PORT:-8080}/health
timeout: 5s
hostname: datahub-gms
Expand Down Expand Up @@ -162,8 +162,8 @@ services:
- ES_JAVA_OPTS=-Xms256m -Xmx512m -Dlog4j2.formatMsgNoLookups=true
healthcheck:
interval: 1s
retries: 5
start_period: 5s
retries: 3
start_period: 20s
test: curl -sS --fail http://elasticsearch:$${DATAHUB_MAPPED_ELASTIC_PORT:-9200}/_cluster/health?wait_for_status=yellow&timeout=0s
timeout: 5s
hostname: elasticsearch
Expand Down Expand Up @@ -211,8 +211,8 @@ services:
- MYSQL_ROOT_PASSWORD=datahub
healthcheck:
interval: 1s
retries: 5
start_period: 2s
retries: 3
start_period: 10s
test: mysqladmin ping -h mysql -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
timeout: 5s
hostname: mysql
Expand Down Expand Up @@ -268,8 +268,8 @@ services:
- SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS=broker:29092
healthcheck:
interval: 1s
retries: 5
start_period: 5s
retries: 3
start_period: 30s
test: nc -z schema-registry ${DATAHUB_MAPPED_SCHEMA_REGISTRY_PORT:-8081}
timeout: 5s
hostname: schema-registry
Expand All @@ -283,8 +283,8 @@ services:
- ZOOKEEPER_TICK_TIME=2000
healthcheck:
interval: 5s
retries: 5
start_period: 2s
retries: 3
start_period: 10s
test: echo srvr | nc zookeeper $${DATAHUB_MAPPED_ZK_PORT:-2181}
timeout: 5s
hostname: zookeeper
Expand Down
Loading

0 comments on commit fcd5029

Please sign in to comment.