hbase/dev-support/apache_hbase_topology
Dima Spivak ccf5d27d7a HBASE-12721 Create Docker container cluster infrastructure to enable better testing
Amending-Author: Sean Busbey <busbey@apache.org>
Signed-off-by: Sean Busbey <busbey@apache.org>
2016-08-17 12:03:47 -07:00
..
ssh HBASE-12721 Create Docker container cluster infrastructure to enable better testing 2016-08-17 12:03:47 -07:00
Dockerfile HBASE-12721 Create Docker container cluster infrastructure to enable better testing 2016-08-17 12:03:47 -07:00
README.md HBASE-12721 Create Docker container cluster infrastructure to enable better testing 2016-08-17 12:03:47 -07:00
__init__.py HBASE-12721 Create Docker container cluster infrastructure to enable better testing 2016-08-17 12:03:47 -07:00
actions.py HBASE-12721 Create Docker container cluster infrastructure to enable better testing 2016-08-17 12:03:47 -07:00
configurations.cfg HBASE-12721 Create Docker container cluster infrastructure to enable better testing 2016-08-17 12:03:47 -07:00
profile.cfg HBASE-12721 Create Docker container cluster infrastructure to enable better testing 2016-08-17 12:03:47 -07:00

README.md

apache_hbase clusterdock topology

Overview

clusterdock is a framework for creating Docker-based container clusters. Unlike regular Docker containers, which tend to run single processes and then exit once the process terminates, these container clusters are characterized by the execution of an init process in daemon mode. As such, the containers act more like "fat containers" or "light VMs;" entities with accessible IP addresses which emulate standalone hosts.

clusterdock relies upon the notion of a topology to define how clusters should be built into images and then what to do with those images to start Docker container clusters.

Usage

The clusterdock framework is designed to be run out of its own container while affecting operations on the host. To avoid problems that might result from incorrectly formatting this framework invocation, a Bash helper script (clusterdock.sh) can be sourced on a host that has Docker installed. Afterwards, running any of the binaries intended to carry out clusterdock actions can be done using the clusterdock_run command.

wget https://raw.githubusercontent.com/cloudera/clusterdock/master/clusterdock.sh
# ALWAYS INSPECT SCRIPTS FROM THE INTERNET BEFORE SOURCING THEM.
source clusterdock.sh

Since the clusterdock framework itself lives outside of Apache HBase, an environmental variable is used to let the helper script know where to find an image of the apache_hbase topology. To start a four-node Apache HBase cluster with default versions, you would simply run

CLUSTERDOCK_TOPOLOGY_IMAGE=apache_hbase_topology_location clusterdock_run \
    ./bin/start_cluster apache_hbase --secondary-nodes='node-{2..4}'