Skip to content

Commit 9d0ab5e

Browse files
authored
doc: translate and update docs. #564 (#565)
* doc: proofread zh-cn md files * doc: translate and proofread docs.
1 parent afc7512 commit 9d0ab5e

31 files changed

+1240
-371
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
# What is RadonDB MySQL
2323

24-
**RadonDB MySQL** is an open-source, cloud-native, and high-availability cluster solution based on MySQL. It supports the architecture of a primary database and multiple secondary databases, with a full set of management functions for security, automatic backup, monitoring and alarming, and automatic capacity expansion, and so on.
24+
**RadonDB MySQL** is an open-source, cloud-native, and high-availability cluster solution based on MySQL. It supports the architecture of one leader node and multiple replicas, with a set of management functions for security, automatic backup, monitoring and alarming, automatic scaling, and so on.
2525

2626
**RadonDB MySQL Kubernetes** supports installation, deployment and management of RadonDB MySQL clusters on [Kubernetes](https://kubernetes.io/), [KubeSphere](https://kubesphere.com.cn/) and [Rancher](https://rancher.com), and automates tasks involved in running a RadonDB MySQL cluster.
2727

@@ -71,12 +71,12 @@
7171

7272
## Steps
7373

74-
### Step 1: Add a Helm repository
74+
### Step 1: Add a Helm repository.
7575

7676
```plain
7777
helm repo add radondb https://radondb.github.io/radondb-mysql-kubernetes/
7878
```
79-
### Step 2: Install Operator
79+
### Step 2: Install Operator.
8080

8181
Set the release name to `demo` and create a [Deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/) named `demo-mysql-operator`.
8282

@@ -87,7 +87,7 @@ helm install demo radondb/mysql-operator
8787
8888
> This step also creates the [CRD](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) required by the cluster.
8989
90-
### Step 3: Deploy a RadonDB MySQL Cluster
90+
### Step 3: Deploy a RadonDB MySQL Cluster.
9191

9292
Run the following command to create an instance of the `mysqlclusters.mysql.radondb.com` CRD and thereby create a RadonDB MySQL cluster by using the default parameters. To customize the cluster parameters, see [Configuration Parameters](https://github.com/radondb/radondb-mysql-kubernetes/blob/main/docs/zh-cn/config_para.md).
9393

@@ -100,7 +100,7 @@ kubectl apply -f https://github.com/radondb/radondb-mysql-kubernetes/releases/la
100100
* [Deploy RadonDB MySQL on Kubernetes](https://github.com/radondb/radondb-mysql-kubernetes/blob/main/docs/en-us/deploy_radondb-mysql_operator_on_k8s.md)
101101
* [Deploy RadonDB MySQL on KubeSphere](https://github.com/radondb/radondb-mysql-kubernetes/blob/main/docs/en-us/deploy_radondb-mysql_operator_on_kubesphere.md)
102102
* [Deploy RadonDB MySQL on Rancher](https://github.com/radondb/radondb-mysql-kubernetes/blob/main/docs/en-us/deploy_radondb-mysql_operator_on_rancher.md)
103-
* [All Documents](https://radondb.com/en/docs/mysql/)
103+
* [All documents](https://radondb.com/en/docs/mysql/)
104104

105105

106106
# Who are using RadonDB MySQL

docs/en-us/DebugMode.md

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
1-
# Debug Mode
2-
When you want avoid the restart-on-fail loop for mysql container, You should use Debug Mode.
3-
it just use create a empty file `/var/lib/mysql/sleep-forever`
4-
for example:
1+
English | [简体中文](../zh-cn/DebugMode.md)
2+
3+
Contents
4+
===========
5+
* [Debug mode](#debug-mode)
6+
* [Remove the debug mode](#remove-the-debug-mode)
7+
8+
# Enable the debug mode
9+
To avoid the restart-on-fail loop of mysql container in O&M, enable the debug mode. You need to create an empty file `/var/lib/mysql/sleep-forever` as follows.
10+
511
```bash
612
kubectl exec -it sample-mysql-0 -c mysql -- sh -c 'touch /var/lib/mysql/sleep-forever'
713
```
8-
it make pod sample-mysql-0's mysql container will never restart when mysqld is crashed.
14+
As a result, the MySQL container in the `sample-mysql-0` pod will never restart when the mysqld crashes.
915

10-
# Remove Debug Mode
16+
# Remove the debug mode
1117

1218
```bash
1319
kubectl exec -it sample-mysql-0 -c mysql -- sh -c 'rm /var/lib/mysql/sleep-forever'
1420
```
15-
restart the container
21+
22+
As a result, the MySQL container in the `sample-mysql-0` pod will restart after mysqld exits.
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,47 @@
1-
## 如何创建自己的镜像
1+
English | [简体中文](../zh-cn/build_and_use_images.md)
2+
3+
## How to build and use images
24
* [Operator](#operator)
3-
* [Sidecar](#sidecar)
5+
* [Sidecar](#sidecar)
46

57
### Operator
68

7-
1. 创建自己的镜像并上传到docker hub上.
9+
1. Build an operator image and push it to Docker Hub.
810

911
```
1012
docker build -t {your repo}/mysql-operator:{your tag} . && docker push {your repo}/mysql-operator:{your tag}
1113
```
1214

13-
2. 添加 radondb mysql 的 helm 库.
15+
2. Add the Helm repository of RadonDB MySQL.
1416

1517
```
1618
helm repo add radondb https://radondb.github.io/radondb-mysql-kubernetes/
1719
```
1820

19-
3. 使用自己的镜像来安装/更新 operator.
21+
3. Install/Update the operator using the image.
2022

2123
```
2224
helm upgrade demo radondb/mysql-operator --install --set manager.image={your repo}/mysql-operator --set manager.tag={your tag}
2325
```
2426

2527
### Sidecar
2628

27-
1. 创建自己的 sidecar 镜像并 push 到 docker hub 中.
29+
1. Build a sidecar image and push it to Docker Hub.
2830

2931
```
3032
docker build -f Dockerfile.sidecar -t {your repo}/mysql-sidecar:{your tag} . && docker push {your repo}/mysql-sidecar:{your tag}
3133
```
3234

33-
2. 创建sample cluster.
35+
2. Create a sample cluster.
3436

3537
```
3638
kubectl apply -f https://github.com/radondb/radondb-mysql-kubernetes/releases/latest/download/mysql_v1alpha1_mysqlcluster.yaml
3739
```
3840

39-
3. 从已有的 cluster 中应用自己的镜像.
41+
3. Apply the image to the cluster.
4042

4143
```
4244
kubectl patch mysql sample -p '{"spec": {"podPolicy": {"sidecarImage": "{your repo}/mysql-sidecar:{your tag}"}}}' --type=merge
4345
```
4446

45-
> 本例中集群名称为 `sample`, 您可以修改为您自己的集群名称.
46-
47+
> You can use your own cluster name to replace `sample`.

docs/en-us/config_para.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
English | [简体中文](../zh-cn/config_para.md)
2+
3+
Contents
4+
=============
5+
6+
* [Parameter Configuration](#parameter-configuration)
7+
* [Container](#Container)
8+
* [Pod](#pod)
9+
* [Persistence](#Persistence)
10+
11+
# Parameter Configuration
12+
13+
## Container
14+
15+
| Parameter | Description | Default |
16+
| :--------------------------------- | :-------------------------- | :---------------------------------------------------------- |
17+
| MysqlVersion | MySQL version | 5.7 |
18+
| MysqlOpts.RootPassword | MySQL root user password | "" |
19+
| MysqlOpts.User | Default MySQL username | radondb_usr |
20+
| MysqlOpts.Password | Default MySQL user password | RadonDB@123 |
21+
| MysqlOpts.Database | Default database name | radondb |
22+
| MysqlOpts.InitTokuDB | TokuDB enabled | true |
23+
| MysqlOpts.MysqlConf | MySQL configuration | - |
24+
| MysqlOpts.Resources | MySQL container resources | Reserve: CPU 100M, memory 256Mi; </br> limit: CPU 500M, memory 1Gi |
25+
| XenonOpts.Image | Xenon (HA MySQL) image | radondb/xenon:1.1.5-alpha |
26+
| XenonOpts.AdmitDefeatHearbeatCount | Maximum heartbeat failures allowed | 5 |
27+
| XenonOpts.ElectionTimeout | Election timeout period (milliseconds) | 10000 ms |
28+
| XenonOpts.Resources | Xenon container resources | Reserve: CPU 50M, memory 128Mi; </br> limit: CPU 100M, memory 256Mi |
29+
| MetricsOpts.Enabled | Metrics (monitor) container enabled | false |
30+
| MetricsOpts.Image | Metrics container image | prom/mysqld-exporter:v0.12.1 |
31+
| MetricsOpts.Resources | Metrics container resources | Reserve: CPU 10M, memory 32Mi; </br>limit: CPU 100M, memory 128Mi |
32+
33+
## Pod
34+
35+
| Parameter | Description | Default |
36+
| :-------------------------- | :----------------------------------------------- | :------------------------ |
37+
| Replicas | The number of cluster nodes. The value 0, 2, 3 and 5 are allowed. | 3 |
38+
| PodPolicy.ImagePullPolicy | The image pull policy is only allowed to be Always/IfnNotPresent/Never. | IfNotPresent |
39+
| PodPolicy.Labels | Pod [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/) | - |
40+
| PodPolicy.Annotations | Pod [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) | - |
41+
| PodPolicy.Affinity | Pod [affinity](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/) | - |
42+
| PodPolicy.PriorityClassName | Pod [priority](https://kubernetes.io/docs/concepts/scheduling-eviction/pod-priority-preemption/) class name | - |
43+
| PodPolicy.Tolerations | Pod [toleration](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) list | - |
44+
| PodPolicy.SchedulerName | Pod [scheduler](https://kubernetes.io/docs/concepts/scheduling-eviction/kube-scheduler/) name | - |
45+
| PodPolicy.ExtraResources | Node resources (containers except MySQL and Xenon) | Reserve: CPU 10M, memory 32Mi |
46+
| PodPolicy.SidecarImage | Sidecar image | radondb/mysql-sidecar:latest |
47+
| PodPolicy.BusyboxImage | Busybox image | busybox:1.32 |
48+
| PodPolicy.SlowLogTail | SlowLogTail enabled | false |
49+
| PodPolicy.AuditLogTail | AuditLogTail enabled | false |
50+
51+
## Persistence
52+
53+
| Parameter | Description | Default |
54+
| :----------------------- | :------------- | :------------ |
55+
| Persistence.Enabled | Persistence enabled | true |
56+
| Persistence.AccessModes | Access mode | ReadWriteOnce |
57+
| Persistence.StorageClass | Storage class | - |
58+
| Persistence.Size | Size | 10Gi |
Lines changed: 41 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,84 @@
1-
# Quickstart for NFS backup
2-
## Install NFS server
1+
English | [简体中文](../zh-cn/deploy_backup_restore_nfs.md)
32

4-
### 1. Prepare Storage
3+
# Quickstart for NFS backups
54

6-
Create the NFS PV and SC.
5+
## Contents
76

8-
```
9-
kubectl apply -f config/samples/nfs_pv.yaml
10-
```
7+
* [Install NFS server and resources](#install-nfs-server-and-resources)
8+
* [1. Install by Helm](#1-install-by-helm)
9+
* [2. Install by kubectl](#2-install-by-kubectl)
10+
* [Obtain `nfsServerAddress`](#obtain-nfsserveraddress)
11+
* [Create an NFS backup](#create-an-nfs-backup)
12+
* [1. Configure the NFS server address](#1-configure-the-nfs-server-address)
13+
* [2. Create a backup](#2-create-a-backup)
14+
* [3. Verify the backup](#3-verify-the-backup)
15+
* [Restore the cluster from the NFS backup](#restore-the-cluster-from-the-nfs-backup)
1116

12-
> You can specify the PVC you created by modifying the `persistentVolumeClaim.claimName` in the `config/samples/nfs_server.yaml`.
13-
14-
### 2. Create nfs server
15-
16-
Create ReplicationController and Service.
17+
## Install NFS server and resources
1718

19+
### 1. Install by Helm
20+
```shell
21+
helm install demo charts/mysql-operator --set nfsBackup.installServer=true --set nfsBackup.volume.createLocalPV=true
1822
```
19-
kubectl apply -f config/samples/nfs_server.yaml
23+
Or manually create the PVC and run:
24+
```shell
25+
helm install demo charts/mysql-operator --set nfsBackup.installServer=true --set nfsBackup.volume.specifiedPVC=XXXX
2026
```
27+
> `XXX` stands for the PVC name.
2128
22-
Get `NFSServerAddress`.
29+
In this way, you can install the Pod and Service of the NFS server in the cluster while installing the operator.
2330

31+
### 2. Install by kubectl
32+
```shell
33+
kubectl apply -f config/samples/nfs_pv.yaml
34+
kubectl apply -f config/samples/nfs_server.yaml
2435
```
25-
# example
36+
37+
## Obtain `nfsServerAddress`
38+
For example:
39+
```shell
40+
2641
kubectl get svc nfs-server --template={{.spec.clusterIP}}
2742
10.96.253.82
2843
```
44+
You can use `ClusterIp` to perform NFS backup. The cluster IP address in the example is `10.96.253.82`.
2945

30-
## Create a NFS backup
31-
32-
### 1. Configure address of NFS Server.
46+
## Create an NFS backup
47+
### 1. Configure the NFS server address
3348

3449
```yaml
3550
# config/samples/mysql_v1alpha1_backup.yaml
3651
nfsServerAddress: "10.96.253.82"
3752
```
3853
3954
### 2. Create a backup
40-
4155
```shell
4256
kubectl apply -f config/samples/mysql_v1alpha1_backup.yaml
4357
```
58+
> Note: The backup CRD and MySQL cluster CRD must be in the same namespace.
4459
45-
> Notice: backup cr and mysqlcluster cr must be in the same namespace.
46-
### 3. Verify your backup
47-
48-
You can find the backup folder called `<cluster name>_<timestamp>`.
60+
### 3. Verify the backup
61+
View the backup directory `<cluster name>_<timestamp>` as follows.
4962

5063
```
5164
kubectl exec -it <pod name of nfs server> -- ls /exports
5265
index.html initbackup sample_2022419101946
5366
```
5467

55-
## Restore cluster from exist NFS backup
68+
## Restore the cluster from the NFS backup
5669

57-
Configure the `mysql_v1alpha1_cluster.yaml`, uncomment the `nfsServerAddress` field and fill in your own configuration.
70+
Configure the `nfsServerAddress` attribute to the NFS server address in the `mysql_v1alpha1_cluster.yaml` file.
5871

5972
```yaml
6073
...
6174
restoreFrom: "sample_2022419101946"
6275
nfsServerAddress: 10.96.253.82
6376
```
6477
65-
> Notice: restoreFrom is the folder name of a backup. You can find it on the path mounted in NFS Server.
78+
> Notice: `restoreFrom` stands for the pathname of the backup. You can get it by checking the path loaded by the NFS server.
6679

67-
Create cluster from NFS server backup copy:
80+
Restore cluster from NFS backup as follows.
6881

6982
```
7083
kubectl apply -f config/samples/mysql_v1alpha1_cluster.yaml
71-
```
72-
73-
## Build your own image
74-
75-
```
76-
docker build -f Dockerfile.sidecar -t acekingke/sidecar:0.1 . && docker push acekingke/sidecar:0.1
77-
docker build -t acekingke/controller:0.1 . && docker push acekingke/controller:0.1
78-
```
79-
> You can replace acekingke/sidecar:0.1 with your own tag
80-
81-
## Deploy your own manager
82-
```shell
83-
make manifests
84-
make install
85-
make deploy IMG=acekingke/controller:0.1 KUSTOMIZE=~/radondb-mysql-kubernetes/bin/kustomize
86-
```
84+
```

0 commit comments

Comments
 (0)