diff --git a/docs/en/start-v2/docker/docker.md b/docs/en/start-v2/docker/docker.md index 8c76c3fb1fa..25ac52044bf 100644 --- a/docs/en/start-v2/docker/docker.md +++ b/docs/en/start-v2/docker/docker.md @@ -2,11 +2,13 @@ sidebar_position: 3 --- -# Set Up With Docker In Local Mode +# Set Up With Docker -## Zeta Engine +## Set Up With Docker In Local Mode -### Download +### Zeta Engine + +#### Download ```shell docker pull apache/seatunnel: @@ -29,12 +31,12 @@ docker run --rm -it -v /tmp/job/:/config apache/seatunnel: ./bin/se docker run --rm -it -v /tmp/job/:/config apache/seatunnel: ./bin/seatunnel.sh -DJvmOption="-Xms4G -Xmx4G" -m local -c /config/fake_to_console.conf ``` -### Build Image By Yourself +#### Build Image By Yourself Build from source code. The way of downloading the source code is the same as the way of downloading the binary package. You can download the source code from the [download page](https://seatunnel.apache.org/download/) or clone the source code from the [GitHub repository](https://github.com/apache/seatunnel/releases) -#### Build With One Command +##### Build With One Command ```shell cd seatunnel # Use already sett maven profile @@ -44,7 +46,7 @@ sh ./mvnw -B clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dli docker images | grep apache/seatunnel ``` -#### Build Step By Step +##### Build Step By Step ```shell # Build binary package from source code sh ./mvnw clean package -DskipTests -Dskip.spotless=true @@ -82,10 +84,10 @@ RUN cd /opt && \ WORKDIR /opt/seatunnel ``` -## Spark or Flink Engine +### Spark or Flink Engine -### Mount Spark/Flink library +#### Mount Spark/Flink library By default, Spark home is `/opt/spark`, Flink home is `/opt/flink`. If you need run with spark/flink, you can mount the related library to `/opt/spark` or `/opt/flink`. @@ -140,11 +142,11 @@ docker run --rm -it apache/seatunnel bash -c '/bin/start-cluste -# Set Up With Docker In Cluster Mode +## Set Up With Docker In Cluster Mode there has 2 ways to create cluster within docker. -## 1. Use Docker Directly +### 1. Use Docker Directly 1. create a network ```shell @@ -188,7 +190,7 @@ docker run -d --name seatunnel_worker_2 \ ``` -### Scale your Cluster +#### Scale your Cluster run this command to start master node. ```shell @@ -211,8 +213,7 @@ docker run -d --name seatunnel_worker_1 \ ``` - -## 2. Use Docker-compose +### 2. Use Docker-compose > docker cluster mode is only support zeta engine. @@ -283,7 +284,7 @@ And when you call `http://localhost:5801/hazelcast/rest/maps/system-monitoring-i After that, you can use client or restapi to submit job to this cluster. -### Scale your Cluster +#### Scale your Cluster If you want to increase cluster node, like add a new work node. @@ -364,7 +365,8 @@ networks: and run `docker-compose up -d` command, the new worker node will start, and the current node won't restart. -## Job Operation on cluster + +### Job Operation on cluster 1. use docker as a client - submit job : diff --git a/docs/zh/start-v2/docker/docker.md b/docs/zh/start-v2/docker/docker.md index 6a7c0ca4fea..bccd4b068f1 100644 --- a/docs/zh/start-v2/docker/docker.md +++ b/docs/zh/start-v2/docker/docker.md @@ -2,11 +2,13 @@ sidebar_position: 3 --- -# 使用Docker启用本地模式 +# 使用Docker进行部署 -## Zeta 引擎 +## 使用Docker启用本地模式 -### 下载镜像 +### Zeta 引擎 + +#### 下载镜像 ```shell docker pull apache/seatunnel: @@ -29,12 +31,12 @@ docker run --rm -it -v /tmp/job/:/config apache/seatunnel: ./bin/se docker run --rm -it -v /tmp/job/:/config apache/seatunnel: ./bin/seatunnel.sh -DJvmOption="-Xms4G -Xmx4G" -m local -c /config/fake_to_console.conf ``` -### 自己构建镜像 +#### 自己构建镜像 从源代码构建。下载源码的方式和下载二进制包的方式是一样的。 你可以从[下载地址](https://seatunnel.apache.org/download/)下载源码, 或者从[GitHub 仓库](https://github.com/apache/seatunnel/releases)克隆源代码 -#### 一个命令来构建容器 +##### 一个命令来构建容器 ```shell cd seatunnel # Use already sett maven profile @@ -44,7 +46,7 @@ mvn -B clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dlicense. docker images | grep apache/seatunnel ``` -#### 分步骤构建 +##### 分步骤构建 ```shell # Build binary package from source code mvn clean package -DskipTests -Dskip.spotless=true @@ -82,10 +84,10 @@ RUN cd /opt && \ WORKDIR /opt/seatunnel ``` -## Spark/Flink引擎 +### Spark/Flink引擎 -### 挂载 Spark/Flink +#### 挂载 Spark/Flink 默认设值下,Spark的目录为`/opt/spark`, Flink的目录为 `/opt/flink`. 如果你需要运行Spark或Flink引擎,你需要将相关依赖挂载到`/opt/spark`或`/opt/flink`目录下. @@ -140,14 +142,14 @@ docker run --rm -it apache/seatunnel bash -c '/bin/start-cluste -# 使用Docker配置集群模式 +## 使用Docker配置集群模式 docker下的集群模式仅支持Zeta引擎 有两种方式来启动集群 -## 1. 直接使用Docker +### 1. 直接使用Docker 1. 创建一个network ```shell @@ -190,7 +192,7 @@ docker run -d --name seatunnel_worker_2 \ ``` -### 集群扩容 +#### 集群扩容 ```shell ## start master and export 5801 port @@ -212,7 +214,7 @@ docker run -d --name seatunnel_worker_1 \ ./bin/seatunnel-cluster.sh -r worker ``` -## 2. 使用docker-compose +### 2. 使用docker-compose `docker-compose.yaml` 配置文件为: ```yaml version: '3.8' @@ -277,7 +279,7 @@ networks: 启动完成后,可以运行`docker logs -f seatunne_master`, `docker logs -f seatunnel_worker_1`来查看节点的日志 当你访问`http://localhost:5801/hazelcast/rest/maps/system-monitoring-information` 时,可以看到集群的状态为1个master节点,2个worker节点. -### 集群扩容 +#### 集群扩容 当你需要对集群扩容, 例如需要添加一个worker节点时 ```yaml version: '3.8' @@ -356,7 +358,7 @@ networks: 然后运行`docker-compose up -d`命令, 将会新建一个worker节点, 已有的节点不会重启. -## 提交作业到集群 +### 提交作业到集群 1. 使用docker container作为客户端 - 提交任务