This is an automated email from the ASF dual-hosted git repository. nic pushed a commit to branch document in repository https://gitbox.apache.org/repos/asf/kylin.git
commit 21e5e03233e4c95d626280f3eca824cd2c7173ea Author: shaofengshi <shaofeng...@apache.org> AuthorDate: Sat Feb 29 11:15:26 2020 +0800 update docker document --- website/_docs/install/kylin_docker.cn.md | 99 ++++------------------------ website/_docs/install/kylin_docker.md | 90 +++---------------------- website/_docs31/install/kylin_docker.cn.md | 101 +++++------------------------ website/_docs31/install/kylin_docker.md | 90 +++---------------------- 4 files changed, 47 insertions(+), 333 deletions(-) diff --git a/website/_docs/install/kylin_docker.cn.md b/website/_docs/install/kylin_docker.cn.md index f1995b8..b97d2ae 100644 --- a/website/_docs/install/kylin_docker.cn.md +++ b/website/_docs/install/kylin_docker.cn.md @@ -3,19 +3,19 @@ layout: docs title: "用 Docker 运行 Kylin" categories: install permalink: /cn/docs/install/kylin_docker.html -since: v3.0.0-alpha2 +since: v3.0.0 --- 为了让用户方便的试用 Kylin,以及方便开发者在修改了源码后进行验证及调试。我们提供了 Kylin 的 docker 镜像。该镜像中,Kylin 依赖的各个服务均已正确的安装及部署,包括: -- Jdk 1.8 +- JDK 1.8 - Hadoop 2.7.0 - Hive 1.2.1 -- Hbase 1.1.2 +- HBase 1.1.2 - Spark 2.3.1 - Zookeeper 3.4.6 - Kafka 1.1.1 -- Mysql +- MySQL 5.1.73 - Maven 3.6.1 ## 快速试用 Kylin @@ -23,7 +23,7 @@ since: v3.0.0-alpha2 我们已将面向用户的 Kylin 镜像上传至 docker 仓库,用户无需在本地构建镜像,直接执行以下命令从 docker 仓库 pull 镜像: {% highlight Groff markup %} -docker pull apachekylin/apache-kylin-standalone:3.0.0-alpha2 +docker pull apachekylin/apache-kylin-standalone:3.0.1 {% endhighlight %} pull 成功后,执行以下命令启动容器: @@ -36,8 +36,8 @@ docker run -d \ -p 50070:50070 \ -p 8032:8032 \ -p 8042:8042 \ --p 60010:60010 \ -apachekylin/apache-kylin-standalone:3.0.0-alpha2 +-p 16010:16010 \ +apachekylin/apache-kylin-standalone:3.0.1 {% endhighlight %} 在容器启动时,会自动启动以下服务: @@ -48,86 +48,14 @@ apachekylin/apache-kylin-standalone:3.0.0-alpha2 - Kafka - Kylin -并自动运行 `$KYLIN_HOME/bin/sample.sh ` 及在 Kafka 中创建 kylin_streaming_topic topic 并持续向该 topic 中发送数据。这是为了让用户启动容器后,就能体验以批和流的方式的方式构建 Cube 并进行查询。 +并自动运行 `$KYLIN_HOME/bin/sample.sh ` 及在 Kafka 中创建 "kylin_streaming_topic" topic 并持续向该 topic 中发送数据。这是为了让用户启动容器后,就能体验以批和流的方式的方式构建 Cube 并进行查询。 -容器启动后,我们可以通过 docker exec 命令进入容器内。当然,由于我们已经将容器内指定端口映射到本机端口,我们可以直接在本机浏览器中打开各个服务的页面,如: +容器启动后,我们可以通过 "docker exec -it \<container_id\> bash" 命令进入容器内。当然,由于我们已经将容器内指定端口映射到本机端口,我们可以直接在本机浏览器中打开各个服务的页面,如: - Kylin 页面:[http://127.0.0.1:7070/kylin/login](http://127.0.0.1:7070/kylin/login) -- Hdfs NameNode 页面:[http://127.0.0.1:50070](http://127.0.0.1:50070/) -- Yarn ResourceManager 页面:[http://127.0.0.1:8088](http://127.0.0.1:8088/) -- HBase 页面:[http://127.0.0.1:60010](http://127.0.0.1:60010/) - -容器内,相关环境变量如下: - -{% highlight Groff markup %} -JAVA_HOME=/home/admin/jdk1.8.0_141 -HADOOP_HOME=/home/admin/hadoop-2.7.0 -KAFKA_HOME=/home/admin/kafka_2.11-1.1.1 -SPARK_HOME=/home/admin/spark-2.3.1-bin-hadoop2.6 -HBASE_HOME=/home/admin/hbase-1.1.2 -HIVE_HOME=/home/admin/apache-hive-1.2.1-bin -KYLIN_HOME=/home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x -{% endhighlight %} - -## 构建镜像以验证源码修改 - -当开发者修改了源代码,想要对源代码进行打包、部署及验证时,也可以使用镜像。首先,我们进入源码根目录下的 docker 目录,并执行下面的脚本来构建镜像并将源码拷贝到镜像中: - -{% highlight Groff markup %} -#!/usr/bin/env bash - -echo "start build kylin image base on current source code" - -rm -rf ./kylin -mkdir -p ./kylin - -echo "start copy kylin source code" - -for file in `ls ../../kylin/` -do - if [ docker != $file ] - then - cp -r ../../kylin/$file ./kylin/ - fi -done - -echo "finish copy kylin source code" - -docker build -t apache-kylin-standalone .⏎ -{% endhighlight %} - -由于需要通过网络下载各种安装包并进行部署,整个构建过程可能会持续几十分钟,时间长短取决于网络情况。 - -当完成镜像构建后,执行以下命令启动容器: - -{% highlight Groff markup %} -docker run -d \ --m 8G \ --p 7070:7070 \ --p 8088:8088 \ --p 50070:50070 \ --p 8032:8032 \ --p 8042:8042 \ --p 60010:60010 \ -apache-kylin-standalone -{% endhighlight %} - -当容器启动后,执行 docker exec 命令进入容器。源代码存放在容器的 `/home/admin/kylin_sourcecode` 目录,执行以下命令对源码进行打包: - -{% highlight Groff markup %} -cd /home/admin/kylin_sourcecod -build/script/package.sh -{% endhighlight %} - -打包完成后,会在 `/home/admin/kylin_sourcecode/dist` 目录下生成一个以 `.tar.gz` 结尾的安装包,如 `apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz`。我们可以使用该安装包进行部署和启动 Kylin 服务,如: - -{% highlight Groff markup %} -cp /home/admin/kylin_sourcecode/dist/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz /home/admin -tar -zxvf /home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz -/home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x/kylin.sh start -{% endhighlight %} - -我们同样可以在本机的浏览器中打开 Hdfs、Yarn、HBase、Kylin 等服务的页面。 +- HDFS NameNode 页面:[http://127.0.0.1:50070](http://127.0.0.1:50070/) +- YARN ResourceManager 页面:[http://127.0.0.1:8088](http://127.0.0.1:8088/) +- HBase 页面:[http://127.0.0.1:16010](http://127.0.0.1:16010/) ## 容器资源建议 @@ -140,4 +68,5 @@ tar -zxvf /home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz --- -旧版 docker image 请查看 github 项目 [kylin-docker](https://github.com/Kyligence/kylin-docker/). \ No newline at end of file + +关于如何定制修改 Docker image,请参阅 Git 代码库的 [kylin/docker](https://github.com/apache/kylin/tree/master/docker/) \ No newline at end of file diff --git a/website/_docs/install/kylin_docker.md b/website/_docs/install/kylin_docker.md index ee80ab2..58da0bb 100644 --- a/website/_docs/install/kylin_docker.md +++ b/website/_docs/install/kylin_docker.md @@ -3,7 +3,7 @@ layout: docs title: "Run Kylin with Docker" categories: install permalink: /docs/install/kylin_docker.html -since: v3.0.0-alpha2 +since: v3.0.0 --- In order to allow users to easily try Kylin, and to facilitate developers to verify and debug after modifying the source code. We provide Kylin's docker image. In this image, each service that Kylin relies on is properly installed and deployed, including: @@ -15,7 +15,7 @@ In order to allow users to easily try Kylin, and to facilitate developers to ver - Spark 2.3.1 - Zookeeper 3.4.6 - Kafka 1.1.1 -- Mysql +- MySQL 5.1.73 - Maven 3.6.1 ## Quickly try Kylin @@ -23,7 +23,7 @@ In order to allow users to easily try Kylin, and to facilitate developers to ver We have pushed the Kylin image for the user to the docker hub. Users do not need to build the image locally, just execute the following command to pull the image from the docker hub: {% highlight Groff markup %} -docker pull apachekylin/apache-kylin-standalone:3.0.0-alpha2 +docker pull apachekylin/apache-kylin-standalone:3.0.1 {% endhighlight %} After the pull is successful, execute the following command to start the container: @@ -36,8 +36,8 @@ docker run -d \ -p 50070:50070 \ -p 8032:8032 \ -p 8042:8042 \ --p 60010:60010 \ -apachekylin/apache-kylin-standalone:3.0.0-alpha2 +-p 16010:16010 \ +apachekylin/apache-kylin-standalone:3.0.1 {% endhighlight %} The following services are automatically started when the container starts: @@ -48,86 +48,14 @@ The following services are automatically started when the container starts: - Kafka - Kylin -and run automatically `$KYLIN_HOME/bin/sample.sh `, create a kylin_streaming_topic topic in Kafka and continue to send data to this topic. This is to let the users start the container and then experience the batch and streaming way to build the cube and query. +and run automatically `$KYLIN_HOME/bin/sample.sh `, create a "kylin_streaming_topic" topic in Kafka and continue to send data to this topic. This is to let the users start the container and then experience the batch and streaming way to build the cube and query. -After the container is started, we can enter the container through the `docker exec` command. Of course, since we have mapped the specified port in the container to the local port, we can open the pages of each service directly in the native browser, such as: +After the container is started, we can enter the container through the `docker exec -it <container_id> bash` command. Of course, since we have mapped the specified port in the container to the local port, we can open the pages of each service directly in the native browser, such as: - Kylin Web UI: [http://127.0.0.1:7070/kylin/login](http://127.0.0.1:7070/kylin/login) - Hdfs NameNode Web UI: [http://127.0.0.1:50070](http://127.0.0.1:50070/) - Yarn ResourceManager Web UI: [http://127.0.0.1:8088](http://127.0.0.1:8088/) -- HBase Web UI: [http://127.0.0.1:60010](http://127.0.0.1:60010/) - -In the container, the relevant environment variables are as follows: - -{% highlight Groff markup %} -JAVA_HOME=/home/admin/jdk1.8.0_141 -HADOOP_HOME=/home/admin/hadoop-2.7.0 -KAFKA_HOME=/home/admin/kafka_2.11-1.1.1 -SPARK_HOME=/home/admin/spark-2.3.1-bin-hadoop2.6 -HBASE_HOME=/home/admin/hbase-1.1.2 -HIVE_HOME=/home/admin/apache-hive-1.2.1-bin -KYLIN_HOME=/home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x -{% endhighlight %} - -## Build image to verify source code modifications - -The docker image can also be used when developers have modified the source code and want to package, deploy, and verify the source code. First, we go to the docker directory under the root directory of the source and execute the script below to build the image and copy the source into the image.: - -{% highlight Groff markup %} -#!/usr/bin/env bash - -echo "start build kylin image base on current source code" - -rm -rf ./kylin -mkdir -p ./kylin - -echo "start copy kylin source code" - -for file in `ls ../../kylin/` -do - if [ docker != $file ] - then - cp -r ../../kylin/$file ./kylin/ - fi -done - -echo "finish copy kylin source code" - -docker build -t apache-kylin-standalone .⏎ -{% endhighlight %} - -Due to need to download and deploy various binary packages over the network, the entire build process can last for tens of minutes, depending on the network. - -When the image build is complete, execute the following command to start the container: - -{% highlight Groff markup %} -docker run -d \ --m 8G \ --p 7070:7070 \ --p 8088:8088 \ --p 50070:50070 \ --p 8032:8032 \ --p 8042:8042 \ --p 60010:60010 \ -apache-kylin-standalone -{% endhighlight %} - -When the container starts, execute the docker exec command to enter the container. The source code is stored in the container dir `/home/admin/kylin_sourcecode`, execute the following command to package the source code: - -{% highlight Groff markup %} -cd /home/admin/kylin_sourcecod -build/script/package.sh -{% endhighlight %} - -After the package is complete, an binary package ending in `.tar.gz` will be generated in the `/home/admin/kylin_sourcecode/dist` directory, such as `apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz`. We can use this binary package to deploy and launch Kylin services such as: - -{% highlight Groff markup %} -cp /home/admin/kylin_sourcecode/dist/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz /home/admin -tar -zxvf /home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz -/home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x/kylin.sh start -{% endhighlight %} - -We can also open pages for services such as Hdfs, Yarn, HBase, and Kylin in the browser of this machine. +- HBase Web UI: [http://127.0.0.1:16010](http://127.0.0.1:16010/) ## Container resource recommendation @@ -140,4 +68,4 @@ For the resource setting method for the container, please refer to: --- -For old docker image, please check the github page [kylin-docker](https://github.com/Kyligence/kylin-docker/). \ No newline at end of file +For how to customize the image, please check the github page [kylin/docker](https://github.com/apache/kylin/tree/master/docker/). \ No newline at end of file diff --git a/website/_docs31/install/kylin_docker.cn.md b/website/_docs31/install/kylin_docker.cn.md index 4a4bf65..c409a2f 100644 --- a/website/_docs31/install/kylin_docker.cn.md +++ b/website/_docs31/install/kylin_docker.cn.md @@ -3,19 +3,19 @@ layout: docs31 title: "用 Docker 运行 Kylin" categories: install permalink: /cn/docs31/install/kylin_docker.html -since: v3.0.0-alpha2 +since: v3.0.0 --- -为了让用户方便的试用 Kylin,以及方便开发者在修改了源码后进行验证及调试。我们提供了 Kylin 的 docker 镜像。该镜像中,Kylin 依赖的各个服务均已正确的安装及部署,包括: +为了让用户方便的试用Kylin,以及方便开发者在修改了源码后进行验证及调试。我们提供了 Kylin 的 docker 镜像。该镜像中,Kylin 依赖的各个服务均已正确的安装及部署,包括: -- Jdk 1.8 +- JDK 1.8 - Hadoop 2.7.0 - Hive 1.2.1 -- Hbase 1.1.2 +- HBase 1.1.2 - Spark 2.3.1 - Zookeeper 3.4.6 - Kafka 1.1.1 -- Mysql +- MySQL 5.1.73 - Maven 3.6.1 ## 快速试用 Kylin @@ -23,7 +23,7 @@ since: v3.0.0-alpha2 我们已将面向用户的 Kylin 镜像上传至 docker 仓库,用户无需在本地构建镜像,直接执行以下命令从 docker 仓库 pull 镜像: {% highlight Groff markup %} -docker pull apachekylin/apache-kylin-standalone:3.0.0-alpha2 +docker pull apachekylin/apache-kylin-standalone:3.0.1 {% endhighlight %} pull 成功后,执行以下命令启动容器: @@ -36,8 +36,8 @@ docker run -d \ -p 50070:50070 \ -p 8032:8032 \ -p 8042:8042 \ --p 60010:60010 \ -apachekylin/apache-kylin-standalone:3.0.0-alpha2 +-p 16010:16010 \ +apachekylin/apache-kylin-standalone:3.0.1 {% endhighlight %} 在容器启动时,会自动启动以下服务: @@ -48,86 +48,14 @@ apachekylin/apache-kylin-standalone:3.0.0-alpha2 - Kafka - Kylin -并自动运行 `$KYLIN_HOME/bin/sample.sh ` 及在 Kafka 中创建 kylin_streaming_topic topic 并持续向该 topic 中发送数据。这是为了让用户启动容器后,就能体验以批和流的方式的方式构建 Cube 并进行查询。 +并自动运行 `$KYLIN_HOME/bin/sample.sh ` 及在 Kafka 中创建 "kylin_streaming_topic" topic 并持续向该 topic 中发送数据。这是为了让用户启动容器后,就能体验以批和流的方式的方式构建 Cube 并进行查询。 -容器启动后,我们可以通过 docker exec 命令进入容器内。当然,由于我们已经将容器内指定端口映射到本机端口,我们可以直接在本机浏览器中打开各个服务的页面,如: +容器启动后,我们可以通过 "docker exec -it \<container_id\> bash" 命令进入容器内。当然,由于我们已经将容器内指定端口映射到本机端口,我们可以直接在本机浏览器中打开各个服务的页面,如: - Kylin 页面:[http://127.0.0.1:7070/kylin/login](http://127.0.0.1:7070/kylin/login) -- Hdfs NameNode 页面:[http://127.0.0.1:50070](http://127.0.0.1:50070/) -- Yarn ResourceManager 页面:[http://127.0.0.1:8088](http://127.0.0.1:8088/) -- HBase 页面:[http://127.0.0.1:60010](http://127.0.0.1:60010/) - -容器内,相关环境变量如下: - -{% highlight Groff markup %} -JAVA_HOME=/home/admin/jdk1.8.0_141 -HADOOP_HOME=/home/admin/hadoop-2.7.0 -KAFKA_HOME=/home/admin/kafka_2.11-1.1.1 -SPARK_HOME=/home/admin/spark-2.3.1-bin-hadoop2.6 -HBASE_HOME=/home/admin/hbase-1.1.2 -HIVE_HOME=/home/admin/apache-hive-1.2.1-bin -KYLIN_HOME=/home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x -{% endhighlight %} - -## 构建镜像以验证源码修改 - -当开发者修改了源代码,想要对源代码进行打包、部署及验证时,也可以使用镜像。首先,我们进入源码根目录下的 docker 目录,并执行下面的脚本来构建镜像并将源码拷贝到镜像中: - -{% highlight Groff markup %} -#!/usr/bin/env bash - -echo "start build kylin image base on current source code" - -rm -rf ./kylin -mkdir -p ./kylin - -echo "start copy kylin source code" - -for file in `ls ../../kylin/` -do - if [ docker != $file ] - then - cp -r ../../kylin/$file ./kylin/ - fi -done - -echo "finish copy kylin source code" - -docker build -t apache-kylin-standalone .⏎ -{% endhighlight %} - -由于需要通过网络下载各种安装包并进行部署,整个构建过程可能会持续几十分钟,时间长短取决于网络情况。 - -当完成镜像构建后,执行以下命令启动容器: - -{% highlight Groff markup %} -docker run -d \ --m 8G \ --p 7070:7070 \ --p 8088:8088 \ --p 50070:50070 \ --p 8032:8032 \ --p 8042:8042 \ --p 60010:60010 \ -apache-kylin-standalone -{% endhighlight %} - -当容器启动后,执行 docker exec 命令进入容器。源代码存放在容器的 `/home/admin/kylin_sourcecode` 目录,执行以下命令对源码进行打包: - -{% highlight Groff markup %} -cd /home/admin/kylin_sourcecod -build/script/package.sh -{% endhighlight %} - -打包完成后,会在 `/home/admin/kylin_sourcecode/dist` 目录下生成一个以 `.tar.gz` 结尾的安装包,如 `apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz`。我们可以使用该安装包进行部署和启动 Kylin 服务,如: - -{% highlight Groff markup %} -cp /home/admin/kylin_sourcecode/dist/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz /home/admin -tar -zxvf /home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz -/home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x/kylin.sh start -{% endhighlight %} - -我们同样可以在本机的浏览器中打开 Hdfs、Yarn、HBase、Kylin 等服务的页面。 +- HDFS NameNode 页面:[http://127.0.0.1:50070](http://127.0.0.1:50070/) +- YARN ResourceManager 页面:[http://127.0.0.1:8088](http://127.0.0.1:8088/) +- HBase 页面:[http://127.0.0.1:16010](http://127.0.0.1:16010/) ## 容器资源建议 @@ -140,4 +68,5 @@ tar -zxvf /home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz --- -旧版 docker image 请查看 github 项目 [kylin-docker](https://github.com/Kyligence/kylin-docker/). \ No newline at end of file + +关于如何定制修改 Docker image,请参阅 Git 代码库的 [kylin/docker](https://github.com/apache/kylin/tree/master/docker/) \ No newline at end of file diff --git a/website/_docs31/install/kylin_docker.md b/website/_docs31/install/kylin_docker.md index 1cd937f..9847303 100644 --- a/website/_docs31/install/kylin_docker.md +++ b/website/_docs31/install/kylin_docker.md @@ -3,7 +3,7 @@ layout: docs31 title: "Run Kylin with Docker" categories: install permalink: /docs31/install/kylin_docker.html -since: v3.0.0-alpha2 +since: v3.0.0 --- In order to allow users to easily try Kylin, and to facilitate developers to verify and debug after modifying the source code. We provide Kylin's docker image. In this image, each service that Kylin relies on is properly installed and deployed, including: @@ -15,7 +15,7 @@ In order to allow users to easily try Kylin, and to facilitate developers to ver - Spark 2.3.1 - Zookeeper 3.4.6 - Kafka 1.1.1 -- Mysql +- MySQL 5.1.73 - Maven 3.6.1 ## Quickly try Kylin @@ -23,7 +23,7 @@ In order to allow users to easily try Kylin, and to facilitate developers to ver We have pushed the Kylin image for the user to the docker hub. Users do not need to build the image locally, just execute the following command to pull the image from the docker hub: {% highlight Groff markup %} -docker pull apachekylin/apache-kylin-standalone:3.0.0-alpha2 +docker pull apachekylin/apache-kylin-standalone:3.0.1 {% endhighlight %} After the pull is successful, execute the following command to start the container: @@ -36,8 +36,8 @@ docker run -d \ -p 50070:50070 \ -p 8032:8032 \ -p 8042:8042 \ --p 60010:60010 \ -apachekylin/apache-kylin-standalone:3.0.0-alpha2 +-p 16010:16010 \ +apachekylin/apache-kylin-standalone:3.0.1 {% endhighlight %} The following services are automatically started when the container starts: @@ -48,86 +48,14 @@ The following services are automatically started when the container starts: - Kafka - Kylin -and run automatically `$KYLIN_HOME/bin/sample.sh `, create a kylin_streaming_topic topic in Kafka and continue to send data to this topic. This is to let the users start the container and then experience the batch and streaming way to build the cube and query. +and run automatically `$KYLIN_HOME/bin/sample.sh `, create a "kylin_streaming_topic" topic in Kafka and continue to send data to this topic. This is to let the users start the container and then experience the batch and streaming way to build the cube and query. -After the container is started, we can enter the container through the `docker exec` command. Of course, since we have mapped the specified port in the container to the local port, we can open the pages of each service directly in the native browser, such as: +After the container is started, we can enter the container through the `docker exec -it <container_id> bash` command. Of course, since we have mapped the specified port in the container to the local port, we can open the pages of each service directly in the native browser, such as: - Kylin Web UI: [http://127.0.0.1:7070/kylin/login](http://127.0.0.1:7070/kylin/login) - Hdfs NameNode Web UI: [http://127.0.0.1:50070](http://127.0.0.1:50070/) - Yarn ResourceManager Web UI: [http://127.0.0.1:8088](http://127.0.0.1:8088/) -- HBase Web UI: [http://127.0.0.1:60010](http://127.0.0.1:60010/) - -In the container, the relevant environment variables are as follows: - -{% highlight Groff markup %} -JAVA_HOME=/home/admin/jdk1.8.0_141 -HADOOP_HOME=/home/admin/hadoop-2.7.0 -KAFKA_HOME=/home/admin/kafka_2.11-1.1.1 -SPARK_HOME=/home/admin/spark-2.3.1-bin-hadoop2.6 -HBASE_HOME=/home/admin/hbase-1.1.2 -HIVE_HOME=/home/admin/apache-hive-1.2.1-bin -KYLIN_HOME=/home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x -{% endhighlight %} - -## Build image to verify source code modifications - -The docker image can also be used when developers have modified the source code and want to package, deploy, and verify the source code. First, we go to the docker directory under the root directory of the source and execute the script below to build the image and copy the source into the image.: - -{% highlight Groff markup %} -#!/usr/bin/env bash - -echo "start build kylin image base on current source code" - -rm -rf ./kylin -mkdir -p ./kylin - -echo "start copy kylin source code" - -for file in `ls ../../kylin/` -do - if [ docker != $file ] - then - cp -r ../../kylin/$file ./kylin/ - fi -done - -echo "finish copy kylin source code" - -docker build -t apache-kylin-standalone .⏎ -{% endhighlight %} - -Due to need to download and deploy various binary packages over the network, the entire build process can last for tens of minutes, depending on the network. - -When the image build is complete, execute the following command to start the container: - -{% highlight Groff markup %} -docker run -d \ --m 8G \ --p 7070:7070 \ --p 8088:8088 \ --p 50070:50070 \ --p 8032:8032 \ --p 8042:8042 \ --p 60010:60010 \ -apache-kylin-standalone -{% endhighlight %} - -When the container starts, execute the docker exec command to enter the container. The source code is stored in the container dir `/home/admin/kylin_sourcecode`, execute the following command to package the source code: - -{% highlight Groff markup %} -cd /home/admin/kylin_sourcecod -build/script/package.sh -{% endhighlight %} - -After the package is complete, an binary package ending in `.tar.gz` will be generated in the `/home/admin/kylin_sourcecode/dist` directory, such as `apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz`. We can use this binary package to deploy and launch Kylin services such as: - -{% highlight Groff markup %} -cp /home/admin/kylin_sourcecode/dist/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz /home/admin -tar -zxvf /home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x.tar.gz -/home/admin/apache-kylin-3.0.0-alpha2-bin-hbase1x/kylin.sh start -{% endhighlight %} - -We can also open pages for services such as Hdfs, Yarn, HBase, and Kylin in the browser of this machine. +- HBase Web UI: [http://127.0.0.1:16010](http://127.0.0.1:16010/) ## Container resource recommendation @@ -140,4 +68,4 @@ For the resource setting method for the container, please refer to: --- -For old docker image, please check the github page [kylin-docker](https://github.com/Kyligence/kylin-docker/). \ No newline at end of file +For how to customize the image, please check the github page [kylin/docker](https://github.com/apache/kylin/tree/master/docker/). \ No newline at end of file