Skip to content

Commit 456e5e1

Browse files
authored
Merge pull request #376 from molliezhang/docs
docs *: Adjust the file directory and add new deployment files #152
2 parents c228bcb + 523acdd commit 456e5e1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+839
-325
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](docs/images/logo_radondb-mysql.png) <br>
22

3-
English | [中文](README_zh.md)
3+
English | [简体中文](README_zh.md)
44

55
# What is RadonDB MySQL
66

@@ -25,25 +25,26 @@ RadonDB MySQL Kubernetes supports deployment and management of RaodnDB MySQL clu
2525
- Leader-follower switching in second-level
2626
- Strongly consistent data for cluster switching
2727
- Cluster management
28-
- [Monitoring and alerting](docs/deploy_monitoring.md)
29-
- [Backups](docs/deploy_backup_restore_s3.md)
28+
- [Monitoring and alerting](docs/zh-cn/deploy_monitoring.md)
29+
- [Backups](docs/en-us/deploy_backup_restore_s3.md)
3030
- Logs
31-
- [Account management](docs/mgt_mysqluser.md)
31+
- [Account management](docs/zh-cn/mgt_mysqluser.md)
3232

3333
## Quick Start
3434

3535
### Operator
3636

37-
- [Deploy RadonDB MySQL on Kubernetes](/docs/kubernetes/deploy_radondb-mysql_operator_on_k8s.md)
38-
- [Deploy RadonDB MySQL on Rancher](/docs/rancher/deploy_radondb-mysql_operator_on_rancher.md)
37+
- [Deploy RadonDB MySQL on Kubernetes](/docs/zh-cn/deploy_radondb-mysql_operator_on_k8s.md)
38+
- [Deploy RadonDB MySQL on KubeSphere](/docs/en-us/deploy_radondb-mysql_operator_on_kubesphere.md)
39+
- [Deploy RadonDB MySQL on Rancher](/docs/zh-cn/deploy_radondb-mysql_operator_on_rancher.md)
3940

4041
## Roadmap
4142

4243
| Release | Features | Mode |
4344
|------|--------|--------|
44-
| 1.0 | Cluster management <br> Monitoring and alerting <br> Logs <br> Account management | Helm |
45-
| 2.0 | Node management <br> Automatic expansion and shrinkage capacity <br> Upgrade <br> Backups and Restorations <br> Automatic failover <br> Automatic rebuild node <br> Automatic restart service(all or signal node)<br> Account management(API)<br> Migrating Data online | Operator |
4645
| 3.0 | Automatic O&M <br> Multiple node roles <br> Disaster Recovery <br> SSL transmission encryption | Operator |
46+
| 2.0 | Node management <br> Automatic expansion and shrinkage capacity <br> Upgrade <br> Backups and Restorations <br> Automatic failover <br> Automatic rebuild node <br> Automatic restart service(all or signal node)<br> Account management(API)<br> Migrating Data online | Operator |
47+
| 1.0 | Cluster management <br> Monitoring and alerting <br> Logs <br> Account management | Helm |
4748

4849
## Who are using RadonDB MySQL
4950

README_zh.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
![](docs/images/logo_radondb-mysql.png) <br>
22

3-
[English](README.md) | 中文
3+
[English](README.md) | 简体中文
44

55
# 什么是RadonDB MySQL
66

@@ -25,25 +25,26 @@ RadonDB MySQL Kubernetes支持在[Kubernetes](https://kubernetes.io)和[KubeSphe
2525
- 主从秒级切换
2626
- 集群切换的数据强一致性
2727
- 集群管理
28-
- [监控告警](docs/deploy_monitoring.md)
29-
- [备份](docs/deploy_backup_restore_s3.md)
28+
- [监控告警](docs/zh-cn/deploy_monitoring.md)
29+
- [备份](docs/zh-cn/deploy_backup_restore_s3.md)
3030
- 集群日志管理
31-
- [账户管理](docs/mgt_mysqluser.md)
31+
- [账户管理](docs/zh-cn/mgt_mysqluser.md)
3232

3333
## 快速开始
3434

3535
### Operator
3636

37-
- [在 Kubernetes 上部署 RadonDB MySQL 集群](docs/kubernetes/deploy_radondb-mysql_operator_on_k8s.md)
38-
- [在 Rancher 上部署 RadonDB MySQL 集群](/docs/rancher/deploy_radondb-mysql_operator_on_rancher.md)
37+
- [在 Kubernetes 上部署 RadonDB MySQL 集群](docs/zh-cn/deploy_radondb-mysql_operator_on_k8s.md)
38+
- [在 KubeSphere 上部署 RadonDB MySQL 集群](docs/zh-cn/deploy_radondb-mysql_operator_on_kubesphere.md)
39+
- [在 Rancher 上部署 RadonDB MySQL 集群](/docs/zh-cn/deploy_radondb-mysql_operator_on_rancher.md)
3940

4041
## 路线图
4142

4243
| 版本 | 功能 | 实现方式 |
4344
|------|--------|------|
44-
| 1.0 | 集群管理 <br> 监控告警 <br> 集群日志管理 <br> 账户管理 | Helm |
45-
| 2.0 | 增删节点 <br> 自动扩缩容 <br> 升级集群 <br> 备份与恢复 <br> 故障自动转移 <br> 自动重建节点 <br> 自动重启服务 <br> 账户管理(提供 API 接口)<br> 在线迁移 | Operator |
4645
| 3.0 | 自动化运维 <br> 多节点角色 <br> 灾备集群 <br> SSL 传输加密 | Operator |
46+
| 2.0 | 增删节点 <br> 自动扩缩容 <br> 升级集群 <br> 备份与恢复 <br> 故障自动转移 <br> 自动重建节点 <br> 自动重启服务 <br> 账户管理(提供 API 接口)<br> 在线迁移 | Operator |
47+
| 1.0 | 集群管理 <br> 监控告警 <br> 集群日志管理 <br> 账户管理 | Helm |
4748

4849
## 用户案例
4950

@@ -58,7 +59,7 @@ RadonDB MySQL 基于 Apache 2.0 协议,详见 [License](./LICENSE)。
5859
- 论坛
5960

6061
请加入[KubeSphere 开发者社区](https://kubesphere.com.cn/forum/t/radondb) RadonDB MySQL 话题专区。
61-
62+
6263
- 欢迎关注微信公众号
6364

6465
![](docs/images/vx_code_258.jpg)

docs/en-us/_images/certify_url.png

99.9 KB
Loading
375 KB
Loading
849 KB
Loading
234 KB
Loading
File renamed without changes.
Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
English | [简体中文](../zh-cn/deploy_radondb-mysql_operator_on_kubesphere.md)
2+
3+
Contents
4+
=============
5+
6+
* [Deploy RadonDB MySQL Operator and RadonDB MySQL Cluster on KubeSphere](#deploy-radondb-mysql-operator-and-radondb-mysql-cluster-on-kubesphere)
7+
* [Prerequisites](#prerequisites)
8+
* [Deployment](#deployment)
9+
* [Step 1: Add an app repository](#step-1-add-an-app-repository)
10+
* [Step 2: Deploy RadonDB MySQL Operator](#step-2-deploy-radondb-mysql-operator)
11+
* [Step 3: Deploy a RadonDB MySQL cluster](#step-3-deploy-a-radondb-mysql-cluster)
12+
* [Deployment Validation](#deployment-validation)
13+
* [Access the RadonDB MySQL cluster](#access-the-radondb-mysql-cluster)
14+
* [Method 1: Via terminal](#method-1-via-terminal)
15+
* [Method 2: Via Kubectl tool](#method-2-via-kubectl-tool)
16+
17+
# Deploy RadonDB MySQL Operator and RadonDB MySQL Cluster on KubeSphere
18+
19+
[RadonDB MySQL](https://github.com/radondb/radondb-mysql-kubernetes) is an open source, cloud-native, and highly available cluster solution based on [MySQL](https://MySQL.org) database. With the Raft protocol, RadonDB MySQL enables fast failover without losing any transactions.
20+
21+
This tutorial demonstrates how to deploy RadonDB MySQL Operator and a RadonDB MySQL Cluster on KubeSphere.
22+
23+
## Prerequisites
24+
25+
- You need to enable [the OpenPitrix system](https://kubesphere.io/docs/pluggable-components/app-store/).
26+
- You need to create a workspace, a project, and two user accounts for this tutorial. This tutorial uses `demo` and `demo-project` for demonstration. If they are not ready, refer to [Create Workspaces, Projects, Users and Roles](https://kubesphere.io/docs/quick-start/create-workspace-and-project/).
27+
- You need to enable the gateway in your project to provide external access. If they are not ready, refer to [Project Gateway](https://kubesphere.io/docs/project-administration/project-gateway/).
28+
29+
## Deployment
30+
31+
### Step 1: Add an app repository
32+
33+
1. Log in to the KubeSphere Web console.
34+
35+
2. In `demo` workspace, go to **App Repositories** under **App Management**, and then click **Create**.
36+
37+
3. In the dialog that appears, enter an app repository name and URL.
38+
39+
Enter `radondb-mysql-operator` for the app repository name 。
40+
Enter `https://radondb.github.io/radondb-mysql-kubernetes/` for the MeterSphere repository URL. Click **Validate** to verify the URL.
41+
42+
4. You will see a green check mark next to the URL if it is available. Click **OK** to continue.
43+
44+
Your repository displays in the list after it is successfully imported to KubeSphere.
45+
46+
![certify URL](_images//certify_url.png)
47+
48+
### Step 2: Deploy RadonDB MySQL Operator
49+
50+
1. In `demo-project`, go to **Apps** under **Application Workloads** and click **Deploy New App**.
51+
52+
2. In the dialog that appears, select **From App Template**.
53+
54+
3. On the new page that appears, select `radondb-mysql-operator` from the drop-down list.
55+
56+
4. Click **clickhouse-cluster**, check and config RadonDB MySQL Operator.
57+
58+
On the **Chart Files** tab, you can view the configuration and edit the `.yaml` files.
59+
On the **Version** list, you can view the app versions and select a version.
60+
61+
![operator configuration](_images//operator_yaml.png)
62+
63+
5. Click **Deploy**, go to the **Basic Information** page.
64+
65+
Confirm the app name, app version, and deployment location.
66+
67+
6. Click **Next** to continue, go to the **App Configuration** page.
68+
69+
You can change the YAML file to customize settings.
70+
71+
7. Click **Deploy** to use the default settings.
72+
73+
After a while, you can see the app is in the **Running** status.
74+
75+
### Step 3: Deploy a RadonDB MySQL cluster
76+
77+
You can refer to [RadonDB MySQL template](/config/samples) to deploy a cluster, or you can customize the yaml file to deploy a cluster.
78+
79+
Take `mysql_v1alpha1_mysqlcluster.yaml` template as an example to create a RadonDB MySQL cluster.
80+
81+
1. Hover your cursor over the hammer icon in the lower-right corner, and then select **Kubectl**.
82+
83+
2. Run the following command to install RadonDB MySQL cluster.
84+
85+
```kubectl
86+
kubectl apply -f https://github.com/radondb/radondb-mysql-kubernetes/releases/latest/download/mysql_v1alpha1_mysqlcluster.yaml --namespace=<project_name>
87+
```
88+
89+
{{< notice note >}}
90+
91+
When no project is specified, the cluster will be installed in the `kubesphere-controls-system` project by default. To specify a project, the install command needs to add the `--namespace=<project_name>` field.
92+
93+
{{</ notice >}}
94+
95+
You can see the expected output as below if the installation is successful.
96+
97+
```powershell
98+
$ kubectl apply -f https://github.com/radondb/radondb-mysql-kubernetes/releases/latest/download/mysql_v1alpha1_mysqlcluster.yaml --namespace=demo-project
99+
mysqlcluster.mysql.radondb.com/sample created
100+
```
101+
102+
3. You can run the following command to view all services of RadonDB MySQL cluster.
103+
104+
```kubectl
105+
kubectl get statefulset,svc
106+
```
107+
108+
**Expected output**
109+
110+
```powershell
111+
$ kubectl get statefulset,svc
112+
NAME READY AGE
113+
statefulset.apps/sample-mysql 3/3 10m
114+
115+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
116+
service/default-http-backend ClusterIP 10.96.69.202 <none> 80/TCP 3h2m
117+
service/sample-follower ClusterIP 10.96.9.162 <none> 3306/TCP 10m
118+
service/sample-leader ClusterIP 10.96.255.188 <none> 3306/TCP 10m
119+
service/sample-mysql ClusterIP None <none> 3306/TCP 10m
120+
```
121+
122+
## Deployment Validation
123+
124+
1. In `demo-project` project,go to **Services** under **Application Workloads**, you can see the information of services.
125+
126+
2. In **Workloads** under **Application Workloads**, click the **StatefulSets** tab, and you can see the StatefulSets are up and running.
127+
128+
Click a single StatefulSet to go to its detail page. You can see the metrics in line charts over a period of time under the **Monitoring** tab.
129+
130+
3. In **Pods** under **Application Workloads**, you can see all the Pods are up and running.
131+
132+
4. In **Volumes** under **Storage**, you can see the ClickHouse Cluster components are using persistent volumes.
133+
134+
Volume usage is also monitored. Click a volume item to go to its detail page.
135+
136+
## Access the RadonDB MySQL cluster
137+
138+
The following demonstrates how to access RadonDB MySQL in KubeSphere Web console.
139+
140+
### Method 1: Via pod terminal
141+
142+
Go to the `demo-project` project management page, access RadonDB MySQL through the terminal.
143+
144+
1. Go to **Pods** under **Application Workloads**.
145+
146+
2. Click a pod name to go to the pod management page.
147+
148+
3. Under the **Container** column box in **Resource Status**, click the terminal icon for the **mysql** container.
149+
150+
4. In terminal window, run the following command to access the RadonDB MySQL cluster.
151+
152+
![Access RadonDB MySQL](_images//pod_terminal.png)
153+
154+
### Method 2: Via Kubectl tool
155+
156+
Hover your cursor over the hammer icon in the lower-right corner, and then select **Kubectl**.
157+
158+
Run the following command to access the RadonDB MySQL cluster.
159+
160+
```kubectl
161+
kubectl exec -it <pod_name> -c mysql -n <project_name> -- mysql --user=<user_name> --password=<user_password>
162+
```
163+
164+
{{< notice note >}}
165+
166+
In the blow command, `sample-mysql-0` is the Pod name and `demo-project` is the Project name. Make sure you use your own Pod name, project name, username, and password.
167+
168+
{{</ notice >}}
169+
170+
![Access RadonDB MySQL](_images//kubectl_terminal.png)
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)