Skip to content

Commit bdae4e9

Browse files
authored
ATLAS-5058: added healthcheck in docker setup (#386)
1 parent ff3eeba commit bdae4e9

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

dev-support/atlas-docker/docker-compose.atlas-hadoop.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ services:
1818
depends_on:
1919
- atlas-base
2020
healthcheck:
21-
test: "hdfs dfs -ls /"
22-
interval: 1m30s
21+
test: [ "CMD-SHELL", "su hdfs -c \"/opt/hadoop/bin/hdfs dfsadmin -report | grep -q 'Live datanodes'\"" ]
22+
interval: 30s
2323
timeout: 10s
2424
retries: 30
2525
start_period: 40s

dev-support/atlas-docker/docker-compose.atlas-hbase.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ services:
2525
condition: service_started
2626
atlas-kafka:
2727
condition: service_started
28+
healthcheck:
29+
test: [ "CMD", "wget", "-q", "--spider", "http://localhost:16030/rs-status" ]
30+
interval: 30s
31+
timeout: 10s
32+
retries: 30
33+
start_period: 40s
2834
environment:
2935
- HBASE_VERSION
3036
- ATLAS_VERSION

dev-support/atlas-docker/docker-compose.atlas-hive.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ services:
3939
hostname: atlas-db.example.com
4040
networks:
4141
- atlas
42+
healthcheck:
43+
test: [ "CMD-SHELL", "su hdfs -c \"/opt/hadoop/bin/hdfs dfsadmin -report | grep -q 'Live datanodes'\"" ]
44+
interval: 30s
45+
timeout: 10s
46+
retries: 30
47+
start_period: 40s
4248

4349
networks:
4450
atlas:

dev-support/atlas-docker/docker-compose.atlas.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ services:
1919
- "21000:21000"
2020
depends_on:
2121
atlas-hbase:
22-
condition: service_started
22+
condition: service_healthy
2323
atlas-kafka:
2424
condition: service_started
2525
atlas-solr:

0 commit comments

Comments
 (0)