Docker image for multi-node hadoop cluster.
2.7K
Docker image for multi-node hadoop cluster.
The image is meant for starting containers with --net="host" option to use the host network inside the container.
The packages contained in the docker image include:
Currently, only root user is supported.
To operate the docker image and start up hadoop daemons as docker containers, follow these steps:
Make sure your cluster is up and running, and designate the roles for each host. Currently, you need to identify the following roles: Namenode Datanode Resourcemanager Nodemanager Zookeeper Datanode and Nodemanager typically co-exist on the same host.
Make sure docker is installed and configured correctly on each host:
> docker version
Client:
Version: 1.8.3
API version: 1.20
Go version: go1.4.2
Git commit: f4bf5c7
Built: Mon Oct 12 05:37:18 UTC 2015
OS/Arch: linux/amd64```
Server: Version: 1.8.3 API version: 1.20 Go version: go1.4.2 Git commit: f4bf5c7 Built: Mon Oct 12 05:37:18 UTC 2015 OS/Arch: linux/amd64```
rm -rf /opt/hadoop
rm -rf /var/lib/hadoop
git clone https://github.com/ading1977/docker-hadoop-deployer.git```
* Change into the **docker-hadoop-deployer** directory. Depending on the hadoop version you intend to deploy, checkout the specific branch that matches the hadoop version. For example, to checkout the deploy script for hadoop 2.8.0, run:
```sh
git checkout -t origin/2.8.0```
* Edit the **runHadoop.sh** script to customize the basic hadoop configuration needed to start up hadoop. Currently the following three parameters are required:
: ${CONF_NAMENODE:=node1} : ${CONF_RESOURCEMANAGER:=node2} : ${CONF_DFS_REPLICATION:=3} : ${CONF_ZK_QUORUM:=node:2181}
* Copy the startup scripts to all hosts
# Run
* Start up hadoop daemons on each host by running the following:
On **Namenode** node:
`>sudo ./runHadoop.sh namenode`
On **Datanode** node(s):
`>sudo ./runHadoop.sh datanode`
On **Resourcemanager** node
`>sudo ./runHadoop.sh resourcemanager`
On **Nodemanager** node(s)
`>sudo ./runHadoop.sh nodemanager`
On **Zookeeper** node(s)
`>sudo ./runHadoop.sh zookeeper`
* To bring up a shell that has access to the hadoop environment, simply run the **runHadoop** script without parameter:
`>sudo ./runHadoop.sh`
* The HDFS data volumes and Zookeeper data are bind mounted to the host, so that data can be persisted if docker containers are removed:
**/var/lib/hadoop**
**/var/lib/zookeeper**
* The following volumes are also bind mounted and persisted to the host for your convenience.
The hadoop **configuration** directory:
`/opt/hadoop/etc/hadoop`
The hadoop **log** directory:
`/opt/hadoop/logs`
* The startup script will automatically check if there are newer docker images available in the docker hub registry, and if so, pull the latest image, stop and remove the current running container, and start up a new container based on the latest image.
Content type
Image
Digest
sha256:ba093d351…
Size
485.8 MB
Last updated
over 10 years ago
docker pull ading1977/hadoop