-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from hayleyling/document
Doc: add v2.2.0 release notes and update the doc list structure #64
- Loading branch information
Showing
98 changed files
with
2,881 additions
and
35 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
content/zh/docs/mysql/v2.1.3/_index.md → content/en/docs/mysql/v2.1.4/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: "v2.1.3" | ||
title: "v2.1.4" | ||
# weight从小到大排列,默认选择第一个 | ||
weight: 1 | ||
pdf: "/pdf/v2.1_zh.pdf" | ||
weight: 2 | ||
pdf: "/pdf/v2.1_en.pdf" | ||
--- |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
content/en/docs/mysql/v2.1.3/release/1.0.md → content/en/docs/mysql/v2.1.4/release/1.0.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ent/en/docs/mysql/v2.1.3/release/2.0.0.md → ...ent/en/docs/mysql/v2.1.4/release/2.0.0.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ent/en/docs/mysql/v2.1.3/release/2.1.0.md → ...ent/en/docs/mysql/v2.1.4/release/2.1.0.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ent/en/docs/mysql/v2.1.3/release/2.1.1.md → ...ent/en/docs/mysql/v2.1.4/release/2.1.1.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
title: "2.1.1" | ||
weight: 5 | ||
weight: 17 | ||
--- | ||
|
||
Version 2.1.1 was released on December 2, 2021. | ||
|
2 changes: 1 addition & 1 deletion
2
...ent/en/docs/mysql/v2.1.3/release/2.1.2.md → ...ent/en/docs/mysql/v2.1.4/release/2.1.2.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ent/en/docs/mysql/v2.1.3/release/2.1.3.md → ...ent/en/docs/mysql/v2.1.4/release/2.1.3.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ent/en/docs/mysql/v2.1.3/release/2.1.4.md → ...ent/en/docs/mysql/v2.1.4/release/2.1.4.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
content/en/docs/mysql/v2.1.3/_index.md → content/en/docs/mysql/v2.2.0/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
title: "v2.1.3" | ||
title: "v2.2.0" | ||
# weight从小到大排列,默认选择第一个 | ||
weight: 1 | ||
pdf: "/pdf/v2.1_en.pdf" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
title: "Features" | ||
weight: 4 | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
--- | ||
title: "Backup and recovery" | ||
weight: 2 | ||
--- | ||
|
||
> This feature is supported in RadonDB MySQL Kubernetes 2.1.0 and later versions. | ||
# Quick Start | ||
|
||
## Step 1: Install Operator. | ||
Install the operator named `test`: | ||
|
||
```shell | ||
$ helm install test charts/mysql-operator | ||
``` | ||
|
||
## Step 2: Configure backup for S3. | ||
|
||
Add the secret file. | ||
|
||
```yaml | ||
kind: Secret | ||
apiVersion: v1 | ||
metadata: | ||
name: sample-backup-secret | ||
namespace: default | ||
data: | ||
s3-endpoint: aHR0cDovL3MzLnNoMWEucWluZ3N0b3IuY29t | ||
s3-access-key: SEdKWldXVllLSENISllFRERKSUc= | ||
s3-secret-key: TU44TkNUdDJLdHlZREROTTc5cTNwdkxtNTlteE01blRaZlRQMWxoag== | ||
s3-bucket: bGFsYS1teXNxbA== | ||
type: Opaque | ||
``` | ||
The value `s3-xxxx` is base64-encoded. You can obtain the encoded value as follows. | ||
|
||
```shell | ||
$ echo -n "hello"|base64 | ||
``` | ||
|
||
Create the Secret in Kubernetes. | ||
|
||
```shell | ||
$ kubectl create -f config/samples/backup_secret.yaml | ||
``` | ||
|
||
Add the backupSecretName property in `mysql_v1alpha1_mysqlcluster.yaml`. | ||
|
||
```yaml | ||
spec: | ||
replicas: 3 | ||
mysqlVersion: "5.7" | ||
backupSecretName: sample-backup-secret | ||
... | ||
``` | ||
|
||
Create the backup file `mysql_v1alpha1_backup.yaml`. | ||
|
||
```yaml | ||
apiVersion: mysql.radondb.com/v1alpha1 | ||
kind: Backup | ||
metadata: | ||
name: backup-sample1 | ||
spec: | ||
# Add fields here | ||
hostname: sample-mysql-0 | ||
clustname: sample | ||
``` | ||
| Parameter | Description | | ||
|------|--------| | ||
|hostname| The pod name in the cluster| | ||
|clustname| The cluster name| | ||
|
||
## Step 3: Start cluster. | ||
|
||
```shell | ||
$ kubectl apply -f config/samples/mysql_v1alpha1_mysqlcluster.yaml | ||
``` | ||
|
||
## Step 4: Start backup. | ||
|
||
Start the backup after the cluster is successfully started. | ||
|
||
```shell | ||
$ kubectl apply -f config/samples/mysql_v1alpha1_backup.yaml | ||
``` | ||
|
||
# Uninstallation | ||
## Uninstalling operator | ||
|
||
Uninstall the cluster named `test`: | ||
|
||
```shell | ||
$ helm uninstall test | ||
$kubectl delete -f config/samples/mysql_v1alpha1_backup.yaml | ||
``` | ||
|
||
## Uninstalling cluster | ||
|
||
Uninstall the cluster named `sample`: | ||
```shell | ||
$ kubectl delete mysqlclusters.mysql.radondb.com sample | ||
``` | ||
|
||
## Uninstalling CRD | ||
|
||
```shell | ||
$ kubectl delete customresourcedefinitions.apiextensions.k8s.io mysqlclusters.mysql.radondb.com | ||
``` | ||
|
||
## Restore of cluster from backup | ||
Check the S3 bucket and set the `RestoreFrom` property in the **YAML** file to the backup directory, for example, `backup_2021720827`. | ||
|
||
```yaml | ||
... | ||
spec: | ||
replicas: 3 | ||
mysqlVersion: "5.7" | ||
backupSecretName: sample-backup-secret | ||
restoreFrom: "backup_2021720827" | ||
... | ||
``` | ||
Then run the following command to restore a cluster from the backup_2021720827 copy in the S3 bucket. | ||
|
||
```shell | ||
$ kubectl apply -f config/samples/mysql_v1alpha1_mysqlcluster.yaml | ||
``` | ||
|
||
- To recover a cluster from an NFS server, operate as follows. | ||
|
||
## Creating image | ||
|
||
```shell | ||
$ docker build -f Dockerfile.sidecar -t acekingke/sidecar:0.1 . && docker push acekingke/sidecar:0.1 | ||
$ docker build -t acekingke/controller:0.1 . && docker push acekingke/controller:0.1 | ||
``` | ||
|
||
You can replace acekingke/sidecar:0.1 with your own label. | ||
|
||
## Deploying your own image | ||
```shell | ||
$ make manifests | ||
$ make install | ||
$ make deploy IMG=acekingke/controller:0.1 KUSTOMIZE=~/radondb-mysql-kubernetes/bin/kustomize | ||
``` |
Oops, something went wrong.