KYLIN-4775 Use docker-compose to deploy Hadoop and Kylin#1424
KYLIN-4775 Use docker-compose to deploy Hadoop and Kylin#1424liuyonghengheng wants to merge 11 commits intoapache:masterfrom
Conversation
如何启动一个集群进入docker 目录: cd apachekylin/kylin/docker执行如下命令可以 构建docker镜像,并启动docker-compose sh setup_cluster.sh --cluster_mode write-read --hadoop_version 2.8.5 --hive_version 1.2.2 --enable_hbase yes --hbase_version 1.1.2 --enable_ldap no
另外会启动一个kylin集群,包含一个all节点一个job节点和一个query节点。三个节点的kylin目录与 docker-compose/others/kylin/ 一一对应 如果是第一次执行以上命令,那么会首先去构建和拉取相应的docker镜像,所以执行时间会很长,一般会在半个小时左右才能完成。 脚本执行完成后可以执行如下命令查询集群状态: docker ps -a等待所有的container都达到health状态即可执行kylin的测试工作。 关闭集群: sh stop_cluster.sh --cluster_mode write-read --hadoop_version 2.8.5 --hive_version 1.2.2 --enable_hbase yes --hbase_version 1.1.2注意事项:如果想要单独启动或者关闭 docker-compose 而不是使用setup/stop脚本 export HBASE_VERSION=1.1.2
export HADOOP_VERSION=2.8.4
export HIVE_VERSION=1.2.2
export HADOOP_NAMENODE_IMAGETAG=apachekylin/kylin-hadoop-base:hadoop_${HADOOP_VERSION}
export HADOOP_DATANODE_IMAGETAG=apachekylin/kylin-hadoop-datanode:hadoop_${HADOOP_VERSION}
export HADOOP_NAMENODE_IMAGETAG=apachekylin/kylin-hadoop-namenode:hadoop_${HADOOP_VERSION}
export HADOOP_RESOURCEMANAGER_IMAGETAG=apachekylin/kylin-hadoop-resourcemanager:hadoop_${HADOOP_VERSION}
export HADOOP_NODEMANAGER_IMAGETAG=apachekylin/kylin-hadoop-nodemanager:hadoop_${HADOOP_VERSION}
export HADOOP_HISTORYSERVER_IMAGETAG=apachekylin/kylin-hadoop-historyserver:hadoop_${HADOOP_VERSION}
export HIVE_IMAGETAG=apachekylin/kylin-hive:hive_${HIVE_VERSION}_hadoop_${HADOOP_VERSION}
export HBASE_MASTER_IMAGETAG=apachekylin/kylin-hbase-base:hbase_${HBASE_VERSION}
export HBASE_MASTER_IMAGETAG=apachekylin/kylin-hbase-master:hbase_${HBASE_VERSION}
export HBASE_REGIONSERVER_IMAGETAG=apachekylin/kylin-hbase-regionserver:hbase_${HBASE_VERSION}
export KAFKA_IMAGE=bitnami/kafka:2.0.0
export LDAP_IMAGE=osixia/openldap:1.3.0
export CLIENT_IMAGETAG=apachekylin/kylin-client:hadoop_${HADOOP_VERSION}_hive_${HIVE_VERSION}_hbase_${HBASE_VERSION}
因为 docker-compose 文件中的 image 都是使用环境变量的方式,所以如果想要设置不同版本 image |
Component Support Matrix
hadoop_3.1.4_hive_2.3.7_hbase_2.2.6 |
| KYLIN_WS=${WS_ROOT} docker-compose -f ${SCRIPT_PATH}/docker-compose/write/docker-compose-hive.yml up -d | ||
|
|
||
|
|
||
| if [ $KERBEROS == "yes" ]; then |
There was a problem hiding this comment.
Maybe "ENABLE_KERBEROS" instead of "KERBEROS" ?
|
|
||
| read-historyserver: | ||
| image: ${HADOOP_HISTORYSERVER_IMAGETAG:-bde2020/hadoop-historyserver:2.0.0-hadoop2.7.4-java8} | ||
| image: ${HADOOP_HISTORYSERVER_IMAGETAG:-apachekylin/kylin-hadoop-historyserver:hadoop_2.8.} |
There was a problem hiding this comment.
Do you mean hadoop_2.8.5 instead of hadoop_2.8. ?
|
@liuyonghengheng Really appreacite your contribution! @zhangayqian will add your patchs in her PR( #1465) with some modification, so I will close this one . |
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
Types of changes
What types of changes does your code introduce to Kylin?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.documentbranchFurther comments
If this is a relatively large or complex change, kick off the discussion at user@kylin or dev@kylin by explaining why you chose the solution you did and what alternatives you considered, etc...