[GitHub] [kylin] weibin0516 commented on a change in pull request #797: KYLIN-4114 Provided a self-contained docker image for Kylin
weibin0516 commented on a change in pull request #797: KYLIN-4114 Provided a self-contained docker image for Kylin URL: https://github.com/apache/kylin/pull/797#discussion_r314226056 ## File path: docker/Dockerfile ## @@ -0,0 +1,80 @@ +# Docker image for apache kylin +FROM centos:6.9 + +MAINTAINER weibin0516 + +ENV HIVE_VERSION 1.2.1 +ENV HADOOP_VERSION 2.7.0 +ENV HBASE_VERSION 1.1.2 +ENV SPARK_VERSION spark-2.3.1-bin-hadoop2.6 +ENV ZK_VERSION 3.4.6 + +ENV JAVA_HOME /home/admin/jdk1.8.0_141 +ENV MVN_HOME /home/admin/apache-maven-3.6.1 +ENV HADOOP_HOME /home/admin/hadoop-$HADOOP_VERSION +ENV HIVE_HOME /home/admin/apache-hive-$HIVE_VERSION-bin +ENV HADOOP_CONF $HADOOP_HOME/etc/hadoop +ENV HBASE_HOME /home/admin/hbase-$HBASE_VERSION +ENV SPARK_HOME /home/admin/$SPARK_VERSION +ENV ZK_HOME /home/admin/zookeeper-$ZK_VERSION +ENV PATH $PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HIVE_HOME/bin:$HBASE_HOME/bin:$MVN_HOME/bin:$SPARK_HOME/bin + +USER root + +WORKDIR /home/admin + +# install tools +RUN yum -y install lsof.x86_64 wget.x86_64 tar.x86_64 git.x86_64 mysql-server.x86_64 mysql.x86_64 + +# install mvn +RUN wget http://mirrors.ocf.berkeley.edu/apache/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz +RUN tar -zxvf apache-maven-3.6.1-bin.tar.gz +COPY conf/maven/settings.xml $MVN_HOME/conf/settings.xml +RUN rm -f apache-maven-3.6.1-bin.tar.gz + +# install npm +RUN curl -sL https://rpm.nodesource.com/setup_8.x | bash - +RUN yum install -y nodejs + +# setup jdk +RUN wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u141-b15/336fa29ff2bb4ef291e347e091f7f4a7/jdk-8u141-linux-x64.tar.gz"; +RUN tar -zxvf /home/admin/jdk-8u141-linux-x64.tar.gz +RUN rm -f /home/admin/jdk-8u141-linux-x64.tar.gz + +# setup hadoop +RUN wget https://archive.apache.org/dist/hadoop/core/hadoop-2.7.0/hadoop-2.7.0.tar.gz +RUN tar -zxvf /home/admin/hadoop-$HADOOP_VERSION.tar.gz +RUN rm -f /home/admin/hadoop-$HADOOP_VERSION.tar.gz + +COPY conf/hadoop/* $HADOOP_CONF/ +RUN mkdir -p /data/hadoop + +# setup hbase +RUN wget https://archive.apache.org/dist/hbase/1.1.2/hbase-1.1.2-bin.tar.gz Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [kylin] weibin0516 commented on a change in pull request #797: KYLIN-4114 Provided a self-contained docker image for Kylin
weibin0516 commented on a change in pull request #797: KYLIN-4114 Provided a self-contained docker image for Kylin URL: https://github.com/apache/kylin/pull/797#discussion_r314225993 ## File path: docker/use-guide.md ## @@ -0,0 +1,61 @@ +Docker for Kylin is convenient for users to quickly try Kylin, as well as for developers to debug and verify code modifications. + +In the image, including: +* Jdk 1.8 +* Hadoop 2.7.0 +* Hive 1.2.1 +* Hbase 1.1.2 +* Spark 2.3.1 +* Zookeeper 3.4.6 +* Mysql +* Maven 3.6.1 + +## Build image +Execute the following command to build image +``` +sh build_image.sh +``` +This operation may last for several tens of minutes due to the download of the installation package. + +## Launch container +After image built, execute +``` +sh run_container.sh +``` +to launch container which will automatically start the following services: +* Mysql +* NameNode +* DataNode +* ResourceManager +* NodeManager +* HMaster + +Then execute command [docker exec](https://docs.docker.com/engine/reference/commandline/exec/) to run command in then running Kylin container. + +## For user to try Kylin +All Kylin service dependences are ready, just need to download Kylin release binary from http://kylin.apache.org/download/ and start Kylin service. + +For example: +``` +cd /home/admin +wget https://archive.apache.org/dist/kylin/apache-kylin-3.0.0-alpha2/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz +tar -zxvf apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz +cd apache-kylin-3.0.0-alpha2-bin-hbase1x +bin/kylin.sh start +``` + +## For developer to debug and verify +When building image, the latest kylin source code will be copied to `/home/admin/kylin_sourcecode`. + +Execute the following commands to do package: +``` +cd /home/admin/kylin_sourcecode +build/script/package.sh +``` +After the package is complete, use the package in `/home/admin/kylin_sourcecode/dist` to start the Kylin service. + +You can also run CI inside the container: Review comment: fixed This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services