From a9fc9195d3992a9c16905a7a66bb41a58094c28c Mon Sep 17 00:00:00 2001 From: menghaoranss Date: Wed, 13 May 2020 19:20:51 +0800 Subject: [PATCH] update orchestration configuration manual of sharding-jdbc --- .../configuration/config-spring-boot.cn.md | 31 +++++++------- .../configuration/config-spring-boot.en.md | 31 +++++++------- .../config-spring-namespace.cn.md | 38 ++++++++++------- .../config-spring-namespace.en.md | 41 +++++++++++-------- .../configuration/config-yaml.cn.md | 36 ++++++++-------- .../configuration/config-yaml.en.md | 35 ++++++++-------- 6 files changed, 114 insertions(+), 98 deletions(-) diff --git a/docs/document/content/manual/sharding-jdbc/configuration/config-spring-boot.cn.md b/docs/document/content/manual/sharding-jdbc/configuration/config-spring-boot.cn.md index 3b55ff2a90..ce24c4a42b 100644 --- a/docs/document/content/manual/sharding-jdbc/configuration/config-spring-boot.cn.md +++ b/docs/document/content/manual/sharding-jdbc/configuration/config-spring-boot.cn.md @@ -233,11 +233,11 @@ spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_it spring.shardingsphere.sharding.binding-tables=t_order,t_order_item spring.shardingsphere.sharding.broadcast-tables=t_config -spring.shardingsphere.orchestration.name=spring_boot_ds_sharding -spring.shardingsphere.orchestration.overwrite=true -spring.shardingsphere.orchestration.registry.type=zookeeper -spring.shardingsphere.orchestration.registry.namespace=orchestration-spring-boot-sharding-test -spring.shardingsphere.orchestration.registry.server-lists=localhost:2181 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type=registry_center,config_center +spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type=zookeeper +spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists=localhost:2181 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace=orchestration-spring-boot-sharding-test +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.overwrite=true ``` ### JNDI @@ -365,15 +365,14 @@ spring.shardingsphere.encrypt.tables..columns..en ```properties #省略数据源、数据分片、读写分离和数据脱敏配置 -spring.shardingsphere.orchestration.name= #治理实例名称 -spring.shardingsphere.orchestration.overwrite= #本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准 -spring.shardingsphere.orchestration.registry.type= #配置中心类型。如:zookeeper -spring.shardingsphere.orchestration.registry.server-lists= #连接注册中心服务器的列表。包括IP地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181 -spring.shardingsphere.orchestration.registry.namespace= #注册中心的命名空间 -spring.shardingsphere.orchestration.registry.digest= #连接注册中心的权限令牌。缺省为不需要权限验证 -spring.shardingsphere.orchestration.registry.operation-timeout-milliseconds= #操作超时的毫秒数,默认500毫秒 -spring.shardingsphere.orchestration.registry.max-retries= #连接失败后的最大重试次数,默认3次 -spring.shardingsphere.orchestration.registry.retry-interval-milliseconds= #重试间隔毫秒数,默认500毫秒 -spring.shardingsphere.orchestration.registry.time-to-live-seconds= #临时节点存活秒数,默认60秒 -spring.shardingsphere.orchestration.registry.props= #配置中心其它属性 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type= #配置/注册中心的类型,例如config_center/registry_center +spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type= #配置/注册中心类型。如:zookeeper +spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists= #连接配置/注册中心服务器的列表。包括IP地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace= #配置/注册中心的命名空间 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.overwrite=true #本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.digest= #连接配置/注册中心的权限令牌。缺省为不需要权限验证 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.operation-timeout-milliseconds= #操作超时的毫秒数,默认500毫秒 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.max-retries= #连接失败后的最大重试次数,默认3次 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.retry-interval-milliseconds= #重试间隔毫秒数,默认500毫秒 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.time-to-live-seconds= #临时节点存活秒数,默认60秒 ``` diff --git a/docs/document/content/manual/sharding-jdbc/configuration/config-spring-boot.en.md b/docs/document/content/manual/sharding-jdbc/configuration/config-spring-boot.en.md index 503ea34b24..6bb8dc0808 100644 --- a/docs/document/content/manual/sharding-jdbc/configuration/config-spring-boot.en.md +++ b/docs/document/content/manual/sharding-jdbc/configuration/config-spring-boot.en.md @@ -232,11 +232,11 @@ spring.shardingsphere.sharding.tables.t_order_item.key-generator.column=order_it spring.shardingsphere.sharding.binding-tables=t_order,t_order_item spring.shardingsphere.sharding.broadcast-tables=t_config -spring.shardingsphere.orchestration.name=spring_boot_ds_sharding -spring.shardingsphere.orchestration.overwrite=true -spring.shardingsphere.orchestration.registry.type=zookeeper -spring.shardingsphere.orchestration.registry.namespace=orchestration-spring-boot-sharding-test -spring.shardingsphere.orchestration.registry.server-lists=localhost:2181 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type=registry_center,config_center +spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type=zookeeper +spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists=localhost:2181 +spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace=orchestration-spring-boot-sharding-test +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.overwrite=true ``` ### JNDI @@ -365,15 +365,14 @@ spring.shardingsphere.encrypt.tables..columns..en ```properties #Omit data source, data sharding, read-write split and data masking configurations -spring.shardingsphere.orchestration.name= #Orchestration instance name -spring.shardingsphere.orchestration.overwrite= #Whether to overwrite local configurations with registry center configurations; if it can, each initialization should refer to local configurations -spring.shardingsphere.orchestration.registry.type= #Registry center type. Example:zookeeper -spring.shardingsphere.orchestration.registry.server-lists= #The list of servers that connect to registry center, including IP and port number; use commas to separate -spring.shardingsphere.orchestration.registry.namespace= #Registry center namespace -spring.shardingsphere.orchestration.registry.digest= #The token that connects to the registry center; default means there is no need for authentication -spring.shardingsphere.orchestration.registry.operation-timeout-milliseconds= #The millisecond number for operation timeout; default value: 500 milliseconds -spring.shardingsphere.orchestration.registry.max-retries= #Maximum retry time after failing; default value: 3 times -spring.shardingsphere.orchestration.registry.retry-interval-milliseconds= #Interval time to retry; default value: 500 milliseconds -spring.shardingsphere.orchestration.registry.time-to-live-seconds= #Living time of temporary nodes; default value: 60 seconds -spring.shardingsphere.orchestration.registry.props= #Customize registry center props. +spring.shardingsphere.orchestration.spring_boot_ds_sharding.orchestration-type= The type of orchestration center: config_center or registry_center +spring.shardingsphere.orchestration.spring_boot_ds_sharding.instance-type= #Center type. Example:zookeeper#Registry center type. Example:zookeeper +spring.shardingsphere.orchestration.spring_boot_ds_sharding.server-lists= #The list of servers that connect to registry center, including IP and port number; use commas to separate +spring.shardingsphere.orchestration.spring_boot_ds_sharding.namespace= #Center namespace +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.overwrite= #Whether to overwrite local configurations with config center configurations; if it can, each initialization should refer to local configurations +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.digest= #The token that connects to the center; default means there is no need for authentication +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.operation-timeout-milliseconds= #The millisecond number for operation timeout; default value: 500 milliseconds +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.max-retries= #Maximum retry time after failing; default value: 3 times +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.retry-interval-milliseconds= #Interval time to retry; default value: 500 milliseconds +spring.shardingsphere.orchestration.spring_boot_ds_sharding.props.time-to-live-seconds= #Living time of temporary nodes; default value: 60 seconds ``` diff --git a/docs/document/content/manual/sharding-jdbc/configuration/config-spring-namespace.cn.md b/docs/document/content/manual/sharding-jdbc/configuration/config-spring-namespace.cn.md index 8d246609cd..ac26c3b868 100644 --- a/docs/document/content/manual/sharding-jdbc/configuration/config-spring-namespace.cn.md +++ b/docs/document/content/manual/sharding-jdbc/configuration/config-spring-namespace.cn.md @@ -440,8 +440,15 @@ weight = 4 http://www.springframework.org/schema/beans/spring-beans.xsd http://shardingsphere.apache.org/schema/shardingsphere/orchestration http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd"> - + + 3 + 3000 + + + + + ``` @@ -685,8 +692,8 @@ weight = 4 | ------------------- | ----- | ------------------------------------------------------------------------ | | id | 属性 | ID | | data-source-ref (?) | 属性 | 被治理的数据库id | -| registry-center-ref | 属性 | 注册中心id | -| overwrite | 属性 | 本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 | +| instance-ref | 属性 | 配置/注册中心id | +| overwrite | 属性 | 本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 | ### 读写分离 + 治理 @@ -698,8 +705,8 @@ weight = 4 | ------------------- | ----- | ---------------------------------------------------------------------- | | id | 属性 | ID | | data-source-ref (?) | 属性 | 被治理的数据库id | -| registry-center-ref | 属性 | 注册中心id | -| overwrite | 属性 | 本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 | +| instance-ref | 属性 | 配置/注册中心id | +| overwrite | 属性 | 本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 | ### 数据脱敏 + 治理 @@ -711,22 +718,23 @@ weight = 4 | ------------------- | ----- | ---------------------------------------------------------------------- | | id | 属性 | ID | | data-source-ref (?) | 属性 | 被治理的数据库id | -| registry-center-ref | 属性 | 注册中心id | -| overwrite | 属性 | 本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 | +| instance-ref | 属性 | 配置/注册中心id | +| overwrite | 属性 | 本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准。缺省为不覆盖 | -### 治理注册中心 +### 治理配置/注册中心 命名空间:http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd -#### \ +#### \ | *名称* | *类型* | *说明* | | ----------------------------------- | ----- | ------------------------------------------------------------------------------------------| -| id | 属性 | 注册中心的Spring Bean Id | -| type | 属性 | 注册中心类型。如:zookeeper | -| server-lists | 属性 | 连接注册中心服务器的列表,包括IP地址和端口号,多个地址用逗号分隔。如: host1:2181,host2:2181 | -| namespace (?) | 属性 | 注册中心的命名空间 | -| digest (?) | 属性 | 连接注册中心的权限令牌。缺省为不需要权限验证 | +| id | 属性 | 配置/注册中心的Spring Bean Id | +| instance-type | 属性 | 配置/注册中心类型。如:zookeeper | +| orchestration-type | 属性 | 配置/注册中心的类型,例如config_center/registry_center | +| server-lists | 属性 | 连接配置/注册中心服务器的列表,包括IP地址和端口号,多个地址用逗号分隔。如: host1:2181,host2:2181 | +| namespace (?) | 属性 | 配置/注册中心的命名空间 | +| digest (?) | 属性 | 连接配置/注册中心的权限令牌。缺省为不需要权限验证 | | operation-timeout-milliseconds (?) | 属性 | 操作超时的毫秒数,默认500毫秒 | | max-retries (?) | 属性 | 连接失败后的最大重试次数,默认3次 | | retry-interval-milliseconds (?) | 属性 | 重试间隔毫秒数,默认500毫秒 | diff --git a/docs/document/content/manual/sharding-jdbc/configuration/config-spring-namespace.en.md b/docs/document/content/manual/sharding-jdbc/configuration/config-spring-namespace.en.md index 882cc072b5..eeba1081f5 100644 --- a/docs/document/content/manual/sharding-jdbc/configuration/config-spring-namespace.en.md +++ b/docs/document/content/manual/sharding-jdbc/configuration/config-spring-namespace.en.md @@ -447,10 +447,15 @@ example: [shardingsphere-example](https://github.com/apache/incubator-shardingsp http://shardingsphere.apache.org/schema/shardingsphere/orchestration/sharding/sharding.xsd http://shardingsphere.apache.org/schema/shardingsphere/orchestration/masterslave http://shardingsphere.apache.org/schema/shardingsphere/orchestration/masterslave/master-slave.xsd"> - - - - + + 3 + 3000 + + + + + ``` @@ -699,9 +704,9 @@ Namespace: http://shardingsphere.apache.org/schema/shardingsphere/orchestration/ | *Name* | *Type* | *Explanation* | | ------------------- | --------- | ------------------------------------------------------------ | | id | Attribute | ID | -| data-source-ref (?) | Attribute | Orchestrated database id | -| registry-center-ref | Attribute | Registry center id | -| overwrite | Attribute | Whether to overwrite local configurations with registry center configurations; if it can, each initialization should refer to local configurations; default means not to overwrite | +| data-source-ref (?) | Attribute | The id of data source to be orchestrated | +| instance-ref | Attribute | The id of config/registry center | +| overwrite | Attribute | Use local configuration to overwrite config center or not; default means not to overwrite | ### Read-Write Split + Orchestration @@ -713,8 +718,8 @@ Namespace: http://shardingsphere.apache.org/schema/shardingsphere/orchestration/ | ------------------- | --------- | ----------------------------------------------------------- | | id | Attribute | ID | | data-source-ref (?) | Attribute | The id of data source to be orchestrated | -| registry-center-ref | Attribute | The id of registry center | -| overwrite | Attribute | Use local configuration to overwrite registry center or not | +| instance-ref | Attribute | The id of config/registry center | +| overwrite | Attribute | Use local configuration to overwrite config center or not; default means not to overwrite | ### Data Masking + Orchestration @@ -726,23 +731,23 @@ Namespace: http://shardingsphere.apache.org/schema/shardingsphere/orchestration/ | ------------------- | --------- | ----------------------------------------------------------- | | id | Attribute | ID | | data-source-ref (?) | Attribute | The id of data source to be orchestrated | -| registry-center-ref | Attribute | The id of registry center | -| overwrite | Attribute | Use local configuration to overwrite registry center or not | +| instance-ref | Attribute | The id of config/registry center | +| overwrite | Attribute | Use local configuration to overwrite config/registry center or not; default means not to overwrite | -### Orchestration registry center +### Orchestration config/registry center Namespace: http://shardingsphere.apache.org/schema/shardingsphere/orchestration/orchestration.xsd -#### \ +#### \ | *Name* | *Type* | *Description* | | ---------------------------------- | --------- | ------------------------------------------------------------------------------- | -| id | Attribute | Spring Bean Id of registry center | -| type | Attribute | Registry center type. Example:zookeeper | -| server-lists | Attribute | Registry servers list, multiple split as comma. Example: host1:2181,host2:2181 | -| namespace (?) | Attribute | Namespace of registry | -| digest (?) | Attribute | Digest for registry. Default is not need digest | +| instance-type | Attribute | Center type. Example:zookeeper | +| orchestration-type | Attribute | The type of orchestration center: config_center or registry_center | +| server-lists | Attribute | Center servers list, multiple split as comma. Example: host1:2181,host2:2181 | +| namespace (?) | Attribute | Namespace of center | +| digest (?) | Attribute | Digest for center. Default is not need digest | | operation-timeout-milliseconds (?) | Attribute | Operation timeout time in milliseconds, default value is 500 seconds | | max-retries (?) | Attribute | Max number of times to retry, default value is 3 | | retry-interval-milliseconds (?) | Attribute | Time interval in milliseconds on each retry, default value is 500 milliseconds | diff --git a/docs/document/content/manual/sharding-jdbc/configuration/config-yaml.cn.md b/docs/document/content/manual/sharding-jdbc/configuration/config-yaml.cn.md index 12d5c6089a..ddd34b31b5 100644 --- a/docs/document/content/manual/sharding-jdbc/configuration/config-yaml.cn.md +++ b/docs/document/content/manual/sharding-jdbc/configuration/config-yaml.cn.md @@ -282,12 +282,13 @@ props: #省略数据分片、读写分离和数据脱敏配置 orchestration: - name: orchestration_ds - overwrite: true - registry: - type: zookeeper - namespace: orchestration - serverLists: localhost:2181 + orchestration_ds: + orchestrationType: registry_center,config_center + instanceType: zookeeper + serverLists: localhost:2181 + namespace: orchestration + props: + overwrite: true ``` ## 配置项说明 @@ -408,17 +409,18 @@ masterSlaveRule: #省略读写分离规则配置 encryptRule: #省略数据脱敏规则配置 orchestration: - name: #治理实例名称 - overwrite: #本地配置是否覆盖注册中心配置。如果可覆盖,每次启动都以本地配置为准 - registry: #注册中心配置 - type: #配置中心类型。如:zookeeper - serverLists: #连接注册中心服务器的列表。包括IP地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181 - namespace: #注册中心的命名空间 - digest: #连接注册中心的权限令牌。缺省为不需要权限验证 - operationTimeoutMilliseconds: #操作超时的毫秒数,默认500毫秒 - maxRetries: #连接失败后的最大重试次数,默认3次 - retryIntervalMilliseconds: #重试间隔毫秒数,默认500毫秒 - timeToLiveSeconds: #临时节点存活秒数,默认60秒 + orchestration_ds: #治理实例名称 + orchestrationType: #配置/注册中心的类型,例如config_center/registry_center + instanceType: #配置/注册中心类型。如:zookeeper + serverLists: #连接配置/注册中心服务器的列表。包括IP地址和端口号。多个地址用逗号分隔。如: host1:2181,host2:2181 + namespace: #配置/注册中心的命名空间 + props: #其它配置 + overwrite: #本地配置是否覆盖配置中心配置。如果可覆盖,每次启动都以本地配置为准 + digest: #连接注册中心的权限令牌。缺省为不需要权限验证 + operationTimeoutMilliseconds: #操作超时的毫秒数,默认500毫秒 + maxRetries: #连接失败后的最大重试次数,默认3次 + retryIntervalMilliseconds: #重试间隔毫秒数,默认500毫秒 + timeToLiveSeconds: #临时节点存活秒数,默认60秒 ``` ## Yaml语法说明 diff --git a/docs/document/content/manual/sharding-jdbc/configuration/config-yaml.en.md b/docs/document/content/manual/sharding-jdbc/configuration/config-yaml.en.md index c84687b995..09e8c4e88a 100644 --- a/docs/document/content/manual/sharding-jdbc/configuration/config-yaml.en.md +++ b/docs/document/content/manual/sharding-jdbc/configuration/config-yaml.en.md @@ -283,11 +283,13 @@ props: #Omit data sharding, read-write split and encrypt configurations orchestration: - name: orchestration_ds - overwrite: true - registry: - namespace: orchestration - serverLists: localhost:2181 + orchestration_ds: + orchestrationType: registry_center,config_center + instanceType: zookeeper + serverLists: localhost:2181 + namespace: orchestration + props: + overwrite: true ``` ## Configuration Item Explanation @@ -412,17 +414,18 @@ masterSlaveRule: #Omit read-write split rule configurations encryptRule: #Omit encrypt rule configurations orchestration: - name: #Orchestration instance name - overwrite: #Whether to overwrite local configurations with registry center configurations; if it can, each initialization should refer to local configurations - registry: #Registry center configuration - type: #Registry center type. Example:zookeeper - serverLists: #The list of servers that connect to registry center, including IP and port number; use commas to seperate addresses, such as: host1:2181,host2:2181 - namespace: #Registry center namespace - digest: #The token that connects to the registry center; default means there is no need for authentication - operationTimeoutMilliseconds: #Default value: 500 milliseconds - maxRetries: #Maximum retry time after failing; default value: 3 times - retryIntervalMilliseconds: #Interval time to retry; default value: 500 milliseconds - timeToLiveSeconds: #Living time of temporary nodes; default value: 60 seconds + orchestration_ds: #Orchestration instance name + orchestrationType: #The type of orchestration center: config_center or registry_center + instanceType: #Center type. Example:zookeeper + serverLists: #The list of servers that connect to registry center, including IP and port number; use commas to seperate addresses, such as: host1:2181,host2:2181 + namespace: #Center namespace + props: #Other properties + overwrite: #Whether to overwrite local configurations with config center configurations; if it can, each initialization should refer to local configurations + digest: #The token that connects to the center; default means there is no need for authentication + operationTimeoutMilliseconds: #Default value: 500 milliseconds + maxRetries: #Maximum retry time after failing; default value: 3 times + retryIntervalMilliseconds: #Interval time to retry; default value: 500 milliseconds + timeToLiveSeconds: #Living time of temporary nodes; default value: 60 seconds ``` ## Yaml Syntax Explanation -- GitLab