This is an automated email from the ASF dual-hosted git repository.
zhaojinchao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/shardingsphere-on-cloud.git
The following commit(s) were added to refs/heads/main by this push:
new 78eee21 chore: update examples and README docs (#267)
78eee21 is described below
commit 78eee211e3b085128d3703676b3f431dd39f0a7e
Author: liyao <[email protected]>
AuthorDate: Thu Mar 16 15:12:25 2023 +0800
chore: update examples and README docs (#267)
* chore: add shardingsphere operator examples
Signed-off-by: mlycore <[email protected]>
* chore: update README
Signed-off-by: mlycore <[email protected]>
* chore: update index docs
Signed-off-by: mlycore <[email protected]>
* chore: update operator docs
Signed-off-by: mlycore <[email protected]>
* fix: fix license header
Signed-off-by: mlycore <[email protected]>
---------
Signed-off-by: mlycore <[email protected]>
---
README.md | 15 ++++--
docs/content/operation-guide/operator/_index.cn.md | 42 +++++++++++++++
docs/content/operation-guide/operator/_index.en.md | 32 ++++++++++++
docs/content/overview/_index.cn.md | 3 ++
docs/content/overview/_index.en.md | 3 ++
.../shardingsphereproxy-mysql-cluster.yaml | 59 ++++++++++++++++++++++
.../shardingsphereproxy-mysql-standalone.yaml | 38 ++++++++++++++
7 files changed, 188 insertions(+), 4 deletions(-)
diff --git a/README.md b/README.md
index 8492a60..ec2e468 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,5 @@
# ShardingSphere on Cloud
-**Apache ShardingSphere Official Website:**
[https://shardingsphere.apache.org/](https://shardingsphere.apache.org/)
-**Apache ShardingSphere-on-Cloud Official Website:**
[https://shardingsphere.apache.org/oncloud/](https://shardingsphere.apache.org/oncloud/)
-
[](https://github.com/apache/shardingsphere-on-cloud/releases)
[](https://www.apache.org/licenses/LICENSE-2.0.html)
[](https://twitter.com/ShardingSphere)
@@ -21,7 +18,13 @@ The solutions currently included in this project are:
* [Terraform Configuration For
ShardingSphere](https://github.com/apache/shardingsphere-on-cloud/tree/main/terraform)
* [Point-in-Time-Recovery demo For
ShardingSphere](https://github.com/apache/shardingsphere-on-cloud/tree/main/pitr)
* [Grafana template For
ShardingSphere](https://github.com/apache/shardingsphere-on-cloud/tree/main/grafana)
-* [Webassembly extension demo For
ShardingSphere](https://github.com/apache/shardingsphere-on-cloud/tree/main/wasm)
+* [WebAssembly extension demo For
ShardingSphere](https://github.com/apache/shardingsphere-on-cloud/tree/main/wasm)
+
+## Get Started
+
+**Apache ShardingSphere Official Website:**
[https://shardingsphere.apache.org/](https://shardingsphere.apache.org/)
+
+**Apache ShardingSphere-on-Cloud Official Website:**
[https://shardingsphere.apache.org/oncloud/](https://shardingsphere.apache.org/oncloud/)
## Contributing
@@ -29,6 +32,10 @@ To contribute to this project, refer to
[Contributing](CONTRIBUTING.md).
## Community & Support
+Thank you for contributing to the ShardingSphere on Cloud project!
+
+
+
<hr>
:link: [ShardingSphere on Cloud
Docs](https://shardingsphere.apache.org/oncloud/current/en/overview/). Best
for: Manuals and best practices.
diff --git a/docs/content/operation-guide/operator/_index.cn.md
b/docs/content/operation-guide/operator/_index.cn.md
index 7df0e59..7361e2e 100644
--- a/docs/content/operation-guide/operator/_index.cn.md
+++ b/docs/content/operation-guide/operator/_index.cn.md
@@ -28,6 +28,14 @@ cd ../
helm install shardingsphere-cluster apache-shardingsphere-operator-charts -n
shardingsphere-operator
```
+### 试用 ComputeNode
+
+需要按照如下命令安装 ShardingSphere Operator:
+
+```shell
+helm install [RELEASE_NAME]
shardingsphere/apache-shardingsphere-operator-charts --set
operator.featureGates.computeNode=true --set proxyCluster.enabled=false
+```
+
## 参数
### 通用参数
@@ -98,6 +106,40 @@ helm install shardingsphere-cluster
apache-shardingsphere-operator-charts -n sha
| `zookeeper.persistence.accessModes` | Persistent Volume access modes
| `["ReadWriteOnce"]` |
| `zookeeper.persistence.size` | Persistent Volume size
| `8Gi` |
+
+### ShardingSphere ComputeNode 参数
+
+| Name | Description
| Value
|
+| --------------------------------------------|
------------------------------------------------------------------------------------------------------
| ------------------- |
+| `computeNode.storageNodeConnector.type` | ShardingSphere-Proxy driver
type |
`mysql` |
+| `computeNode.storageNodeConnector.version` | ShardingSphere-Proxy driver
version. The MySQL driver need to be downloaded according to this version |
`5.1.47` |
+| `computeNode.serverVersion` | ShardingSphere-Proxy cluster
version |
`5.3.1` |
+| `computeNode.portBindings[0].name` | ShardingSphere-Proxy port name
|
`3307` |
+| `computeNode.portBindings[0].containerPort` | ShardingSphere-Proxy port for
container |
`3307` |
+| `computeNode.portBindings[0].servicePort` | ShardingSphere-Proxy port for
service |
`3307` |
+| `computeNode.portBindings[0].procotol` | ShardingSphere-Proxy port
protocol |
`TCP` |
+| `computeNode.serviceType` | ShardingSphere-Proxy service
type |
`ClusterIP` |
+
+
+### ShardingSphere ComputeNode Bootstrap 参数
+
+| Name
| Description | Value
|
+|--------------------------------------------------------------------------------|
------------------------------------------------------------------- |
---------------------------------------------------------------------- |
+| `computeNode.bootstrap.serverConfig.authority.privilege.type` | authority
provider for storage node, the default value is ALL_PERMITTED
|
`ALL_PRIVILEGES_PERMITTED` |
+| `computeNode.bootstrap.serverConfig.authority.users[0].user` |
Username,authorized host for compute node. Format: <username>@<hostname>
hostname is % or empty string means do not care about authorized host |
`root@%` |
+| `computeNode.bootstrap.serverConfig.authority.users[0].password` | Password
for compute node.
| `root`
|
+| `computeNode.bootstrap.serverConfig.mode.type`
| Type of mode configuration. Now only support Cluster mode
| `Cluster` |
+| `computeNode.bootstrap.serverConfig.mode.repository.type`
| Type of persist repository. Now only support ZooKeeper
| `ZooKeeper` |
+| `computeNode.bootstrap.mode.repository.props.timeToLiveSeconds` |
Seconds of ephemeral data live | `600`
|
+| `computeNode.bootstrap.serverConfig.mode.repository.props.serverlists`
| Server lists of registry center
| `{{ printf "%s-zookeeper.%s:2181" .Release.Name .Release.Namespace }}` |
+|
`computeNode.bootstrap.serverConfig.mode.repository.props.retryIntervalMilliseconds`
| Milliseconds of retry interval |
`500` |
+|
`computeNode.bootstrap.serverConfig.mode.repository.props.operationTimeoutMilliseconds`
| Milliseconds of operation timeout | `5000`
|
+| `computeNode.bootstrap.serverConfig.mode.repository.props.namespace`
| Namespace of registry center
| `governance_ds` |
+| `computeNode.bootstrap.serverConfig.mode.repository.props.maxRetries`
| Max retries of client connection
| `3` |
+| `computeNode.bootstrap.serverConfig.mode.overwrite`
| Whether overwrite persistent configuration with local
configuration | `true`
|
+|
`computeNode.bootstrap.serverConfig.props.proxy-frontend-database-protocol-type`
| Default startup protocol |
`MySQL` |
+
+
## 配置示例
apache-shardingsphere-cluster-operator-charts/values.yaml
diff --git a/docs/content/operation-guide/operator/_index.en.md
b/docs/content/operation-guide/operator/_index.en.md
index 0e59085..69d8422 100644
--- a/docs/content/operation-guide/operator/_index.en.md
+++ b/docs/content/operation-guide/operator/_index.en.md
@@ -99,6 +99,38 @@ helm install shardingsphere-cluster
apache-shardingsphere-operator-charts -n sha
| `zookeeper.persistence.accessModes` | Persistent Volume access modes
| `["ReadWriteOnce"]` |
| `zookeeper.persistence.size` | Persistent Volume size
| `8Gi` |
+### ShardingSphere ComputeNode Parameters
+
+| Name | Description
| Value
|
+| --------------------------------------------|
------------------------------------------------------------------------------------------------------
| ------------------- |
+| `computeNode.storageNodeConnector.type` | ShardingSphere-Proxy driver
type |
`mysql` |
+| `computeNode.storageNodeConnector.version` | ShardingSphere-Proxy driver
version. The MySQL driver need to be downloaded according to this version |
`5.1.47` |
+| `computeNode.serverVersion` | ShardingSphere-Proxy cluster
version |
`5.3.1` |
+| `computeNode.portBindings[0].name` | ShardingSphere-Proxy port name
|
`3307` |
+| `computeNode.portBindings[0].containerPort` | ShardingSphere-Proxy port for
container |
`3307` |
+| `computeNode.portBindings[0].servicePort` | ShardingSphere-Proxy port for
service |
`3307` |
+| `computeNode.portBindings[0].procotol` | ShardingSphere-Proxy port
protocol |
`TCP` |
+| `computeNode.serviceType` | ShardingSphere-Proxy service
type |
`ClusterIP` |
+
+
+### ShardingSphere ComputeNode Bootstrap Parameters
+
+| Name
| Description | Value
|
+|--------------------------------------------------------------------------------|
------------------------------------------------------------------- |
---------------------------------------------------------------------- |
+| `computeNode.bootstrap.serverConfig.authority.privilege.type` | authority
provider for storage node, the default value is ALL_PERMITTED
|
`ALL_PRIVILEGES_PERMITTED` |
+| `computeNode.bootstrap.serverConfig.authority.users[0].user` |
Username,authorized host for compute node. Format: <username>@<hostname>
hostname is % or empty string means do not care about authorized host |
`root@%` |
+| `computeNode.bootstrap.serverConfig.authority.users[0].password` | Password
for compute node.
| `root`
|
+| `computeNode.bootstrap.serverConfig.mode.type`
| Type of mode configuration. Now only support Cluster mode
| `Cluster` |
+| `computeNode.bootstrap.serverConfig.mode.repository.type`
| Type of persist repository. Now only support ZooKeeper
| `ZooKeeper` |
+| `computeNode.bootstrap.mode.repository.props.timeToLiveSeconds` |
Seconds of ephemeral data live | `600`
|
+| `computeNode.bootstrap.serverConfig.mode.repository.props.serverlists`
| Server lists of registry center
| `{{ printf "%s-zookeeper.%s:2181" .Release.Name .Release.Namespace }}` |
+|
`computeNode.bootstrap.serverConfig.mode.repository.props.retryIntervalMilliseconds`
| Milliseconds of retry interval |
`500` |
+|
`computeNode.bootstrap.serverConfig.mode.repository.props.operationTimeoutMilliseconds`
| Milliseconds of operation timeout | `5000`
|
+| `computeNode.bootstrap.serverConfig.mode.repository.props.namespace`
| Namespace of registry center
| `governance_ds` |
+| `computeNode.bootstrap.serverConfig.mode.repository.props.maxRetries`
| Max retries of client connection
| `3` |
+| `computeNode.bootstrap.serverConfig.mode.overwrite`
| Whether overwrite persistent configuration with local
configuration | `true`
|
+|
`computeNode.bootstrap.serverConfig.props.proxy-frontend-database-protocol-type`
| Default startup protocol |
`MySQL` |
+
## Examples
apache-shardingsphere-clutser-operator-charts/values.yaml
diff --git a/docs/content/overview/_index.cn.md
b/docs/content/overview/_index.cn.md
index 123a337..965467a 100644
--- a/docs/content/overview/_index.cn.md
+++ b/docs/content/overview/_index.cn.md
@@ -36,6 +36,9 @@ ShardingSphere-on-Cloud 项目是面向 Apache ShardingSphere 的云上解决方
- 基于 Operator 的 ShardingSphere Proxy 在 kubernetes 环境下一键部署和自动运维
- 基于 AWS CloudFormation 的 ShardingSphere Proxy 快速部署
- 基于 Terraform 的 AWS 环境下 ShardingSphere Proxy 快速部署
+- Point-in-Time Recovery 时间点还原 Demo
+- Grafana Dashboard 模板
+- 基于 WebAssembly 的 ShardingSphere 插件拓展 demo
## 应用场景
diff --git a/docs/content/overview/_index.en.md
b/docs/content/overview/_index.en.md
index 998a461..6b2053c 100644
--- a/docs/content/overview/_index.en.md
+++ b/docs/content/overview/_index.en.md
@@ -38,6 +38,9 @@ Currently, the terms involved in this project are from common
cloud service prov
- One click deployment and automatic DevOps of ShardingSphere Proxy based on
Operator in a Kubernetes environment.
- Rapid deployment of ShardingSphere Proxy based on AWS CloudFormation.
- Rapid deployment of ShardingSphere Proxy based on Terraform in an AWS
environment.
+- Point-in-Time-Recovery demo For ShardingSphere.
+- Grafana template For ShardingSphere.
+- WebAssembly extension demo For ShardingSphere.
## Application Scenarios
diff --git a/examples/operator/shardingsphereproxy-mysql-cluster.yaml
b/examples/operator/shardingsphereproxy-mysql-cluster.yaml
new file mode 100644
index 0000000..b0607de
--- /dev/null
+++ b/examples/operator/shardingsphereproxy-mysql-cluster.yaml
@@ -0,0 +1,59 @@
+ #
+ # Licensed to the Apache Software Foundation (ASF) under one or more
+ # contributor license agreements. See the NOTICE file distributed with
+ # this work for additional information regarding copyright ownership.
+ # The ASF licenses this file to You under the Apache License, Version 2.0
+ # (the "License"); you may not use this file except in compliance with
+ # the License. You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ #
+
+apiVersion: shardingsphere.apache.org/v1alpha1
+kind: ComputeNode
+metadata:
+ labels:
+ app: foo
+ name: foo
+spec:
+ storageNodeConnector:
+ type: mysql
+ version: 5.1.47
+ serverVersion: 5.3.1
+ replicas: 1
+ selector:
+ matchLabels:
+ app: foo
+ portBindings:
+ - name: server
+ containerPort: 3307
+ servicePort: 3307
+ protocol: TCP
+ serviceType: ClusterIP
+ bootstrap:
+ serverConfig:
+ authority:
+ privilege:
+ type: ALL_PERMITTED
+ users:
+ - user: root%
+ password: root
+ mode:
+ type: Cluster
+ repository:
+ type: ZooKeeper
+ props:
+ timeToLiveSeconds: "600"
+ server-lists: ${PLEASE_REPLACE_THIS_WITH_YOUR_ZOOKEEPER_SERVICE}
+ retryIntervalMilliseconds: "500"
+ operationTimeoutMilliseconds: "5000"
+ namespace: governance_ds
+ maxRetries: "3"
+ props:
+ proxy-frontend-database-protocol-type: MySQL
diff --git a/examples/operator/shardingsphereproxy-mysql-standalone.yaml
b/examples/operator/shardingsphereproxy-mysql-standalone.yaml
new file mode 100644
index 0000000..861f875
--- /dev/null
+++ b/examples/operator/shardingsphereproxy-mysql-standalone.yaml
@@ -0,0 +1,38 @@
+ #
+ # Licensed to the Apache Software Foundation (ASF) under one or more
+ # contributor license agreements. See the NOTICE file distributed with
+ # this work for additional information regarding copyright ownership.
+ # The ASF licenses this file to You under the Apache License, Version 2.0
+ # (the "License"); you may not use this file except in compliance with
+ # the License. You may obtain a copy of the License at
+ #
+ # http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ #
+
+apiVersion: shardingsphere.apache.org/v1alpha1
+kind: ComputeNode
+metadata:
+ labels:
+ app: foo
+ name: foo
+spec:
+ storageNodeConnector:
+ type: mysql
+ version: 5.1.47
+ serverVersion: 5.3.1
+ replicas: 1
+ selector:
+ matchLabels:
+ app: foo
+ portBindings:
+ - name: server
+ containerPort: 3307
+ servicePort: 3307
+ protocol: TCP
+ serviceType: ClusterIP