Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

en,zh: add pause deployment docs of tidb cluster #906

Merged
merged 14 commits into from
Dec 29, 2020

Conversation

BinChenn
Copy link
Contributor

@BinChenn BinChenn commented Dec 7, 2020

First-time contributors' checklist

What is changed, added, or deleted? (Required)

Fix #79

Add docs of pause-deployment-of-tidbcluster in en and zh.

Change TOC.md, insert Pause Deloyment of TiDB Cluster in catalog Operator / 运维

Which TiDB Operator version(s) do your changes apply to? (Required)

  • master (the latest development version)
  • v1.1 (TiDB Operator 1.1 versions)
  • v1.0 (TiDB Operator 1.0 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
    #2013

  • Other reference link(s):

Do your changes match any of the following descriptions?

NONE

@BinChenn
Copy link
Contributor Author

BinChenn commented Dec 8, 2020

/cc @ran-huang

@ti-srebot ti-srebot requested a review from ran-huang December 8, 2020 02:30
@BinChenn
Copy link
Contributor Author

BinChenn commented Dec 8, 2020

/needs-cherry-pick-1.1

@ran-huang ran-huang added needs-cherry-pick-1.1 translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. labels Dec 8, 2020
Copy link
Contributor

@dragonly dragonly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档中的“部署”不太符合实际场景,建议改为“同步”,英文可以对应为“sync”。

部署一般只第一次安装运行,而 TidbCluster.Spec.Paused 设置好之后,实际行为是暂停同步 SpecStatus

en/pause-deployment-of-tidbcluster.md Outdated Show resolved Hide resolved
en/TOC.md Outdated Show resolved Hide resolved
zh/pause-deployment-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-deployment-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-deployment-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-deployment-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-deployment-of-tidbcluster.md Outdated Show resolved Hide resolved
@BinChenn BinChenn force-pushed the improveImportDoc branch 2 times, most recently from 3524b1a to 50f4e1a Compare December 9, 2020 02:10
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
zh/pause-sync-of-tidbcluster.md Outdated Show resolved Hide resolved
@ran-huang ran-huang added the status/require-change Needs the author to address comments. label Dec 9, 2020
en/TOC.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
@ran-huang ran-huang removed the status/require-change Needs the author to address comments. label Dec 11, 2020
Copy link
Contributor

@ran-huang ran-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rest LGTM

en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved
Copy link
Contributor Author

@BinChenn BinChenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gfd

@ti-srebot
Copy link
Contributor

@BinChenn, please update your pull request.

@ran-huang
Copy link
Contributor

@dragonly PTAL. Thanks

@BinChenn BinChenn requested a review from dragonly December 15, 2020 02:32
@ti-srebot
Copy link
Contributor

@BinChenn, please update your pull request.

{{< copyable "shell-regular" >}}

```shell
kubectl edit tc/`${cluster_name}` -n ${namespace}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl edit tc/`${cluster_name}` -n ${namespace}
kubectl edit tc ${cluster_name} -n ${namespace}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep consistent with the other docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

...
```

3. TiDB 集群同步暂停后,可以使用以下命令查看 Controller Pod 日志确认 TiDB 集群同步状态。其中 `${pod_name}` 表示 Controller Pod 的名称,`${namespace}` 表示 TiDB Operator 所在的 namespace。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. TiDB 集群同步暂停后,可以使用以下命令查看 Controller Pod 日志确认 TiDB 集群同步状态。其中 `${pod_name}` 表示 Controller Pod 的名称,`${namespace}` 表示 TiDB Operator 所在的 namespace。
3. TiDB 集群同步暂停后,可以使用以下命令查看 tidb-controller-manager Pod 日志确认 TiDB 集群同步状态。其中 `${pod_name}` 表示 tidb-controller-manager Pod 的名称,`${namespace}` 表示 TiDB Operator 所在的 namespace。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

{{< copyable "shell-regular" >}}

```shell
kubectl edit tc/${cluster_name} -n ${namespace}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
kubectl edit tc/${cluster_name} -n ${namespace}
kubectl edit tc ${cluster_name} -n ${namespace}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

...
```

3. 恢复 TiDB 集群同步后,可以使用以下命令查看 Controller Pod 日志确认 TiDB 集群同步状态。其中 `${pod_name}` 表示 Controller Pod 的名称,`${namespace}` 表示 TiDB Operator 所在的 namespace。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. 恢复 TiDB 集群同步后,可以使用以下命令查看 Controller Pod 日志确认 TiDB 集群同步状态。其中 `${pod_name}` 表示 Controller Pod 的名称,`${namespace}` 表示 TiDB Operator 所在的 namespace。
3. 恢复 TiDB 集群同步后,可以使用以下命令查看 tidb-controller-manager Pod 日志确认 TiDB 集群同步状态。其中 `${pod_name}` 表示 tidb-controller-manager Pod 的名称,`${namespace}` 表示 TiDB Operator 所在的 namespace。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

kubectl logs ${pod_name} -n ${namespace} | grep "Finished syncing TidbCluster"
```

The expected output is as follows. The `finished syncing` timestamp is later than the `pausing` timestamp, which indicates that sync of the TiDB cluster has been resumed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The expected output is as follows. The `finished syncing` timestamp is later than the `pausing` timestamp, which indicates that sync of the TiDB cluster has been resumed.
The expected output is as follows. The `finished syncing` timestamp is later than the `paused` timestamp, which indicates that sync of the TiDB cluster has been resumed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


# Pause Sync of a TiDB Cluster in Kubernetes

This document introduce how to pause sync of a TiDB cluster in Kubernetes with configuration.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This document introduce how to pause sync of a TiDB cluster in Kubernetes with configuration.
This document introduces how to pause sync of a TiDB cluster in Kubernetes using configuration.

with has multiple meanings. Let's use a more accurate way of expression.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

en/pause-sync-of-tidb-cluster.md Outdated Show resolved Hide resolved

- Avoiding unexpected rolling update

In order to prevent the compatibility of the new version TiDB Operator from affecting the TiDB clusters, you can pause sync of TiDB clusters before updating the TiDB Operator. After updating TiDB Operator, resume sync of TiDB clusters one by one or resume sync of TiDB clusters at a specified time, so as to observe the impact of TiDB Operator rolling update on the cluster.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In order to prevent the compatibility of the new version TiDB Operator from affecting the TiDB clusters, you can pause sync of TiDB clusters before updating the TiDB Operator. After updating TiDB Operator, resume sync of TiDB clusters one by one or resume sync of TiDB clusters at a specified time, so as to observe the impact of TiDB Operator rolling update on the cluster.
To prevent new versions of TiDB Operator from introducing compatibility issues into the clusters, before updating TiDB Operator, you can pause sync of TiDB clusters. After updating TiDB Operator, you can resume syncing clusters one by one, or specify a time for resume. In this way, you can observe how the rolling update of TiDB Operator would affect the cluster.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


- Avoid multiple rolling restarts

In some cases, the configuration of a TiDB cluster may be modified several times over a period of time, but you do not want to restart the TiDB cluster many times. In order to avoid multiple rolling restarts, you can pause sync of a TiDB cluster first. During this period, any modification to configuration of the TiDB cluster will not take effect. After the cluster configuration modification is completed, resuming sync of TiDB Cluster. At this time, multiple configuration changes during the sync pausing can be applied in one time rolling restart.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In some cases, the configuration of a TiDB cluster may be modified several times over a period of time, but you do not want to restart the TiDB cluster many times. In order to avoid multiple rolling restarts, you can pause sync of a TiDB cluster first. During this period, any modification to configuration of the TiDB cluster will not take effect. After the cluster configuration modification is completed, resuming sync of TiDB Cluster. At this time, multiple configuration changes during the sync pausing can be applied in one time rolling restart.
In some cases, you might need to continuously modify the cluster over a period of time, but do not want to restart the TiDB cluster many times. To avoid multiple rolling restarts, you can pause sync of the cluster. During the sync pausing, any change of the configuration does not take effect on the cluster. After you finish the modification, resume sync of the TiDB cluster. All changes can be applied in a single rolling restart.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


- Maintenance window

In some situations, you can update or restart TiDB cluster only during a maintenance window. When outside the maintenance window, you can pause sync of the TiDB cluster, so that any modification to spec does not take effect. When inside the maintenance window, you can resume sync of the TiDB cluster to allow TiDB cluster rolling update or restart.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In some situations, you can update or restart TiDB cluster only during a maintenance window. When outside the maintenance window, you can pause sync of the TiDB cluster, so that any modification to spec does not take effect. When inside the maintenance window, you can resume sync of the TiDB cluster to allow TiDB cluster rolling update or restart.
In some situations, you can update or restart the TiDB cluster only during a maintenance window. When outside the maintenance window, you can pause sync of the TiDB cluster, so that any modification to the specs does not take effect. When inside the maintenance window, you can resume sync of the TiDB cluster to allow TiDB cluster to rolling update or restart.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

...
```

3. Execute the following command to confirm the sync status of a TiDB cluster. `${pod_name}` is the name of tidb-controller-manager Pod, and `${namespace}` is the namespace of TiDB Operator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. Execute the following command to confirm the sync status of a TiDB cluster. `${pod_name}` is the name of tidb-controller-manager Pod, and `${namespace}` is the namespace of TiDB Operator.
3. To confirm the sync status of a TiDB cluster, execute the following command. `${pod_name}` is the name of tidb-controller-manager Pod, and `${namespace}` is the namespace of TiDB Operator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


## Resume sync

If you want to resume the sync of the TiDB cluster, configure the TidbCluster CR with `spec.paused: false`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If you want to resume the sync of the TiDB cluster, configure the TidbCluster CR with `spec.paused: false`.
To resume the sync of the TiDB cluster, configure `spec.paused: false` in the TidbCluster CR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


If you want to resume the sync of the TiDB cluster, configure the TidbCluster CR with `spec.paused: false`.

1. Execute the following command to edit configuration of TiDB cluster. `${cluster_name}` represents the name of TiDB cluster, and `${namespace}` refers to the TiDB cluster namespace.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Execute the following command to edit configuration of TiDB cluster. `${cluster_name}` represents the name of TiDB cluster, and `${namespace}` refers to the TiDB cluster namespace.
1. Execute the following command to edit the TiDB cluster configuration. `${cluster_name}` represents the name of the TiDB cluster, and `${namespace}` refers to the TiDB cluster namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

kubectl edit tc ${cluster_name} -n ${namespace}
```

2. Configure the TidbCluster CR with `spec.paused: false` as following, save changes and exit editor, sync of TiDB cluster's components (PD, TiKV, TiDB, TiFlash, TiCDC,Pump) will be resumed.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Configure the TidbCluster CR with `spec.paused: false` as following, save changes and exit editor, sync of TiDB cluster's components (PD, TiKV, TiDB, TiFlash, TiCDC,Pump) will be resumed.
2. Configure `spec.paused: false` as follows, and save changes. The sync of TiDB cluster components (PD, TiKV, TiDB, TiFlash, TiCDC, Pump) is then resumed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

...
```

3. After resuming sync of the TiDB cluster, execute the following command to confirm sync status of the TiDB cluster. `${pod_name}` represents the name of tidb-controller-manager Pod, `${namespace}` represents the namespace of TiDB Operator.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
3. After resuming sync of the TiDB cluster, execute the following command to confirm sync status of the TiDB cluster. `${pod_name}` represents the name of tidb-controller-manager Pod, `${namespace}` represents the namespace of TiDB Operator.
3. To confirm the sync status of a TiDB cluster, execute the following command. `${pod_name}` represents the name of the tidb-controller-manager Pod, and `${namespace}` represents the namespace of TiDB Operator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@ti-srebot
Copy link
Contributor

@BinChenn, please update your pull request.

1 similar comment
@ti-srebot
Copy link
Contributor

@BinChenn, please update your pull request.

Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the Chinese doc.

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Dec 28, 2020
Copy link
Contributor

@ran-huang ran-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Dec 29, 2020
@ran-huang
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Dec 29, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit e0bcbcc into pingcap:master Dec 29, 2020
ti-srebot pushed a commit to ti-srebot/docs-tidb-operator that referenced this pull request Dec 29, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor

cherry pick to release-1.1 in PR #958

ran-huang pushed a commit that referenced this pull request Dec 29, 2020
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>

Co-authored-by: BinChen <binchinsmail@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add docs about pause feature
5 participants