You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ni...@apache.org on 2019/08/27 10:25:14 UTC

[kylin] branch document updated: KYLIN-4146 Add doc for KYLIN-4114

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


The following commit(s) were added to refs/heads/document by this push:
     new ce9faef  KYLIN-4146 Add doc for KYLIN-4114
ce9faef is described below

commit ce9faefcd90cd7850b9b2ca76c72dbbdaac447bc
Author: weibin0516 <co...@126.com>
AuthorDate: Thu Aug 22 14:58:56 2019 +0800

    KYLIN-4146 Add doc for KYLIN-4114
---
 website/_docs/install/kylin_docker.cn.md   | 141 ++++++++++++++++++++++++++++-
 website/_docs/install/kylin_docker.md      | 141 ++++++++++++++++++++++++++++-
 website/_docs30/install/kylin_docker.cn.md | 139 +++++++++++++++++++++++++++-
 website/_docs30/install/kylin_docker.md    | 139 +++++++++++++++++++++++++++-
 4 files changed, 546 insertions(+), 14 deletions(-)

diff --git a/website/_docs/install/kylin_docker.cn.md b/website/_docs/install/kylin_docker.cn.md
index e1b9e4d..96f515d 100644
--- a/website/_docs/install/kylin_docker.cn.md
+++ b/website/_docs/install/kylin_docker.cn.md
@@ -1,10 +1,143 @@
 ---
-layout: docs
+layout: docs30
 title:  "用 Docker 运行 Kylin"
 categories: install
 permalink: /cn/docs/install/kylin_docker.html
-version: v1.5.3
-since: v1.5.2
+since: v3.0.0-alpha2
 ---
 
-请查看 github 项目 [kylin-docker](https://github.com/Kyligence/kylin-docker/).
+为了让用户方便的试用 Kylin,以及方便开发者在修改了源码后进行验证及调试。我们提供了 Kylin 的 docker 镜像。该镜像中,Kylin 依赖的各个服务均已正确的安装及部署,包括:
+
+- Jdk 1.8
+- Hadoop 2.7.0
+- Hive 1.2.1
+- Hbase 1.1.2
+- Spark 2.3.1
+- Zookeeper 3.4.6
+- Kafka 1.1.1
+- Mysql
+- Maven 3.6.1
+
+## 快速试用 Kylin
+
+我们已将面向用户的 Kylin 镜像上传至 docker 仓库,用户无需在本地构建镜像,直接执行以下命令从 docker 仓库 pull 镜像:
+
+{% highlight Groff markup %}
+docker pull apachekylin/apache-kylin-standalone:3.0.0-alpha2
+{% endhighlight %}
+
+pull 成功后,执行以下命令启动容器:
+
+{% 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 \
+apachekylin/apache-kylin-standalone:3.0.0-alpha2
+{% endhighlight %}
+
+在容器启动时,会自动启动以下服务:
+
+- NameNode, DataNode
+- ResourceManager, NodeManager
+- HBase
+- Kafka
+- Kylin
+
+并自动运行 `$KYLIN_HOME/bin/sample.sh ` 及在 Kafka 中创建 kylin_streaming_topic topic 并持续向该 topic 中发送数据。这是为了让用户启动容器后,就能体验以批和流的方式的方式构建 Cube 并进行查询。
+
+容器启动后,我们可以通过 docker exec 命令进入容器内。当然,由于我们已经将容器内指定端口映射到本机端口,我们可以直接在本机浏览器中打开各个服务的页面,如:
+
+- 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 等服务的页面。
+
+## 容器资源建议
+
+为了让 Kylin 能够顺畅的构建 Cube,我们为 Yarn NodeManager 配置的内存资源为 6G,加上各服务占用的内存,请保证容器的内存不少于 8G,以免因为内存不足导致出错。
+
+为容器设置资源方法请参考:
+
+- Mac 用户:<https://docs.docker.com/docker-for-mac/#advanced>
+- Linux 用户:<https://docs.docker.com/config/containers/resource_constraints/#memory>
+
+---
+
+旧版 docker image 请查看 github 项目 [kylin-docker](https://github.com/Kyligence/kylin-docker/).
\ No newline at end of file
diff --git a/website/_docs/install/kylin_docker.md b/website/_docs/install/kylin_docker.md
index 7aa9ba6..df4c6d6 100644
--- a/website/_docs/install/kylin_docker.md
+++ b/website/_docs/install/kylin_docker.md
@@ -1,10 +1,143 @@
 ---
-layout: docs
+layout: docs30
 title:  "Run Kylin with Docker"
 categories: install
 permalink: /docs/install/kylin_docker.html
-version: v1.5.3
-since: v1.5.2
+since: v3.0.0-alpha2
 ---
 
-For more information, please refer to this project [kylin-docker](https://github.com/Kyligence/kylin-docker/) on GitHub.
+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:
+
+- Jdk 1.8
+- Hadoop 2.7.0
+- Hive 1.2.1
+- Hbase 1.1.2
+- Spark 2.3.1
+- Zookeeper 3.4.6
+- Kafka 1.1.1
+- Mysql
+- Maven 3.6.1
+
+## Quickly try Kylin
+
+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
+{% endhighlight %}
+
+After the pull is successful, 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 \
+apachekylin/apache-kylin-standalone:3.0.0-alpha2
+{% endhighlight %}
+
+The following services are automatically started when the container starts: 
+
+- NameNode, DataNode
+- ResourceManager, NodeManager
+- HBase
+- 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.
+
+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: 
+
+- 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.
+
+## Container resource recommendation
+
+In order to allow Kylin to build the cube smoothly, the memory resource we configured for Yarn NodeManager is 6G, plus the memory occupied by each service, please ensure that the memory of the container is not less than 8G, so as to avoid errors due to insufficient memory.
+
+For the resource setting method for the container, please refer to:
+
+- Mac user: <https://docs.docker.com/docker-for-mac/#advanced>
+- Linux user: <https://docs.docker.com/config/containers/resource_constraints/#memory>
+
+---
+
+For old docker image, please check the github page [kylin-docker](https://github.com/Kyligence/kylin-docker/).
\ No newline at end of file
diff --git a/website/_docs30/install/kylin_docker.cn.md b/website/_docs30/install/kylin_docker.cn.md
index 662b269..b4e1d1f 100644
--- a/website/_docs30/install/kylin_docker.cn.md
+++ b/website/_docs30/install/kylin_docker.cn.md
@@ -3,8 +3,141 @@ layout: docs30
 title:  "用 Docker 运行 Kylin"
 categories: install
 permalink: /cn/docs30/install/kylin_docker.html
-version: v1.5.3
-since: v1.5.2
+since: v3.0.0-alpha2
 ---
 
-请查看 github 项目 [kylin-docker](https://github.com/Kyligence/kylin-docker/).
+为了让用户方便的试用 Kylin,以及方便开发者在修改了源码后进行验证及调试。我们提供了 Kylin 的 docker 镜像。该镜像中,Kylin 依赖的各个服务均已正确的安装及部署,包括:
+
+- Jdk 1.8
+- Hadoop 2.7.0
+- Hive 1.2.1
+- Hbase 1.1.2
+- Spark 2.3.1
+- Zookeeper 3.4.6
+- Kafka 1.1.1
+- Mysql
+- Maven 3.6.1
+
+## 快速试用 Kylin
+
+我们已将面向用户的 Kylin 镜像上传至 docker 仓库,用户无需在本地构建镜像,直接执行以下命令从 docker 仓库 pull 镜像:
+
+{% highlight Groff markup %}
+docker pull apachekylin/apache-kylin-standalone:3.0.0-alpha2
+{% endhighlight %}
+
+pull 成功后,执行以下命令启动容器:
+
+{% 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 \
+apachekylin/apache-kylin-standalone:3.0.0-alpha2
+{% endhighlight %}
+
+在容器启动时,会自动启动以下服务:
+
+- NameNode, DataNode
+- ResourceManager, NodeManager
+- HBase
+- Kafka
+- Kylin
+
+并自动运行 `$KYLIN_HOME/bin/sample.sh ` 及在 Kafka 中创建 kylin_streaming_topic topic 并持续向该 topic 中发送数据。这是为了让用户启动容器后,就能体验以批和流的方式的方式构建 Cube 并进行查询。
+
+容器启动后,我们可以通过 docker exec 命令进入容器内。当然,由于我们已经将容器内指定端口映射到本机端口,我们可以直接在本机浏览器中打开各个服务的页面,如:
+
+- 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 等服务的页面。
+
+## 容器资源建议
+
+为了让 Kylin 能够顺畅的构建 Cube,我们为 Yarn NodeManager 配置的内存资源为 6G,加上各服务占用的内存,请保证容器的内存不少于 8G,以免因为内存不足导致出错。
+
+为容器设置资源方法请参考:
+
+- Mac 用户:<https://docs.docker.com/docker-for-mac/#advanced>
+- Linux 用户:<https://docs.docker.com/config/containers/resource_constraints/#memory>
+
+---
+
+旧版 docker image 请查看 github 项目 [kylin-docker](https://github.com/Kyligence/kylin-docker/).
\ No newline at end of file
diff --git a/website/_docs30/install/kylin_docker.md b/website/_docs30/install/kylin_docker.md
index b61e43a..6443941 100644
--- a/website/_docs30/install/kylin_docker.md
+++ b/website/_docs30/install/kylin_docker.md
@@ -3,8 +3,141 @@ layout: docs30
 title:  "Run Kylin with Docker"
 categories: install
 permalink: /docs30/install/kylin_docker.html
-version: v1.5.3
-since: v1.5.2
+since: v3.0.0-alpha2
 ---
 
-For more information, please refer to this project [kylin-docker](https://github.com/Kyligence/kylin-docker/) on GitHub.
+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:
+
+- Jdk 1.8
+- Hadoop 2.7.0
+- Hive 1.2.1
+- Hbase 1.1.2
+- Spark 2.3.1
+- Zookeeper 3.4.6
+- Kafka 1.1.1
+- Mysql
+- Maven 3.6.1
+
+## Quickly try Kylin
+
+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
+{% endhighlight %}
+
+After the pull is successful, 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 \
+apachekylin/apache-kylin-standalone
+{% endhighlight %}
+
+The following services are automatically started when the container starts: 
+
+- NameNode, DataNode
+- ResourceManager, NodeManager
+- HBase
+- 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.
+
+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: 
+
+- 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:3.0.0-alpha2
+{% 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.
+
+## Container resource recommendation
+
+In order to allow Kylin to build the cube smoothly, the memory resource we configured for Yarn NodeManager is 6G, plus the memory occupied by each service, please ensure that the memory of the container is not less than 8G, so as to avoid errors due to insufficient memory.
+
+For the resource setting method for the container, please refer to:
+
+- Mac user: <https://docs.docker.com/docker-for-mac/#advanced>
+- Linux user: <https://docs.docker.com/config/containers/resource_constraints/#memory>
+
+---
+
+For old docker image, please check the github page [kylin-docker](https://github.com/Kyligence/kylin-docker/).
\ No newline at end of file