https://gitee.com/assad/docker-hbase.git
基于 big-data-europe 的仓库代码修改,主要升级了 HBase 版本到 2.X, 增加 Phoenix 的配置,增加 HBase 对 Hadoop 共享库的配置,同时修改 HBase 组件由 http 下载为本地二进制包拷贝,减少构建过程中键盘被砸坏的风险。
主要组件版本如下:
仓库中包含完整的 hbase-2.0.0-bin.tar.gz
二进制包和 phoenix-5.0.0-hbase-2.0.tar.gz
中的 phoenix-5.0.0-server.jar
,仓库体积比较大,这也是无奈,毕竟在国内从 apache 历史仓库下载 hbase 历史版本的体验简直就是噩梦。
git clone https://github.com/Al-assad/docker-hbase.git
国内环境可以从 gitee 镜像仓库下载,毕竟 github 小水管不是吹的;
git clone https://gitee.com/assad/docker-hbase.git
docker-compose 构建基础镜像。
make build
Standalone
版本依赖结构与 quickstart HBase documentation 一致,只不过使用了 Hadoop
的 HDFS
版本作为底层储存。
主要用于开发测试环境的快速搭建。
docker-compose -f docker-compose-standalone.yml up -d
运行该版本会使用一个独立的 Zookeeper
,HMaster
节点和 HResgionserver
节点也会分开为独立容器。
docker-compose -f docker-compose-distributed-local.yml up -d
yulin/hbase-standalone:1.0.1-hbase2.0.0
该镜像不存在,这里重新调整了镜像:
[root@k8s-n1 hbase-compose]# cat hbase-standalone-compose.yml
version: "3"
services:
namenode:
image: bde2020/hadoop-namenode:2.0.0-hadoop2.7.4-java8
container_name: namenode
volumes:
- hadoop_namenode:/hadoop/dfs/name
environment:
- CLUSTER_NAME=test
env_file:
- ./hadoop.env
datanode:
image: bde2020/hadoop-datanode:2.0.0-hadoop2.7.4-java8
container_name: datanode
volumes:
- hadoop_datanode:/hadoop/dfs/data
environment:
SERVICE_PRECONDITION: "namenode:50070"
env_file:
- ./hadoop.env
resourcemanager:
image: bde2020/hadoop-resourcemanager:2.0.0-hadoop2.7.4-java8
container_name: resourcemanager
environment:
SERVICE_PRECONDITION: "namenode:50070 datanode:50075"
env_file:
- ./hadoop.env
nodemanager1:
image: bde2020/hadoop-nodemanager:2.0.0-hadoop2.7.4-java8
container_name: nodemanager
environment:
SERVICE_PRECONDITION: "namenode:50070 datanode:50075 resourcemanager:8088"
env_file:
- ./hadoop.env
historyserver:
image: bde2020/hadoop-historyserver:2.0.0-hadoop2.7.4-java8
container_name: historyserver
volumes:
- hadoop_historyserver:/hadoop/yarn/timeline
environment:
SERVICE_PRECONDITION: "namenode:50070 datanode:50075 resourcemanager:8088"
env_file:
- ./hadoop.env
hbase:
#image: yulin/hbase-standalone:1.0.1-hbase2.0.0
image: dmvolod/hbase-standalone:2.2.5
container_name: hbase
hostname: hbase
volumes:
- hbase_data:/hbase-data
- hbase_zookeeper_data:/zookeeper-data
ports:
- 16000:16000
- 16010:16010
- 16020:16020
- 16030:16030
- 2888:2888
- 3888:3888
- 2181:2181
environment:
SERVICE_PRECONDITION: "namenode:50070 datanode:50075"
env_file:
- ./hbase-standalone.env
volumes:
hadoop_namenode:
hadoop_datanode:
hadoop_historyserver:
hbase_data:
hbase_zookeeper_data:
[root@k8s-n1 hbase-compose]#