Skip to content

Commit

Permalink
5.4.0 tiup bump version (#8214)
Browse files Browse the repository at this point in the history
  • Loading branch information
qqqdan authored Feb 7, 2022
1 parent 6f0a135 commit bd73a2b
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 44 deletions.
12 changes: 6 additions & 6 deletions production-deployment-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,12 +144,12 @@ aliases: ['/docs-cn/dev/production-offline-deployment-using-tiup/', '/zh/tidb/de

如果从官网下载的离线镜像不满足你的具体需求,或者希望对已有的离线镜像内容进行调整,例如增加某个组件的新版本等,可以采取以下步骤进行操作:

1. 在制作离线镜像时,可通过参数指定具体的组件和版本等信息,获得不完整的离线镜像。例如,要制作一个只包括 v1.7.0 版本 TiUP 和 TiUP Cluster 的离线镜像,可执行如下命令:
1. 在制作离线镜像时,可通过参数指定具体的组件和版本等信息,获得不完整的离线镜像。例如,要制作一个只包括 v1.9.0 版本 TiUP 和 TiUP Cluster 的离线镜像,可执行如下命令:

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

```bash
tiup mirror clone tiup-custom-mirror-v1.7.0 --tiup v1.7.0 --cluster v1.7.0
tiup mirror clone tiup-custom-mirror-v1.9.0 --tiup v1.9.0 --cluster v1.9.0
```

如果只需要某一特定平台的组件,也可以通过 `--os``--arch` 参数来指定。
Expand Down Expand Up @@ -181,10 +181,10 @@ aliases: ['/docs-cn/dev/production-offline-deployment-using-tiup/', '/zh/tidb/de
{{< copyable "shell-regular" >}}

```bash
tiup mirror merge tiup-custom-mirror-v1.7.0
tiup mirror merge tiup-custom-mirror-v1.9.0
```

5. 上述步骤完成后,通过 `tiup list` 命令检查执行结果。在本文例子中,使用 `tiup list tiup``tiup list cluster` 均应能看到对应组件的 `v1.7.0` 版本出现在结果中。
5. 上述步骤完成后,通过 `tiup list` 命令检查执行结果。在本文例子中,使用 `tiup list tiup``tiup list cluster` 均应能看到对应组件的 `v1.9.0` 版本出现在结果中。

#### 部署离线环境 TiUP 组件

Expand Down Expand Up @@ -304,13 +304,13 @@ source /home/tidb/.bash_profile
{{< copyable "shell-regular" >}}

```shell
tiup cluster deploy tidb-test v5.3.0 ./topology.yaml --user root [-p] [-i /home/root/.ssh/gcp_rsa]
tiup cluster deploy tidb-test v5.4.0 ./topology.yaml --user root [-p] [-i /home/root/.ssh/gcp_rsa]
```

以上部署示例中:

- `tidb-test` 为部署的集群名称。
- `v5.3.0` 为部署的集群版本,可以通过执行 `tiup list tidb` 来查看 TiUP 支持的最新可用版本。
- `v5.4.0` 为部署的集群版本,可以通过执行 `tiup list tidb` 来查看 TiUP 支持的最新可用版本。
- 初始化配置文件为 `topology.yaml`
- `--user root` 表示通过 root 用户登录到目标主机完成集群部署,该用户需要有 ssh 到目标机器的权限,并且在目标机器有 sudo 权限。也可以用其他有 ssh 和 sudo 权限的用户完成部署。
- [-i] 及 [-p] 为可选项,如果已经配置免密登录目标机,则不需填写。否则选择其一即可,[-i] 为可登录到目标机的 root 用户(或 --user 指定的其他用户)的私钥,也可使用 [-p] 交互式输入该用户的密码。
Expand Down
8 changes: 4 additions & 4 deletions quick-start-with-tidb.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ TiDB 是一个分布式系统。最基础的 TiDB 测试集群通常由 2 个 Ti
{{< copyable "shell-regular" >}}

```shell
tiup playground v5.3.0 --db 2 --pd 3 --kv 3
tiup playground v5.4.0 --db 2 --pd 3 --kv 3
```

上述命令会在本地下载并启动某个版本的集群(例如 v5.3.0)。最新版本可以通过执行 `tiup list tidb` 来查看。运行结果将显示集群的访问方式:
上述命令会在本地下载并启动某个版本的集群(例如 v5.4.0)。最新版本可以通过执行 `tiup list tidb` 来查看。运行结果将显示集群的访问方式:

```log
CLUSTER START SUCCESSFULLY, Enjoy it ^-^
Expand Down Expand Up @@ -167,10 +167,10 @@ TiDB 是一个分布式系统。最基础的 TiDB 测试集群通常由 2 个 Ti
{{< copyable "shell-regular" >}}

```shell
tiup playground v5.3.0 --db 2 --pd 3 --kv 3
tiup playground v5.4.0 --db 2 --pd 3 --kv 3
```

上述命令会在本地下载并启动某个版本的集群(例如 v5.3.0)。最新版本可以通过执行 `tiup list tidb` 来查看。运行结果将显示集群的访问方式:
上述命令会在本地下载并启动某个版本的集群(例如 v5.4.0)。最新版本可以通过执行 `tiup list tidb` 来查看。运行结果将显示集群的访问方式:

```log
CLUSTER START SUCCESSFULLY, Enjoy it ^-^
Expand Down
4 changes: 2 additions & 2 deletions scale-tidb-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ tiup cluster display <cluster-name>
```

```
Starting /root/.tiup/components/cluster/v1.7.0/cluster display <cluster-name> 
Starting /root/.tiup/components/cluster/v1.9.0/cluster display <cluster-name> 
TiDB Cluster: <cluster-name>
TiDB Version: v5.3.0
TiDB Version: v5.4.0
ID              Role Host        Ports Status Data Dir                Deploy Dir
Expand Down
2 changes: 1 addition & 1 deletion tiup/tiup-component-cluster-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tiup cluster deploy <cluster-name> <version> <topology.yaml> [flags]
```

- `<cluster-name>` 表示新集群的名字,不能和现有集群同名
- `<version>` 为要部署的 TiDB 集群版本号,如 `v5.3.0`
- `<version>` 为要部署的 TiDB 集群版本号,如 `v5.4.0`
- `<topology.yaml>` 为事先编写好的[拓扑文件](/tiup/tiup-cluster-topology-reference.md)

## 选项
Expand Down
12 changes: 6 additions & 6 deletions tiup/tiup-component-management.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ tiup install tidb
tiup install tidb:nightly
```

示例三:使用 TiUP 安装 v5.3.0 版本的 TiKV
示例三:使用 TiUP 安装 v5.4.0 版本的 TiKV

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

```shell
tiup install tikv:v5.3.0
tiup install tikv:v5.4.0
```

## 升级组件
Expand Down Expand Up @@ -127,12 +127,12 @@ Flags:

如果想要多次启动同一个组件并复用之前的工作目录,就可以在启动时用 `--tag` 指定相同的名字。指定 tag 后,在实例终止时就*不会自动删除*工作目录,方便下次启动时复用。

示例一:运行 v5.3.0 版本的 TiDB
示例一:运行 v5.4.0 版本的 TiDB

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

```shell
tiup tidb:v5.3.0
tiup tidb:v5.4.0
```

示例二:指定 tag 运行 TiKV
Expand Down Expand Up @@ -218,12 +218,12 @@ component 为要卸载的组件名称,version 为要卸载的版本,这两
- 若省略版本,加 `--all` 表示卸载该组件所有版本
- 若版本和组件都省略,则加 `--all` 表示卸载所有组件及其所有版本

示例一:卸载 v5.3.0 版本的 TiDB
示例一:卸载 v5.4.0 版本的 TiDB

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

```shell
tiup uninstall tidb:v5.3.0
tiup uninstall tidb:v5.4.0
```

示例二:卸载所有版本的 TiKV
Expand Down
6 changes: 3 additions & 3 deletions tiup/tiup-mirror.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ tiup mirror clone <target-dir> [global-version] [flags]

如果只想克隆某个组件的某一个版本而不是所有版本,则使用 `--<component>=<version>` 来限定,例如:

- 只想克隆 TiDB 的 v5.3.0 版本,则执行 `tiup mirror clone <target-dir> --tidb v5.3.0`
- 只想克隆 TiDB 的 v5.3.0 版本,以及 TiKV 的所有版本,则执行 `tiup mirror clone <target-dir> --tidb v5.3.0 --tikv all`
- 克隆一个集群的所有组件的 v5.3.0 版本,则执行 `tiup mirror clone <target-dir> v5.3.0`
- 只想克隆 TiDB 的 v5.4.0 版本,则执行 `tiup mirror clone <target-dir> --tidb v5.4.0`
- 只想克隆 TiDB 的 v5.4.0 版本,以及 TiKV 的所有版本,则执行 `tiup mirror clone <target-dir> --tidb v5.4.0 --tikv all`
- 克隆一个集群的所有组件的 v5.4.0 版本,则执行 `tiup mirror clone <target-dir> v5.4.0`

## 使用示例

Expand Down
6 changes: 3 additions & 3 deletions tiup/tiup-playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ tiup playground [version] [flags]

如果直接执行 `tiup playground` 命令,则 TiUP playground 会使用本地安装的 TiDB/TiKV/PD 组件或者安装这些组件的稳定版本,来启动一个由 1 个 TiKV、1 个 TiDB、1 个 PD 和 1 个 TiFlash 实例构成的集群。该命令实际做了以下事情:

- 因为该命令没有指定 playground 的版本,TiUP 会先查找已安装的 playground 的最新版本,假设已安装的 playground 最新版为 v1.7.0,则该命令相当于 tiup playground:v1.7.0
- 因为该命令没有指定 playground 的版本,TiUP 会先查找已安装的 playground 的最新版本,假设已安装的 playground 最新版为 v1.9.0,则该命令相当于 tiup playground:v1.9.0
- 如果 playground 从未安装过任何版本的 TiDB/TiKV/PD 组件,TiUP 会先安装这些组件的最新稳定版,然后再启动运行这些组件的实例
- 因为该命令没有指定 TiDB/PD/TiKV 各组件的版本,默认情况下,它会使用各组件的最新发布版本,假设当前为 v5.3.0,则该命令相当于 tiup playground:1.7.0 v5.3.0
- 因为该命令没有指定 TiDB/PD/TiKV 各组件的版本,默认情况下,它会使用各组件的最新发布版本,假设当前为 v5.4.0,则该命令相当于 tiup playground:1.9.0 v5.4.0
- 因为该命令也没有指定各组件的个数,默认情况下,它会启动由 1 个 TiDB、1 个 TiKV、1 个 PD 和 1 个 TiFlash 实例构成的最小化集群
- 在依次启动完各个 TiDB 组件后,playground 会提醒集群启动成功,并告诉你一些有用的信息,譬如如何通过 MySQL 客户端连接集群、如何访问 [TiDB Dashboard](/dashboard/dashboard-intro.md)

Expand Down Expand Up @@ -111,7 +111,7 @@ tiup playground --db.binpath /xx/tidb-server
{{< copyable "shell-regular" >}}

```shell
tiup playground v5.3.0 --db 3 --pd 3 --kv 3
tiup playground v5.4.0 --db 3 --pd 3 --kv 3
```

## 快速连接到由 playground 启动的 TiDB 集群
Expand Down
39 changes: 20 additions & 19 deletions upgrade-tidb-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,25 @@ aliases: ['/docs-cn/dev/upgrade-tidb-using-tiup/','/docs-cn/dev/how-to/upgrade/u

本文档适用于以下升级路径:

- 使用 TiUP 从 TiDB 4.0 版本升级至 TiDB 5.3 及后续修订版本。
- 使用 TiUP 从 TiDB 5.0 版本升级至 TiDB 5.3 及后续修订版本。
- 使用 TiUP 从 TiDB 5.1 版本升级至 TiDB 5.3 及后续修订版本。
- 使用 TiUP 从 TiDB 5.2 版本升级至 TiDB 5.3 及后续修订版本。
- 使用 TiUP 从 TiDB 4.0 版本升级至 TiDB 5.4 及后续修订版本。
- 使用 TiUP 从 TiDB 5.0 版本升级至 TiDB 5.4 及后续修订版本。
- 使用 TiUP 从 TiDB 5.1 版本升级至 TiDB 5.4 及后续修订版本。
- 使用 TiUP 从 TiDB 5.2 版本升级至 TiDB 5.4 及后续修订版本。
- 使用 TiUP 从 TiDB 5.3 版本升级至 TiDB 5.4 及后续修订版本。

> **注意:**
>
> 如果原集群是 3.0 或 3.1 或更早的版本,不支持直接升级到 5.3 及后续修订版本。你需要先从早期版本升级到 4.0 后,再从 4.0 升级到 5.3 及后续修订版本。
> 如果原集群是 3.0 或 3.1 或更早的版本,不支持直接升级到 5.4 及后续修订版本。你需要先从早期版本升级到 4.0 后,再从 4.0 升级到 5.4 及后续修订版本。
## 1. 升级兼容性说明

- TiDB 目前暂不支持版本降级或升级后回退。
- 使用 TiDB Ansible 管理的 4.0 版本集群,需要先按照 [4.0 版本文档的说明](https://docs.pingcap.com/zh/tidb/v4.0/upgrade-tidb-using-tiup)将集群导入到 TiUP (`tiup cluster`) 管理后,再按本文档说明升级到 5.3 版本及后续修订版本。
- 若要将 3.0 之前的版本升级至 5.3 版本:
- 使用 TiDB Ansible 管理的 4.0 版本集群,需要先按照 [4.0 版本文档的说明](https://docs.pingcap.com/zh/tidb/v4.0/upgrade-tidb-using-tiup)将集群导入到 TiUP (`tiup cluster`) 管理后,再按本文档说明升级到 5.4 版本及后续修订版本。
- 若要将 3.0 之前的版本升级至 5.4 版本:
1. 首先[通过 TiDB Ansible 升级到 3.0 版本](https://docs.pingcap.com/zh/tidb/v3.0/upgrade-tidb-using-ansible)
2. 然后按照 [4.0 版本文档的说明](https://docs.pingcap.com/zh/tidb/v4.0/upgrade-tidb-using-tiup),使用 TiUP (`tiup cluster`) 将 TiDB Ansible 配置导入。
3. 将集群升级至 4.0 版本。
4. 按本文档说明将集群升级到 5.3 版本。
4. 按本文档说明将集群升级到 5.4 版本。
- 支持 TiDB Binlog,TiCDC,TiFlash 等组件版本的升级。
- 具体不同版本的兼容性说明,请查看各个版本的 [Release Note](/releases/release-notes.md)。请根据各个版本的 Release Note 的兼容性更改调整集群的配置。

Expand All @@ -45,7 +46,7 @@ aliases: ['/docs-cn/dev/upgrade-tidb-using-tiup/','/docs-cn/dev/how-to/upgrade/u
>
> 如果原集群中控机不能访问 `https://tiup-mirrors.pingcap.com` 地址,可跳到步骤 2.2 使用离线升级方式。
1. 先升级 TiUP 版本(建议 `tiup` 版本不低于 `1.7.0`):
1. 先升级 TiUP 版本(建议 `tiup` 版本不低于 `1.9.0`):

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

Expand All @@ -54,7 +55,7 @@ aliases: ['/docs-cn/dev/upgrade-tidb-using-tiup/','/docs-cn/dev/how-to/upgrade/u
tiup --version
```

2. 再升级 TiUP Cluster 版本(建议 `tiup cluster` 版本不低于 `1.7.0`):
2. 再升级 TiUP Cluster 版本(建议 `tiup cluster` 版本不低于 `1.9.0`):

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

Expand Down Expand Up @@ -96,7 +97,7 @@ tiup update cluster
> 以下情况可跳过此步骤:
>
> - 原集群没有修改过配置参数,或通过 tiup cluster 修改过参数但不需要调整。
> - 升级后对未修改过的配置项希望使用 `5.3` 默认参数。
> - 升级后对未修改过的配置项希望使用 `5.4` 默认参数。

1. 进入拓扑文件的 `vi` 编辑模式:

Expand All @@ -112,9 +113,9 @@ tiup update cluster

> **注意:**
>
> 升级到 5.3 版本前,请确认已在 4.0 修改的参数在 5.3 版本中是兼容的,可参考 [TiKV 配置文件描述](/tikv-configuration-file.md)。
> 升级到 5.4 版本前,请确认已在 4.0 修改的参数在 5.4 版本中是兼容的,可参考 [TiKV 配置文件描述](/tikv-configuration-file.md)。
>
> 以下 TiKV 参数在 TiDB v5.3 已废弃。如果在原集群配置过以下参数,需要通过 `edit-config` 编辑模式删除这些参数:
> 以下 TiKV 参数在 TiDB v5.0 已废弃。如果在原集群配置过以下参数,需要通过 `edit-config` 编辑模式删除这些参数:
>
> - pessimistic-txn.enabled
> - server.request-batch-enable-cross-command
Expand Down Expand Up @@ -148,12 +149,12 @@ tiup cluster check <cluster-name> --cluster
tiup cluster upgrade <cluster-name> <version>
```

以升级到 5.3.0 版本为例:
以升级到 5.4.0 版本为例:

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

```
tiup cluster upgrade <cluster-name> v5.3.0
tiup cluster upgrade <cluster-name> v5.4.0
```
> **注意:**
Expand Down Expand Up @@ -201,7 +202,7 @@ tiup cluster display <cluster-name>
```
Cluster type: tidb
Cluster name: <cluster-name>
Cluster version: v5.3.0
Cluster version: v5.4.0
```

> **注意:**
Expand Down Expand Up @@ -251,10 +252,10 @@ tiup cluster upgrade <cluster-name> <version> --force
{{< copyable "" >}}

```
tiup install ctl:v5.3.0
tiup install ctl:v5.4.0
```
## 5. TiDB 5.3 兼容性变化
## 5. TiDB 5.4 兼容性变化
- 兼容性变化请参考 5.3 Release Notes。
- 兼容性变化请参考 5.4 Release Notes。
- 请避免在对使用 TiDB Binlog 的集群进行滚动升级过程中新创建聚簇索引表。

0 comments on commit bd73a2b

Please sign in to comment.