Skip to content

Commit a55589e

Browse files
authored
Merge pull request #7 from apecloud/support/update-cn-db-structures
chore: udpate cn database structures
2 parents fdc4c9a + 4f2d1ff commit a55589e

File tree

137 files changed

+5796
-5021
lines changed

Some content is hidden

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

137 files changed

+5796
-5021
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Restart
3+
description: How to Restart RabbitMQ on KubeBlocks
4+
keywords: [RabbitMQ, vector database, control plane]
5+
sidebar_position: 4
6+
sidebar_label: Restart RabbitMQ with KubeBlocks
7+
---
8+
9+
import Tabs from '@theme/Tabs';
10+
import TabItem from '@theme/TabItem';
11+
12+
## Restart
13+
14+
1. Execute the following command to restart the cluster:
15+
16+
```bash
17+
kubectl apply -f - <<EOF
18+
apiVersion: apps.kubeblocks.io/v1alpha1
19+
kind: OpsRequest
20+
metadata:
21+
name: mycluster-restart
22+
namespace: demo
23+
spec:
24+
clusterName: mycluster
25+
type: Restart
26+
restart:
27+
- componentName: rabbitmq
28+
EOF
29+
```
30+
31+
2. Check the Pod and operation status to verify the restart was successful:
32+
33+
```bash
34+
kubectl get pod -n demo
35+
36+
kubectl get ops -n demo
37+
```
38+
39+
During the restart process, Pods will display the following two states:
40+
41+
- STATUS=Terminating:Indicates the cluster is restarting
42+
- STATUS=Running:Indicates the cluster has completed restarting
43+
44+
If any errors occur during the operation, use the kubectl describe ops -n demo command to view the operation's event logs for troubleshooting.

docs/zh/preview/kubeblocks-for-apecloud-mysql/apecloud-mysql-intro/apecloud-mysql-intro.mdx renamed to docs/zh/preview/kubeblocks-for-apecloud-mysql/01-apecloud-mysql-intro.mdx

File renamed without changes.

docs/zh/preview/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.mdx renamed to docs/zh/preview/kubeblocks-for-apecloud-mysql/02-create-and-connect-an-apecloud-mysql-cluster.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 创建并连接到 ApeCloud MySQL 集群
33
description: 如何创建并连接到 ApeCloud MySQL 集群
44
keywords: [mysql, 创建 ApeCloud MySQL 集群, 连接 ApeCloud MySQL 集群]
5-
sidebar_position: 1
5+
sidebar_position: 2
66
sidebar_label: 创建并连接
77
---
88

@@ -20,7 +20,7 @@ import TabItem from '@theme/TabItem';
2020
* 如果您想通过 `kbcli` 创建并连接 ApeCloud MySQL 集群,请先[安装 kbcli](./../../installation/install-kbcli.md)
2121
* [安装 KubeBlocks](./../../installation/install-kubeblocks.md)
2222
* 确保 ApeCloud MySQL 引擎已启用。KubeBlocks 默认已安装 ApeCloud MySQL,如果您在安装 KubeBlocks 关闭/卸载了该引擎,可参考相关文档,再次[启用/安装该引擎](./../../installation/install-addons.md)
23-
23+
2424
<Tabs>
2525

2626
<TabItem value="kubectl" label="kubectl" default>
@@ -35,7 +35,7 @@ import TabItem from '@theme/TabItem';
3535
</TabItem>
3636

3737
<TabItem value="kbcli" label="kbcli">
38-
38+
3939
```bash
4040
kbcli addon list
4141
>
@@ -54,7 +54,7 @@ import TabItem from '@theme/TabItem';
5454
<Tabs>
5555

5656
<TabItem value="kubectl" label="kubectl" default>
57-
57+
5858
确认 `apecloud-mysql` cluster definition 是否已安装。
5959

6060
```bash

docs/zh/preview/kubeblocks-for-apecloud-mysql/cluster-management/scale-for-apecloud-mysql.mdx renamed to docs/zh/preview/kubeblocks-for-apecloud-mysql/03-scale-for-apecloud-mysql.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 集群扩缩容
33
description: 如何对集群进行扩缩容操作?
44
keywords: [mysql, 水平扩缩容, 垂直扩缩容]
5-
sidebar_position: 2
5+
sidebar_position: 3
66
sidebar_label: 扩缩容
77
---
88

@@ -100,7 +100,7 @@ mycluster demo apecloud-mysql ac-mysql-8.0.30 Delete
100100
```
101101
102102
</TabItem>
103-
103+
104104
<TabItem value="编辑集群 YAML 文件" label="编辑集群 YAML 文件">
105105
106106
1. 修改 YAML 文件中 `spec.componentSpecs.resources` 的配置。`spec.componentSpecs.resources` 控制资源的请求值和限制值,修改参数值将触发垂直扩缩容。
@@ -253,7 +253,7 @@ mycluster demo apecloud-mysql ac-mysql-8.0.30 Delete
253253
type: HorizontalScaling
254254
horizontalScaling:
255255
- componentName: mysql
256-
scaleOut:
256+
scaleOut:
257257
replicaChanges: 2
258258
EOF
259259
```
@@ -274,7 +274,7 @@ mycluster demo apecloud-mysql ac-mysql-8.0.30 Delete
274274
type: HorizontalScaling
275275
horizontalScaling:
276276
- componentName: mysql
277-
scaleIn:
277+
scaleIn:
278278
replicaChanges: 2
279279
EOF
280280
```
@@ -297,7 +297,7 @@ mycluster demo apecloud-mysql ac-mysql-8.0.30 Delete
297297
```
298298
299299
</TabItem>
300-
300+
301301
<TabItem value="编辑集群 YAML 文件" label="编辑集群 YAML 文件">
302302
303303
1. 修改 YAML 文件中 `spec.componentSpecs.replicas` 的配置。`spec.componentSpecs.replicas` 定义了 pod 数量,修改该参数将触发集群水平扩缩容。
@@ -384,7 +384,7 @@ mycluster demo apecloud-mysql ac-mysql-8.0.30 Delete
384384
385385
```bash
386386
Status:
387-
conditions:
387+
conditions:
388388
- lastTransitionTime: "2023-02-08T04:20:26Z"
389389
message: VolumeSnapshot/mysql-cluster-mysql-scaling-dbqgp: Failed to set default snapshot
390390
class with error cannot find default snapshot class
@@ -420,7 +420,7 @@ Status:
420420
421421
```bash
422422
kubectl delete backup -l app.kubernetes.io/instance=mycluster -n demo
423-
423+
424424
kubectl delete volumesnapshot -l app.kubernetes.io/instance=mycluster -n demo
425425
```
426426

docs/zh/preview/kubeblocks-for-apecloud-mysql/cluster-management/stop-start-a-cluster.mdx renamed to docs/zh/preview/kubeblocks-for-apecloud-mysql/04-stop-start-a-cluster.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 停止/启动集群
33
description: 如何停止/启动集群
44
keywords: [mysql, 停止集群, 启动集群]
5-
sidebar_position: 5
5+
sidebar_position: 4
66
sidebar_label: 停止/启动
77
---
88

@@ -35,7 +35,7 @@ import TabItem from '@theme/TabItem';
3535
```
3636
3737
</TabItem>
38-
38+
3939
<TabItem value="编辑集群 YAML 文件" label="编辑集群 YAML 文件">
4040
4141
将 replicas 设为 0,删除 Pods。
@@ -54,7 +54,7 @@ import TabItem from '@theme/TabItem';
5454
componentSpecs:
5555
- name: mysql
5656
componentDefRef: mysql
57-
disableExporter: true
57+
disableExporter: true
5858
replicas: 0
5959
volumeClaimTemplates:
6060
- name: data
@@ -102,7 +102,7 @@ import TabItem from '@theme/TabItem';
102102
</Tabs>
103103
104104
## 启动集群
105-
105+
106106
1. 配置集群名称,并执行以下命令来启动该集群。
107107
108108
<Tabs>
@@ -119,11 +119,11 @@ import TabItem from '@theme/TabItem';
119119
spec:
120120
clusterName: mycluster
121121
type: Start
122-
EOF
122+
EOF
123123
```
124124
125125
</TabItem>
126-
126+
127127
<TabItem value="编辑集群 YAML 文件" label="编辑集群 YAML 文件">
128128
129129
将 replicas 数值调整为停止集群前的数量,再次启动集群。

docs/zh/preview/kubeblocks-for-apecloud-mysql/cluster-management/restart-mysql-cluster.mdx renamed to docs/zh/preview/kubeblocks-for-apecloud-mysql/05-restart-mysql-cluster.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 重启集群
33
description: 如何重启集群
44
keywords: [mysql, 重启, 集群重启]
5-
sidebar_position: 4
5+
sidebar_position: 5
66
sidebar_label: 重启
77
---
88

@@ -36,7 +36,7 @@ KubeBlocks 支持重启集群中的所有 Pod。当数据库出现异常时,
3636
namespace: demo
3737
spec:
3838
clusterName: mycluster
39-
type: Restart
39+
type: Restart
4040
restart:
4141
- componentName: mysql
4242
EOF

docs/zh/preview/kubeblocks-for-apecloud-mysql/cluster-management/expand-volume.mdx renamed to docs/zh/preview/kubeblocks-for-apecloud-mysql/06-expand-volume.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: 磁盘扩容
33
description: 如何调整集群所使用的磁盘大小
4-
sidebar_position: 3
4+
sidebar_position: 6
55
sidebar_label: 磁盘扩容
66
---
77

docs/zh/preview/kubeblocks-for-apecloud-mysql/cluster-management/switchover.mdx renamed to docs/zh/preview/kubeblocks-for-apecloud-mysql/07-switchover.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 切换 MySQL 集群
33
description: 如何切换 MySQL 集群
44
keywords: [mysql, 切换集群, switchover]
5-
sidebar_position: 6
5+
sidebar_position: 7
66
sidebar_label: 切换
77
---
88

docs/zh/preview/kubeblocks-for-apecloud-mysql/configuration/configuration.mdx renamed to docs/zh/preview/kubeblocks-for-apecloud-mysql/08-configuration.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: 配置集群参数
33
description: 如何配置集群参数
44
keywords: [mysql, 参数, 配置]
5-
sidebar_position: 1
5+
sidebar_position: 8
66
---
77

88
import Tabs from '@theme/Tabs';
@@ -209,7 +209,7 @@ kbcli cluster describe-config mycluster -n demo
209209
```
210210

211211
* 查看指定参数的使用文档。
212-
212+
213213
```bash
214214
kbcli cluster explain-config mycluster --param=innodb_buffer_pool_size --config-specs=mysql-consensusset-config -n demo
215215
```
@@ -230,9 +230,9 @@ kbcli cluster describe-config mycluster -n demo
230230
Scope: Global
231231
Dynamic: false
232232
Type: integer
233-
Description: The size in bytes of the memory buffer innodb uses to cache data and indexes of its tables
233+
Description: The size in bytes of the memory buffer innodb uses to cache data and indexes of its tables
234234
```
235-
235+
236236
</details>
237237

238238
* Allowed Values:定义了参数的有效值范围。
@@ -352,7 +352,7 @@ kbcli cluster describe-config mycluster -n demo
352352
+-----------------+-------+
353353
1 row in set (0.04 sec)
354354
```
355-
355+
356356
```bash
357357
mysql> show variables like '%innodb_buffer_pool_size%';
358358
>
@@ -423,7 +423,7 @@ vttablet-config vttablet.cnf true vttablet-config-template
423423
History modifications:
424424
OPS-NAME CLUSTER COMPONENT CONFIG-SPEC-NAME FILE STATUS POLICY PROGRESS CREATED-TIME VALID-UPDATED
425425
mycluster-reconfiguring-zk4b4 mycluster mysql mysql-consensusset-config my.cnf Succeed syncDynamicReload 1/1 Sep 19,2024 18:26 UTC+0800 {"my.cnf":"{\"mysqld\":{\"innodb_buffer_pool_size\":\"512M\",\"max_connections\":\"600\"}}"}
426-
mycluster-reconfiguring-djdfc mycluster mysql mysql-consensusset-config my.cnf Succeed syncDynamicReload 1/1 Sep 19,2024 18:31 UTC+0800 {"my.cnf":"{\"mysqld\":{\"max_connections\":\"610\"}}"}
426+
mycluster-reconfiguring-djdfc mycluster mysql mysql-consensusset-config my.cnf Succeed syncDynamicReload 1/1 Sep 19,2024 18:31 UTC+0800 {"my.cnf":"{\"mysqld\":{\"max_connections\":\"610\"}}"}
427427
```
428428
429429
从上面可以看到,有三个参数被修改过。
@@ -434,10 +434,10 @@ mycluster-reconfiguring-djdfc mycluster mysql mysql-consensusset-confi
434434
kbcli cluster diff-config mycluster-reconfiguring-zk4b4 mycluster-reconfiguring-djdfc -n demo
435435
>
436436
DIFF-CONFIGURE RESULT:
437-
ConfigFile: my.cnf TemplateName: mysql-consensusset-config ComponentName: mysql ClusterName: mycluster UpdateType: update
437+
ConfigFile: my.cnf TemplateName: mysql-consensusset-config ComponentName: mysql ClusterName: mycluster UpdateType: update
438438

439-
PARAMETERNAME MYCLUSTER-RECONFIGURING-ZK4B4 MYCLUSTER-RECONFIGURING-DJDFC
440-
max_connections 600 610
439+
PARAMETERNAME MYCLUSTER-RECONFIGURING-ZK4B4 MYCLUSTER-RECONFIGURING-DJDFC
440+
max_connections 600 610
441441
innodb_buffer_pool_size 512M 512M
442442
```
443443

docs/zh/preview/kubeblocks-for-apecloud-mysql/cluster-management/delete-mysql-cluster.mdx renamed to docs/zh/preview/kubeblocks-for-apecloud-mysql/10-delete-mysql-cluster.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
title: 删除集群
2+
title: 删除
33
description: 如何删除集群
44
keywords: [mysql, 删除集群]
5-
sidebar_position: 7
5+
sidebar_position: 10
66
sidebar_label: 删除保护
77
---
88

0 commit comments

Comments
 (0)