You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@streampark.apache.org by mo...@apache.org on 2022/10/10 04:45:01 UTC

[incubator-streampark-website] branch dev updated: Update dockerDeployment.md

This is an automated email from the ASF dual-hosted git repository.

monster pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-streampark-website.git


The following commit(s) were added to refs/heads/dev by this push:
     new f35c6d28 Update dockerDeployment.md
f35c6d28 is described below

commit f35c6d28c4796657a843d82b5ecc0d4f7df516f6
Author: Monster <25...@qq.com>
AuthorDate: Mon Oct 10 12:43:42 2022 +0800

    Update dockerDeployment.md
---
 docs/user-guide/4-dockerDeployment.md              | 64 ++++++++++-----------
 .../current/user-guide/4-dockerDeployment.md       | 65 +++++++++++-----------
 2 files changed, 63 insertions(+), 66 deletions(-)

diff --git a/docs/user-guide/4-dockerDeployment.md b/docs/user-guide/4-dockerDeployment.md
index 2b88c4d7..c66be246 100644
--- a/docs/user-guide/4-dockerDeployment.md
+++ b/docs/user-guide/4-dockerDeployment.md
@@ -4,55 +4,51 @@ title: 'Docker Quick Tutorial'
 sidebar_position: 4
 ---
 
-This tutorial uses the docker-compose method to deploy StreamPark via Docker.
+This tutorial uses the docker method to deploy StreamPark via Docker.
 ## Prepare
     Docker 1.13.1+
     Docker Compose 1.28.0+
-## Using docker-compose to Start Server
+### Installing docker
 
-To start the service with docker-compose, you need to install [docker-compose](https://docs.docker.com/compose/install/),first, the link is available for Mac, Linux, Windows.
+To start the service with docker, you need to install [docker](https://www.docker.com/) first
 
-After installing docker-compose, we need to modify some of the configurations to better experience the StreamPark service, we need to configure at least 4GB of memory.
+### Installing docker-compose
 
-    Mac:Click Docker Desktop -> Preferences -> Resources -> Memory modified it
-    Windows Docker Desktop:
-        Hyper-V mode: Click Docker Desktop -> Settings -> Resources -> Memory modified it
-        WSL 2 mode: see WSL 2 utility VM for more detail.
+To start the service with docker-compose, you need to install [docker-compose](https://docs.docker.com/compose/install/) first
+## Rapid StreamPark Deployment
 
-
-After completing the configuration, we can get the source package of StreamPark files from the download page and make sure you get the correct version.
-After downloading the package, you can run the following command.
-
-### 1.Build via mvn
-```
-./build.sh
-```
-![](/doc/image/streamx_build.png)
-Note: The Scala version of Flink and the Scala version of StreamPark need to be consistent, please choose Scala 2.12 for this build.
-
-### 2.Execute the Docker Compose build command
+### StreamPark deployment based on h2 and docker-compose
 ```
-cd deploy/docker
+wget https://github.com/apache/incubator-streampark/blob/dev/deploy/docker/docker-compose.yaml
 docker-compose up -d
 ```
-![](/doc/image/streamx_docker-compose.png)
-### 3.Login System
 
 Once the service is started, StreamPark can be accessed through http://localhost:10000 and also through http://localhost:8081 to access Flink. Accessing the StreamPark link will redirect you to the login page, where the default user and password for StreamPark are admin and streamx respectively. To learn more about the operation, please refer to the user manual for a quick start.
 
-### 4.Setting up Flink Home on StreamPark Web Ui
+### Use existing Mysql services
+This approach is suitable for enterprise production, where you can quickly deploy strempark based on docker and associate it with an online database
+
 ```
-/streamx/flink/flink1.14.5/
+docker run -d --name streampark \
+    -e DATABASE="mysql" \
+    -e SPRING_DATASOURCE_URL="jdbc:mysql://localhost:3306/<DATABASE>" \
+    -e SPRING_DATASOURCE_USERNAME="<USER>" \
+    -e SPRING_DATASOURCE_PASSWORD="<PASSWORD>" \
+    -p 10000:10000 \
+    -v /var/run/docker.sock:/var/run/docker.sock \
+    -v /etc/hosts:/etc/hosts \
+    -v ~/.kube:/root/.kube \
+    --net host \
+    -d apache/incubator-streampark:"${STREAMPARK_VERSION}" /bin/sh -c "wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.30.tar.gz && tar -zxvf mysql-connector-java-8.0.30.tar.gz && cp mysql-connector-java-8.0.30/mysql-connector-java-8.0.30.jar lib && bash bin/startup.sh"
 ```
-![img.png](/doc/image/streamx_flinkhome.png)
-### 5.Starting a remote session cluster
-
-Go to StreamPark web ui and click Setting->Flink Cluster to create a remote (standalone) mode cluster.
-![img.png](/doc/image/remote.png)
 
-tips: mac computer to get the real ip address of flink, can be through ifconfig.
+## Login System
 
-### 6.Complete the above steps and perform a Flink task submission
+Once the service is started, StreamPark can be accessed through http://localhost:10000 and also through http://localhost:8081访问Flink
+After accessing the StreamPark link you will be redirected to the login page, the default user and password for StreamPark are admin and streampark respectively. To learn more about the operation please refer to the user manual for a quick start
 
-In the StreamPark web ui click Application->Add New to create a remote (standalone) mode submission.
-![img.png](/doc/image/remoteSubmission.png)
+## Setting up Flink Home on StreamPark Web Ui
+```
+streampark/flink/flink1.14.5/
+```
+![](/doc/image/streamx_flinkhome.png)
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/user-guide/4-dockerDeployment.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/user-guide/4-dockerDeployment.md
index 6a587b3c..97495bf8 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/user-guide/4-dockerDeployment.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/user-guide/4-dockerDeployment.md
@@ -4,52 +4,53 @@ title: 'Docker 快速使用教程'
 sidebar_position: 4
 ---
 
-本教程使用docker-compose方式通过 Docker 完成StreamPark的部署。
+本教程使用 Docker 完成StreamPark的部署。
 ## 前置条件
+
     Docker 1.13.1+
     Docker Compose 1.28.0+
-## 使用 docker-compose 启动服务
-
-使用 docker-compose 启动服务,需要先安装 [docker-compose](https://docs.docker.com/compose/install/),链接适用于 Mac,Linux,Windows。
-
-安装完成 docker-compose 后我们需要修改部分配置以便能更好体验 StreamPark 服务,我们需要配置不少于 4GB 的内存:
 
-    Mac:点击 Docker Desktop -> Preferences -> Resources -> Memory 调整内存大小
-    Windows Docker Desktop:
-        Hyper-V 模式:点击 Docker Desktop -> Settings -> Resources -> Memory 调整内存大小
-        WSL 2 模式 模式:参考 WSL 2 utility VM 调整内存大小
+### 安装docker
+使用 docker 启动服务,需要先安装 [docker](https://www.docker.com/)
 
-完成配置后,我们可以从下载页面获取StreamPark文件的源包,并确保您获得正确的版本。下载软件包后,您可以运行以下命令。
+### 安装docker-compose
+使用 docker-compose 启动服务,需要先安装 [docker-compose](https://docs.docker.com/compose/install/)
 
-### 1.通过 mvn 构建
-```
-./build.sh
-```
-![](/doc/image/streamx_build.png)
-注意:Flink的Scala版本和StreamPark的Scala版本需要保持一致,本次构建请选择Scala 2.12。
+## 快速StreamPark部署
 
-### 2.执行 Docker Compose 构建命令
+### 基于h2和docker-compose进行StreamPark部署
+该方式适用于入门学习、熟悉功能特性
 ```
-cd deploy/docker
+wget https://github.com/apache/incubator-streampark/blob/dev/deploy/docker/docker-compose.yaml
 docker-compose up -d
 ```
-![](/doc/image/streamx_docker-compose.png)
-### 3.登陆系统
-
 服务启动后,可以通过 http://localhost:10000 访问 StreamPark,同时也可以通过 http://localhost:8081访问Flink。访问StreamPark链接后会跳转到登陆页面,StreamPark 默认的用户和密码分别为 admin 和 streamx。想要了解更多操作请参考用户手册快速上手。
+![](/doc/image/streamx_docker-compose.png)
+该部署方式会自动给你启动一个flink-session集群供你去进行flink任务使用,同时也会挂载本地docker服务以及~/.kube来用于k8s模式的任务提交
 
-### 4.在 StreamPark Web Ui 上设置 Flink Home
+### 沿用已有的 Mysql 服务
+该方式适用于企业生产,你可以基于docker快速部署strempark并将其和线上数据库进行关联
 ```
-/streamx/flink/flink1.14.5/
+docker run -d --name streampark \
+    -e DATABASE="mysql" \
+    -e SPRING_DATASOURCE_URL="jdbc:mysql://localhost:3306/<DATABASE>" \
+    -e SPRING_DATASOURCE_USERNAME="<USER>" \
+    -e SPRING_DATASOURCE_PASSWORD="<PASSWORD>" \
+    -p 10000:10000 \
+    -v /var/run/docker.sock:/var/run/docker.sock \
+    -v /etc/hosts:/etc/hosts \
+    -v ~/.kube:/root/.kube \
+    --net host \
+    -d apache/incubator-streampark:"${STREAMPARK_VERSION}" /bin/sh -c "wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-8.0.30.tar.gz && tar -zxvf mysql-connector-java-8.0.30.tar.gz && cp mysql-connector-java-8.0.30/mysql-connector-java-8.0.30.jar lib && bash bin/startup.sh"
 ```
-![](/doc/image/streamx_flinkhome.png)
-### 5.启动远程会话集群
 
-进入StreamPark web ui点击Setting->Flink Cluster 创建一个remote (standalone)模式的集群。
-![](/doc/image/remote.png)
-tips:mac电脑获取flink的真实ip地址,可以通过ifconfig。
+## 登陆系统
 
-### 6.完成以上步骤,进行Flink任务提交
+服务启动后,可以通过 http://localhost:10000 访问 StreamPark,同时也可以通过 http://localhost:8081访问Flink
+访问StreamPark链接后会跳转到登陆页面,StreamPark 默认的用户和密码分别为 admin 和 streampark。想要了解更多操作请参考用户手册快速上手
 
-在StreamPark web ui点击Application->Add New 创建一个remote (standalone)模式提交。
-![](/doc/image/remoteSubmission.png)
+## 在 StreamPark Web Ui 上设置 Flink Home
+```
+streampark/flink/flink1.14.5/
+```
+![](/doc/image/streamx_flinkhome.png)