Skip to content

Commit

Permalink
tiup bump version 6.1 (#9735)
Browse files Browse the repository at this point in the history
  • Loading branch information
qqqdan authored Jun 9, 2022
1 parent 04dd00f commit 48ca808
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 58 deletions.
12 changes: 6 additions & 6 deletions production-deployment-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ aliases: ['/docs-cn/dev/production-offline-deployment-using-tiup/', '/zh/tidb/de

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

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

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

```bash
tiup mirror clone tiup-custom-mirror-v1.9.3 --tiup v1.9.3 --cluster v1.9.3
tiup mirror clone tiup-custom-mirror-v1.10.0 --tiup v1.10.0 --cluster v1.10.0
```

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

```bash
tiup mirror merge tiup-custom-mirror-v1.9.3
tiup mirror merge tiup-custom-mirror-v1.10.0
```

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

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

Expand Down Expand Up @@ -350,13 +350,13 @@ alertmanager_servers:
{{< copyable "shell-regular" >}}

```shell
tiup cluster deploy tidb-test v6.0.0 ./topology.yaml --user root [-p] [-i /home/root/.ssh/gcp_rsa]
tiup cluster deploy tidb-test v6.1.0 ./topology.yaml --user root [-p] [-i /home/root/.ssh/gcp_rsa]
```

以上部署示例中:

- `tidb-test` 为部署的集群名称。
- `v6.0.0` 为部署的集群版本,可以通过执行 `tiup list tidb` 来查看 TiUP 支持的最新可用版本。
- `v6.1.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 @@ -83,10 +83,10 @@ TiDB 是一个分布式系统。最基础的 TiDB 测试集群通常由 2 个 Ti
{{< copyable "shell-regular" >}}

```shell
tiup playground v6.0.0 --db 2 --pd 3 --kv 3
tiup playground v6.1.0 --db 2 --pd 3 --kv 3
```

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

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

```shell
tiup playground v6.0.0 --db 2 --pd 3 --kv 3
tiup playground v6.1.0 --db 2 --pd 3 --kv 3
```

上述命令会在本地下载并启动某个版本的集群(例如 v6.0.0)。最新版本可以通过执行 `tiup list tidb` 来查看。运行结果将显示集群的访问方式:
上述命令会在本地下载并启动某个版本的集群(例如 v6.1.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 @@ -278,11 +278,11 @@ tiup cluster display <cluster-name>
```

```
Starting /root/.tiup/components/cluster/v1.9.3/cluster display <cluster-name>
Starting /root/.tiup/components/cluster/v1.10.0/cluster display <cluster-name>
TiDB Cluster: <cluster-name>
TiDB Version: v6.0.0
TiDB Version: v6.1.0
ID Role Host Ports Status Data Dir Deploy Dir
Expand Down
36 changes: 18 additions & 18 deletions tiup/tiup-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tiup cluster
```

```
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.9.3/cluster
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.10.0/cluster
Deploy a TiDB cluster for production
Usage:
Expand Down Expand Up @@ -111,20 +111,20 @@ tidb_servers:
...
```

假如我们想要使用 TiDB 的 v6.0.0 版本,集群名字为 `prod-cluster`,则执行以下命令:
假如我们想要使用 TiDB 的 v6.1.0 版本,集群名字为 `prod-cluster`,则执行以下命令:

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

```shell
tiup cluster deploy -p prod-cluster v6.0.0 /tmp/topology.yaml
tiup cluster deploy -p prod-cluster v6.1.0 /tmp/topology.yaml
```

执行过程中会再次确认拓扑结构并提示输入目标机器上的 root 密码(-p 表示使用密码):

```bash
Please confirm your topology:
TiDB Cluster: prod-cluster
TiDB Version: v6.0.0
TiDB Version: v6.1.0
Type Host Ports Directories
---- ---- ----- -----------
pd 172.16.5.134 2379/2380 deploy/pd-2379,data/pd-2379
Expand Down Expand Up @@ -161,10 +161,10 @@ tiup cluster list
```

```
Starting /root/.tiup/components/cluster/v1.9.3/cluster list
Starting /root/.tiup/components/cluster/v1.10.0/cluster list
Name User Version Path PrivateKey
---- ---- ------- ---- ----------
prod-cluster tidb v6.0.0 /root/.tiup/storage/cluster/clusters/prod-cluster /root/.tiup/storage/cluster/clusters/prod-cluster/ssh/id_rsa
prod-cluster tidb v6.1.0 /root/.tiup/storage/cluster/clusters/prod-cluster /root/.tiup/storage/cluster/clusters/prod-cluster/ssh/id_rsa
```

## 启动集群
Expand All @@ -190,9 +190,9 @@ tiup cluster display prod-cluster
```

```
Starting /root/.tiup/components/cluster/v1.9.3/cluster display prod-cluster
Starting /root/.tiup/components/cluster/v1.10.0/cluster display prod-cluster
TiDB Cluster: prod-cluster
TiDB Version: v6.0.0
TiDB Version: v6.1.0
ID Role Host Ports Status Data Dir Deploy Dir
-- ---- ---- ----- ------ -------- ----------
172.16.5.134:3000 grafana 172.16.5.134 3000 Up - deploy/grafana-3000
Expand Down Expand Up @@ -255,9 +255,9 @@ tiup cluster display prod-cluster
```

```
Starting /root/.tiup/components/cluster/v1.9.3/cluster display prod-cluster
Starting /root/.tiup/components/cluster/v1.10.0/cluster display prod-cluster
TiDB Cluster: prod-cluster
TiDB Version: v6.0.0
TiDB Version: v6.1.0
ID Role Host Ports Status Data Dir Deploy Dir
-- ---- ---- ----- ------ -------- ----------
172.16.5.134:3000 grafana 172.16.5.134 3000 Up - deploy/grafana-3000
Expand Down Expand Up @@ -354,12 +354,12 @@ Global Flags:
-y, --yes 跳过所有的确认步骤
```

例如,把集群升级到 v6.0.0 的命令为:
例如,把集群升级到 v6.1.0 的命令为:

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

```bash
tiup cluster upgrade tidb-test v6.0.0
tiup cluster upgrade tidb-test v6.1.0
```

## 更新配置
Expand Down Expand Up @@ -536,14 +536,14 @@ tiup cluster audit
```

```
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.9.3/cluster audit
Starting component `cluster`: /home/tidb/.tiup/components/cluster/v1.10.0/cluster audit
ID Time Command
-- ---- -------
4BLhr0 2022-03-01T13:25:09+08:00 /home/tidb/.tiup/components/cluster/v1.9.3/cluster deploy test v6.0.0 /tmp/topology.yaml
4BKWjF 2022-02-28T23:36:57+08:00 /home/tidb/.tiup/components/cluster/v1.9.3/cluster deploy test v6.0.0 /tmp/topology.yaml
4BKVwH 2022-02-28T23:02:08+08:00 /home/tidb/.tiup/components/cluster/v1.9.3/cluster deploy test v6.0.0 /tmp/topology.yaml
4BKKH1 2022-02-28T16:39:04+08:00 /home/tidb/.tiup/components/cluster/v1.9.3/cluster destroy test
4BKKDx 2022-02-28T16:36:57+08:00 /home/tidb/.tiup/components/cluster/v1.9.3/cluster deploy test v6.0.0 /tmp/topology.yaml
4BLhr0 2022-06-10T13:25:09+08:00 /home/tidb/.tiup/components/cluster/v1.10.0/cluster deploy test v6.1.0 /tmp/topology.yaml
4BKWjF 2022-06-08T23:36:57+08:00 /home/tidb/.tiup/components/cluster/v1.10.0/cluster deploy test v6.1.0 /tmp/topology.yaml
4BKVwH 2022-06-08T23:02:08+08:00 /home/tidb/.tiup/components/cluster/v1.10.0/cluster deploy test v6.1.0 /tmp/topology.yaml
4BKKH1 2022-06-08T16:39:04+08:00 /home/tidb/.tiup/components/cluster/v1.10.0/cluster destroy test
4BKKDx 2022-06-08T16:36:57+08:00 /home/tidb/.tiup/components/cluster/v1.10.0/cluster deploy test v6.1.0 /tmp/topology.yaml
```

第一列为 audit-id,如果想看某个命令的执行日志,则传入这个 audit-id:
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 集群版本号,如 `v6.0.0`
- `<version>` 为要部署的 TiDB 集群版本号,如 `v6.1.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 安装 v6.0.0 版本的 TiKV
示例三:使用 TiUP 安装 v6.1.0 版本的 TiKV

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

```shell
tiup install tikv:v6.0.0
tiup install tikv:v6.1.0
```

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

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

示例一:运行 v6.0.0 版本的 TiDB
示例一:运行 v6.1.0 版本的 TiDB

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

```shell
tiup tidb:v6.0.0
tiup tidb:v6.1.0
```

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

示例一:卸载 v6.0.0 版本的 TiDB
示例一:卸载 v6.1.0 版本的 TiDB

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

```shell
tiup uninstall tidb:v6.0.0
tiup uninstall tidb:v6.1.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 的 v6.0.0 版本,则执行 `tiup mirror clone <target-dir> --tidb v6.0.0`
- 只想克隆 TiDB 的 v6.0.0 版本,以及 TiKV 的所有版本,则执行 `tiup mirror clone <target-dir> --tidb v6.0.0 --tikv all`
- 克隆一个集群的所有组件的 v6.0.0 版本,则执行 `tiup mirror clone <target-dir> v6.0.0`
- 只想克隆 TiDB 的 v6.1.0 版本,则执行 `tiup mirror clone <target-dir> --tidb v6.1.0`
- 只想克隆 TiDB 的 v6.1.0 版本,以及 TiKV 的所有版本,则执行 `tiup mirror clone <target-dir> --tidb v6.1.0 --tikv all`
- 克隆一个集群的所有组件的 v6.1.0 版本,则执行 `tiup mirror clone <target-dir> v6.1.0`

## 使用示例

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

Expand Down
33 changes: 17 additions & 16 deletions upgrade-tidb-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ aliases: ['/docs-cn/dev/upgrade-tidb-using-tiup/','/docs-cn/dev/how-to/upgrade/u

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

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

> **警告:**
>
Expand All @@ -18,17 +19,17 @@ aliases: ['/docs-cn/dev/upgrade-tidb-using-tiup/','/docs-cn/dev/how-to/upgrade/u
> **注意:**
>
> 如果原集群是 3.0 或 3.1 或更早的版本,不支持直接升级到 6.0 及后续修订版本。你需要先从早期版本升级到 4.0 后,再从 4.0 升级到 6.0 及后续修订版本。
> 如果原集群是 3.0 或 3.1 或更早的版本,不支持直接升级到 6.1.0 及后续修订版本。你需要先从早期版本升级到 4.0 后,再从 4.0 升级到 6.1.0 及后续修订版本。
## 1. 升级兼容性说明

- TiDB 目前暂不支持版本降级或升级后回退。
- 使用 TiDB Ansible 管理的 4.0 版本集群,需要先按照 [4.0 版本文档的说明](https://docs.pingcap.com/zh/tidb/v4.0/upgrade-tidb-using-tiup)将集群导入到 TiUP (`tiup cluster`) 管理后,再按本文档说明升级到 6.0 版本及后续修订版本。
- 若要将 3.0 之前的版本升级至 6.0 版本:
- 使用 TiDB Ansible 管理的 4.0 版本集群,需要先按照 [4.0 版本文档的说明](https://docs.pingcap.com/zh/tidb/v4.0/upgrade-tidb-using-tiup)将集群导入到 TiUP (`tiup cluster`) 管理后,再按本文档说明升级到 6.1.0 版本及后续修订版本。
- 若要将 3.0 之前的版本升级至 6.1.0 版本:
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. 按本文档说明将集群升级到 6.0 版本。
4. 按本文档说明将集群升级到 6.1.0 版本。
- 支持 TiDB Binlog,TiCDC,TiFlash 等组件版本的升级。
- 具体不同版本的兼容性说明,请查看各个版本的 [Release Note](/releases/release-notes.md)。请根据各个版本的 Release Note 的兼容性更改调整集群的配置。
- 升级 v5.3 之前版本的集群到 v5.3 及后续版本时,默认部署的 Prometheus 会从 v2.8.1 升级到 v2.27.1,v2.27.1 提供更多的功能并解决了安全风险。Prometheus v2.27.1 相对于 v2.8.1 存在 Alert 时间格式变化,详情见 [Prometheus commit](https://github.com/prometheus/prometheus/commit/7646cbca328278585be15fa615e22f2a50b47d06)
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` 地址,可跳过本步骤,然后[更新 TiUP 离线镜像](#更新-tiup-离线镜像)
1. 先升级 TiUP 版本(建议 `tiup` 版本不低于 `1.9.3`):
1. 先升级 TiUP 版本(建议 `tiup` 版本不低于 `1.10.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.9.3`):
2. 再升级 TiUP Cluster 版本(建议 `tiup cluster` 版本不低于 `1.10.0`):

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

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

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

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

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

以升级到 6.0.0 版本为例:
以升级到 6.1.0 版本为例:

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

```
tiup cluster upgrade <cluster-name> v6.0.0
tiup cluster upgrade <cluster-name> v6.1.0
```
> **注意:**
Expand Down Expand Up @@ -202,7 +203,7 @@ tiup cluster display <cluster-name>
```
Cluster type: tidb
Cluster name: <cluster-name>
Cluster version: v6.0.0
Cluster version: v6.1.0
```

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

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

0 comments on commit 48ca808

Please sign in to comment.