Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/configs/docsdev.js
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,23 @@ export default {
},
],
},
{
title: 'registry-plugins',
children: [
{
title: 'ETCD',
link: '/en-us/docs/dev/user_doc/guide/installation/registry-plugins/etcd.html',
},
{
title: 'JDBC',
link: '/en-us/docs/dev/user_doc/guide/installation/registry-plugins/jdbc.html',
},
{
title: 'Zookeeper',
link: '/en-us/docs/dev/user_doc/guide/installation/registry-plugins/zookeeper.html',
},
],
},
],
},
{
Expand Down Expand Up @@ -1219,6 +1236,23 @@ export default {
},
],
},
{
title: '注册中心插件',
children: [
{
title: 'ETCD',
link: '/zh-cn/docs/dev/user_doc/guide/installation/registry-plugins/etcd.html',
},
{
title: 'JDBC',
link: '/zh-cn/docs/dev/user_doc/guide/installation/registry-plugins/jdbc.html',
},
{
title: 'Zookeeper',
link: '/zh-cn/docs/dev/user_doc/guide/installation/registry-plugins/zookeeper.html',
},
],
},
],
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

This module is the etcd registry plugin module, this plugin will use etcd as the registry center.
This plugin will use etcd as the registry center.

# How to use

Expand Down Expand Up @@ -30,12 +30,12 @@ registry:

If your etcd server has configured with ssl, about certification files you can see [here](https://github.com/etcd-io/jetcd/blob/main/docs/SslConfig.md) for how to convert.

> If you need ssl certification, you need to make sure your jdk version is newer than Java 8u252 (April 2020), jdk11 works well too.
> If you need ssl certification, you need to make sure your jdk version is newer than Java 8u252 (April 2020), jdk11 works well too.
>
> By the way, the jdk version in docker images `FROM eclipse-temurin:8-jre` now is 8u362 works well, don't need change.
>
> Because after version 8u252 has native support for ALPN. Detail you can see:
>
>
> https://github.com/grpc/grpc-java/issues/5369#issuecomment-751885384

After do this config, you can start your DolphinScheduler cluster, your cluster will use etcd as registry center to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

This module is the jdbc registry plugin module, this plugin will use jdbc as the registry center. Will use the database
This plugin will use jdbc as the registry center. Will use the database
configuration same as DolphinScheduler in api'yaml default.

# How to use
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Introduction

This module is the zookeeper registry plugin module, this plugin will use zookeeper as the registry center.
This plugin will use zookeeper as the registry center.

# How to use

Expand Down
41 changes: 41 additions & 0 deletions docs/docs/zh/guide/installation/registry-plugins/etcd.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 介绍

这个插件将使用 ETCD 作为注册中心。

# 如何使用

如果要将注册中心设置为 ETCD,需要在 master/worker/api 的 application.yml 中设置属性

```yaml
registry:
type: etcd
endpoints: "http://etcd0:2379, http://etcd1:2379, http://etcd2:2379"
# The options below have default values
namespace: dolphinscheduler
connection-timeout: 9s
# The unit is milliseconds
retry-delay: 60ms
retry-max-delay: 300ms
retry-max-duration: 1500ms
# The following ssl options are set according to personal needs
cert-file: "deploy/kubernetes/dolphinscheduler/etcd-certs/ca.crt"
key-cert-chain-file: "deploy/kubernetes/dolphinscheduler/etcd-certs/client.crt"
key-file: "deploy/kubernetes/dolphinscheduler/etcd-certs/client.pem"
# The following auth options are set according to personal needs
user: ""
password: ""
authority: ""
load-balancer-policy: ""
```

如果你的 ETCD 服务器配置了 SSL,关于认证文件你可以看[这里](https://github.com/etcd-io/jetcd/blob/main/docs/SslConfig.md)了解如何转换。

> 如果您需要ssl认证,您需要确保您的 JDK 版本比 Java 8u 252(2020年4月) 更新,JDK11 也可以很好地工作.
>
> 另外,docker images ` from eclipse-temurin:8-JRE ` 中的jdk版本现在是 8u362 运行良好,不需要改动。
>
> 因为8u252之后的版本已经有了对ALPN的原生支持,您可以看到的细节:
>
> https://github.com/grpc/grpc-java/issues/5369#issuecomment-751885384

完成这个配置后,你可以启动你的 DolphinScheduler 集群,你的集群将使用 ETCD 作为注册中心存储服务器元数据。
80 changes: 80 additions & 0 deletions docs/docs/zh/guide/installation/registry-plugins/jdbc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# 介绍

这个插件将使用 JDBC 作为注册中心。将使用与 api-server 的 yaml 默认的 DolphinScheduler 相同的数据库配置。

# 如何使用

1. 初始化数据库

- 如果你使用 MySQL,你可以直接执行 SQL 脚本 `src/main/resources/mysql_registry_init.sql`.

- 如果你使用 PostgreSQL,你可以直接执行 SQL 脚本 `src/main/resources/postgresql_registry_init.sql`.

2. 修改配置

需要在 master/worker/api 的 application.yml 中设置属性

```yaml
registry:
type: jdbc
```

完成这两步后,你就可以启动你的 DolphinScheduler 集群了,你的集群将使用 MySQL 作为注册中心来存储服务器元数据。

注意: 如果您使用mysql数据库,您需要将 `mysql-connector-java.jar` 添加到 DS 的类路径中,因为这个插件不会在发行版中捆绑此驱动程序。

## 可选配置

```yaml
registry:
type: jdbc
# Used to schedule refresh the heartbeat.
heartbeat-refresh-interval: 3s
# Once the client's heartbeat is not refresh in this time, the server will consider the client is offline.
session-timeout: 60s
# The hikari configuration, default will use the same datasource pool as DolphinScheduler.
hikari-config:
jdbc-url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler
username: root
password: root
maximum-pool-size: 5
connection-timeout: 9000
idle-timeout: 600000
```

## 对 JDBC 注册中心使用不同的数据库配置

需要在 master/worker/api 的 application.yml 中设置属性

### 使用 MySQL 作为注册中心

```yaml
registry:
type: jdbc
heartbeat-refresh-interval: 3s
session-timeout: 60s
hikari-config:
jdbc-url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler
username: root
password: root
maximum-pool-size: 5
connection-timeout: 9000
idle-timeout: 600000
```

### 使用 PostgreSQL 作为注册中心

```yaml
registry:
type: jdbc
heartbeat-refresh-interval: 3s
session-timeout: 60s
hikari-config:
jdbc-url: jdbc:postgresql://localhost:5432/dolphinscheduler
username: root
password: root
maximum-pool-size: 5
connection-timeout: 9000
idle-timeout: 600000
```

26 changes: 26 additions & 0 deletions docs/docs/zh/guide/installation/registry-plugins/zookeeper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# 介绍

这个插件将使用 Zookeeper 作为注册中心。

# 如何使用

如果要将注册中心设置为 Zookeeper,需要在 master/worker/api 的 application.yml 中设置属性

```yaml
registry:
type: zookeeper
zookeeper:
namespace: dolphinscheduler
connect-string: localhost:2181
retry-policy:
base-sleep-time: 60ms
max-sleep: 300ms
max-retries: 5
session-timeout: 30s
connection-timeout: 9s
block-until-connected: 600ms
# The following options are set according to personal needs
digest: ~
```

完成这个配置后,你可以启动你的 DolphinScheduler 集群,你的集群将使用 Zookeeper 作为注册中心存储服务器元数据。
Loading