|
|
|
@ -13,16 +13,16 @@ Kubernetes部署目的是在Kubernetes集群中部署 DolphinScheduler 服务,
|
|
|
|
|
|
|
|
|
|
## 安装 dolphinscheduler |
|
|
|
|
|
|
|
|
|
请下载源码包 apache-dolphinscheduler-3.0.0-beta-2-src.tar.gz,下载地址: [下载](/zh-cn/download/download.html) |
|
|
|
|
请下载源码包 apache-dolphinscheduler-<version>-src.tar.gz,下载地址: [下载](/zh-cn/download/download.html) |
|
|
|
|
|
|
|
|
|
发布一个名为 `dolphinscheduler` 的版本(release),请执行以下命令: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
$ tar -zxvf apache-dolphinscheduler-3.0.0-beta-2-src.tar.gz |
|
|
|
|
$ cd apache-dolphinscheduler-3.0.0-beta-2-src/deploy/kubernetes/dolphinscheduler |
|
|
|
|
$ tar -zxvf apache-dolphinscheduler-<version>-src.tar.gz |
|
|
|
|
$ cd apache-dolphinscheduler-<version>-src/deploy/kubernetes/dolphinscheduler |
|
|
|
|
$ helm repo add bitnami https://charts.bitnami.com/bitnami |
|
|
|
|
$ helm dependency update . |
|
|
|
|
$ helm install dolphinscheduler . --set image.tag=3.0.0-beta-2 |
|
|
|
|
$ helm install dolphinscheduler . --set image.tag=<version> |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
将名为 `dolphinscheduler` 的版本(release) 发布到 `test` 的命名空间中: |
|
|
|
@ -196,11 +196,14 @@ kubectl scale --replicas=6 sts dolphinscheduler-worker -n test # with test names
|
|
|
|
|
2. 创建一个新的 `Dockerfile`,用于添加 MySQL 的驱动包: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:3.0.0-beta-2 |
|
|
|
|
# For example |
|
|
|
|
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-tools:3.0.0-beta-2 |
|
|
|
|
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:<version> |
|
|
|
|
# 例如 |
|
|
|
|
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-tools:<version> |
|
|
|
|
|
|
|
|
|
COPY mysql-connector-java-8.0.16.jar /opt/dolphinscheduler/lib |
|
|
|
|
# 注意,如果构建的是dolphinscheduler-tools镜像 |
|
|
|
|
# 需要将下面一行修改为COPY mysql-connector-java-8.0.16.jar /opt/dolphinscheduler/tools/libs |
|
|
|
|
# 其他服务保持不变即可 |
|
|
|
|
COPY mysql-connector-java-8.0.16.jar /opt/dolphinscheduler/libs |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
3. 构建一个包含 MySQL 驱动包的新镜像: |
|
|
|
@ -244,15 +247,15 @@ externalDatabase:
|
|
|
|
|
3. 创建一个新的 `Dockerfile`,用于添加 MySQL 或者 Oracle 驱动包: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:3.0.0-beta-2 |
|
|
|
|
# For example |
|
|
|
|
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:3.0.0-beta-2 |
|
|
|
|
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-<service>:<version> |
|
|
|
|
# 例如 |
|
|
|
|
# FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:<version> |
|
|
|
|
|
|
|
|
|
# If you want to support MySQL Datasource |
|
|
|
|
COPY mysql-connector-java-8.0.16.jar /opt/dolphinscheduler/lib |
|
|
|
|
# 如果你想支持 MySQL 数据源 |
|
|
|
|
COPY mysql-connector-java-8.0.16.jar /opt/dolphinscheduler/libs |
|
|
|
|
|
|
|
|
|
# If you want to support Oracle Datasource |
|
|
|
|
COPY ojdbc8-19.9.0.0.jar /opt/dolphinscheduler/lib |
|
|
|
|
# 如果你想支持 Oracle 数据源 |
|
|
|
|
COPY ojdbc8-19.9.0.0.jar /opt/dolphinscheduler/libs |
|
|
|
|
``` |
|
|
|
|
|
|
|
|
|
3. 构建一个包含 MySQL 或者 Oracle 驱动包的新镜像: |
|
|
|
@ -276,7 +279,7 @@ docker build -t apache/dolphinscheduler-<service>:new-driver .
|
|
|
|
|
1. 创建一个新的 `Dockerfile`,用于安装 pip: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:3.0.0-beta-2 |
|
|
|
|
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:<version> |
|
|
|
|
COPY requirements.txt /tmp |
|
|
|
|
RUN apt-get update && \ |
|
|
|
|
apt-get install -y --no-install-recommends python-pip && \ |
|
|
|
@ -311,7 +314,7 @@ docker build -t apache/dolphinscheduler-worker:pip .
|
|
|
|
|
1. 创建一个新的 `Dockerfile`,用于安装 Python 3: |
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:3.0.0-beta-2 |
|
|
|
|
FROM dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler-worker:<version> |
|
|
|
|
RUN apt-get update && \ |
|
|
|
|
apt-get install -y --no-install-recommends python3 && \ |
|
|
|
|
rm -rf /var/lib/apt/lists/* |
|
|
|
|