From 6dec85fb945be7d895d517915bf29eeffa2675c7 Mon Sep 17 00:00:00 2001 From: Jarvis Date: Sun, 8 Oct 2023 21:56:08 +0800 Subject: [PATCH] [Docs] update docker deploy document --- docs/en/start-v2/docker/docker.md | 106 +++++++++++++++++++++ docs/en/start-v2/docker/docker_for_zeta.md | 48 ---------- 2 files changed, 106 insertions(+), 48 deletions(-) create mode 100644 docs/en/start-v2/docker/docker.md delete mode 100644 docs/en/start-v2/docker/docker_for_zeta.md diff --git a/docs/en/start-v2/docker/docker.md b/docs/en/start-v2/docker/docker.md new file mode 100644 index 00000000000..39dc36a4dd8 --- /dev/null +++ b/docs/en/start-v2/docker/docker.md @@ -0,0 +1,106 @@ +--- + +sidebar_position: 3 +------------------- + +# Set Up with Docker in local mode + +## Zeta Engine + +### 1. Download basic image + +```shell +docker pull seatunnel-basic-image:version +``` + +### 2. Install the connectors you needed + +there has multiple ways to install the connector jar. + +a. rebuild customized image with the basic image + +```Dockerfile +FROM seatunnel-basic-image:version + +# change the connector name and version +RUN wget https://repo1.maven.org/maven2/org/apache/seatunnel///-.jar -P /opt/seatunnel/connectors/seatunel && \ + wget https://repo1.maven.org/maven2/org/apache/seatunnel///-.jar -P /opt/seatunnel/connectors/seatunel + +# eg: +# RUN wget https://repo1.maven.org/maven2/org/apache/seatunnel/connector-kafka/2.3.0/connector-kafka-2.3.0.jar -P /opt/seatunnel/connectors/seatunel +... + +``` + +b. Mount the lib locally +you can download the lib from maven to local manually, and mount this folder to container. + +```shell +docker run -v :/opt/seatunnel/connectors/seatunel \ + ... + seatunnel-basic-image:version +``` + +### 3. Start The job + +```shell +# batch process +docker run --rm -it seatunnel-basic-image:version bash ./bin/seatunnel.sh -e local -c config/v2.batch.config.template + +# start streaming process +docker run --rm -it seatunnel-basic-image:version bash ./bin/seatunnel.sh -e local -c config/v2.streaming.conf.template +``` + +## Spark or Flink Engine + +### 1. Download basic image + +refer the step as Zeta Engine + +### 2. Install the connectors you needed + +refer the step as Zeta Engine + +### 3. 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/spark`. + +```shell +docker run \ + -v :/opt/spark \ + ... +``` + +Or you can change the `SPARK_HOME`, `FLINK_HOME` environment variable in Dockerfile and mount the spark/flink to related path. + +```Dockerfile +FROM seatunnel-basic-image:version + +ENV SPARK_HOME= + +... + +``` + +```shell +docker run \ + -v : \ + ... +``` + +### Start The job + +```shell +# spark2 +docker run --rm -it seatunnel-basic-image:version bash ./bin/start-seatunnel-spark-2-connector-v2.sh -c config/v2.batch.config.template + +# spark3 +docker run --rm -it seatunnel-basic-image:version bash ./bin/start-seatunnel-spark-3-connector-v2.sh -c config/v2.batch.config.template + +# flink version between `1.12.x` and `1.14.x` +docker run --rm -it seatunnel-basic-image:version bash ./bin/start-seatunnel-flink-13-connector-v2.sh -c config/v2.streaming.conf.template +# flink version between `1.15.x` and `1.16.x` +docker run --rm -it seatunnel-basic-image:version bash ./bin/start-seatunnel-flink-15-connector-v2.sh -c config/v2.streaming.conf.template +``` + diff --git a/docs/en/start-v2/docker/docker_for_zeta.md b/docs/en/start-v2/docker/docker_for_zeta.md deleted file mode 100644 index c5fdbc5262a..00000000000 --- a/docs/en/start-v2/docker/docker_for_zeta.md +++ /dev/null @@ -1,48 +0,0 @@ ---- - -sidebar_position: 3 -------------------- - -# Set Up with Docker - -### Download basic image - -```shell -docker pull seatunnel-light:version -``` - -### Install the connectors you needed - -there has multiple ways to install the connector jar. -1. rebuild customized image with the basic image - -```Dockerfile -FROM seatunnel-light:version - -# change the connector name and version -RUN wget https://repo1.maven.org/maven2/org/apache/seatunnel///-.jar -P /opt/seatunnel/connectors/seatunel && \ - wget https://repo1.maven.org/maven2/org/apache/seatunnel///-.jar -P /opt/seatunnel/connectors/seatunel - -... - -``` - -2. Mount the lib locally - you can download the lib from maven to local manually, and mount this folder to container. - -```shell -docker run -v :/opt/seatunnel/connectors/seatunel \ - ... - seatunnel-basic-image:version -``` - -### Start The job - -```shell -## batch process -docker run --rm -it seatunnel-basic-image:version bash ./bin/seatunnel.sh -e local --config config/v2.batch.config.template - -# start streaming process -docker run --rm -it seatunnel-basic-image:version bash ./bin/seatunnel.sh -e local --config config/v2.streaming.conf.template -``` -