Skip to content

Commit

Permalink
added healthchecks based on http requests to WebGUI
Browse files Browse the repository at this point in the history
  • Loading branch information
earthquakesan committed Aug 15, 2016
1 parent 23e947e commit 4707efa
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Changes

Version 1.1.0 introduces healthchecks for the containers.

# Hadoop Docker

To deploy an example HDFS cluster, run:
Expand Down
2 changes: 2 additions & 0 deletions datanode/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM bde2020/hadoop-base:1.0.0
MAINTAINER Ivan Ermilov <[email protected]>

HEALTHCHECK CMD curl -f http://localhost:50075/ || exit 1

ENV HDFS_CONF_dfs_datanode_data_dir=file:///hadoop/dfs/data
RUN mkdir -p /hadoop/dfs/data
VOLUME /hadoop/dfs/data
Expand Down
67 changes: 67 additions & 0 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
namenode:
build: ./namenode
hostname: namenode
container_name: namenode
net: hadoop
volumes:
- ./data/namenode:/hadoop/dfs/name
environment:
- CLUSTER_NAME=test
env_file:
- ./hadoop.env

resourcemanager:
build: ./resourcemanager
hostname: resourcemanager
container_name: resourcemanager
net: hadoop
env_file:
- ./hadoop.env

historyserver:
build: ./historyserver
hostname: historyserver
container_name: historyserver
net: hadoop
volumes:
- ./data/historyserver:/hadoop/yarn/timeline
env_file:
- ./hadoop.env

nodemanager1:
build: ./nodemanager
hostname: nodemanager1
container_name: nodemanager1
net: hadoop
env_file:
- ./hadoop.env

datanode1:
build: ./datanode
hostname: datanode1
container_name: datanode1
net: hadoop
volumes:
- ./data/datanode1:/hadoop/dfs/data
env_file:
- ./hadoop.env

datanode2:
build: ./datanode
hostname: datanode2
container_name: datanode2
net: hadoop
volumes:
- ./data/datanode2:/hadoop/dfs/data
env_file:
- ./hadoop.env

datanode3:
build: ./datanode
hostname: datanode3
container_name: datanode3
net: hadoop
volumes:
- ./data/datanode3:/hadoop/dfs/data
env_file:
- ./hadoop.env
2 changes: 2 additions & 0 deletions historyserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM bde2020/hadoop-base:1.0.0
MAINTAINER Ivan Ermilov <[email protected]>

HEALTHCHECK CMD curl -f http://localhost:8188/ || exit 1

ENV YARN_CONF_yarn_timeline___service_leveldb___timeline___store_path=/hadoop/yarn/timeline
RUN mkdir -p /hadoop/yarn/timeline
VOLUME /hadoop/yarn/timeline
Expand Down
2 changes: 2 additions & 0 deletions namenode/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM bde2020/hadoop-base:1.0.0
MAINTAINER Ivan Ermilov <[email protected]>

HEALTHCHECK CMD curl -f http://localhost:50070/ || exit 1

ENV HDFS_CONF_dfs_namenode_name_dir=file:///hadoop/dfs/name
RUN mkdir -p /hadoop/dfs/name
VOLUME /hadoop/dfs/name
Expand Down
2 changes: 2 additions & 0 deletions nodemanager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM bde2020/hadoop-base:1.0.0
MAINTAINER Ivan Ermilov <[email protected]>

HEALTHCHECK CMD curl -f http://localhost:8042/ || exit 1

ADD run.sh /run.sh
RUN chmod a+x /run.sh

Expand Down
2 changes: 2 additions & 0 deletions resourcemanager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM bde2020/hadoop-base:1.0.0
MAINTAINER Ivan Ermilov <[email protected]>

HEALTHCHECK CMD curl -f http://localhost:8088/ || exit 1

ADD run.sh /run.sh
RUN chmod a+x /run.sh

Expand Down

0 comments on commit 4707efa

Please sign in to comment.