Skip to content

Commit

Permalink
update deploy document to v4.0.0 (#3416) (#3424)
Browse files Browse the repository at this point in the history
  • Loading branch information
sre-bot authored Jun 1, 2020
1 parent add9da3 commit 2aebd2c
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
25 changes: 14 additions & 11 deletions post-installation-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ mysql -u root -h 10.0.1.4 -P 4000
{{< copyable "sql" >}}

```sql
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 5.7.25-TiDB-v4.0.0-beta-446-g5268094af TiDB Server (Apache License 2.0), MySQL 5.7 compatible
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.25-TiDB-v4.0.0 TiDB Server (Apache License 2.0) Community Edition, MySQL 5.7 compatible

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
```
Expand All @@ -74,17 +78,16 @@ mysql -u root -h 10.0.1.4 -P 4000

```sql
*************************** 1. row ***************************
tidb_version(): Release Version: v4.0.0-beta-446-g5268094af
Git Commit Hash: 5268094afe05c7efef0d91d2deeec428cc85abe6
Git Branch: master
UTC Build Time: 2020-03-17 02:22:07
GoVersion: go1.13
tidb_version(): Release Version: v4.0.0
Edition: Community
Git Commit Hash: 689a6b6439ae7835947fcaccf329a3fc303986cb
Git Branch: HEAD
UTC Build Time: 2020-05-28 11:09:45
GoVersion: go1.13.4
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false
1 row in set (0.00 sec)
MySQL [tidb]> create database pingcap;
Query OK, 0 rows affected (0.10 sec)
```

+ 创建 PingCAP database
Expand Down
12 changes: 6 additions & 6 deletions production-deployment-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ aliases: ['/docs-cn/stable/how-to/deploy/orchestrated/tiup/']
{{< copyable "shell-regular" >}}

```shell
tiup update cluster
tiup update --self && tiup update cluster
```

预期输出 `“Update successfully!` 字样。
Expand Down Expand Up @@ -114,13 +114,13 @@ aliases: ['/docs-cn/stable/how-to/deploy/orchestrated/tiup/']
{{< copyable "shell-regular" >}}

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

以上部署命令中:

- 通过 TiUP cluster 部署的集群名称为 `tidb-test`
- 部署版本为 `v4.0.0-rc.2`,其他版本可以执行 `tiup list tidb --refresh` 来查看 TiUP 支持的版本
- 部署版本为 `v4.0.0`,最新版本可以通过执行 `tiup list tidb --refresh` 来查看 TiUP 支持的版本
- 初始化配置文件为 `topology.yaml`
- --user root:通过 root 用户登录到目标主机完成集群部署,该用户需要有 ssh 到目标机器的权限,并且在目标机器有 sudo 权限。也可以用其他有 ssh 和 sudo 权限的用户完成部署。
- [-i] 及 [-p]:非必选项,如果已经配置免密登陆目标机,则不需填写。否则选择其一即可,[-i] 为可登录到部署机的 root 用户(或 --user 指定的其他用户)的私钥,也可使用 [-p] 交互式输入该用户的密码
Expand All @@ -135,13 +135,13 @@ tiup cluster deploy tidb-test v4.0.0-rc.2 ./topology.yaml --user root [-p] [-i /
tiup cluster list
```

预期输出当前通过 TiUP cluster 管理的集群名称、部署用户、版本、密钥信息等:
TiUP 支持管理多个 TiDB 集群,该命令会输出当前通过 TiUP cluster 管理的所有集群信息,包括集群名称、部署用户、版本、密钥信息等:

```log
Starting /home/tidb/.tiup/components/cluster/v0.4.3/cluster list
Starting /home/tidb/.tiup/components/cluster/v1.0.0/cluster list
Name User Version Path PrivateKey
---- ---- ------- ---- ----------
tidb-test tidb v4.0.0-rc.2 /home/tidb/.tiup/storage/cluster/clusters/tidb-test /home/tidb/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa
tidb-test tidb v4.0.0 /home/tidb/.tiup/storage/cluster/clusters/tidb-test /home/tidb/.tiup/storage/cluster/clusters/tidb-test/ssh/id_rsa
```

### 第 6 步:检查部署的 TiDB 集群情况
Expand Down
8 changes: 4 additions & 4 deletions production-offline-deployment-using-tiup.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ category: how-to

## 2. 使用 TiUP 拉取镜像

以 tidb 用户在隔离的环境中安装一个 v4.0.0-rc.1 的 TiDB 集群为例,可以执行以下步骤:
以 tidb 用户在隔离的环境中安装一个 v4.0.0 的 TiDB 集群为例,可以执行以下步骤:

1. 在一台和外网相通的机器上拉取需要的组件:

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

```bash
tiup mirrors package --os=linux v4.0.0-rc.1
tiup mirrors package --os=linux v4.0.0
```

该命令会在当前目录下创建一个名叫 `package` 的目录,里面有启动一个集群必要的组件包。
Expand Down Expand Up @@ -230,14 +230,14 @@ alertmanager_servers:

```bash
export TIUP_MIRRORS=/path/to/mirror &&
tiup cluster deploy tidb-test v4.0.0-rc topology.yaml --user tidb [-p] [-i /home/root/.ssh/gcp_rsa] &&
tiup cluster deploy tidb-test v4.0.0 topology.yaml --user tidb [-p] [-i /home/root/.ssh/gcp_rsa] &&
tiup cluster start tidb-test
```

> **参数说明:**
>
> - 通过 TiUP cluster 部署的集群名称为 `tidb-test`
> - 部署版本为 `v4.0.0-rc.1`,其他版本可以参考[如何查看 TiUP 支持管理的 TiDB 版本](#如何查看-tiup-支持管理的-tidb-版本)的介绍
> - 部署版本为 `v4.0.0`,其他版本可以执行 `tiup list tidb --refresh` 获取
> - 初始化配置文件为 `topology.yaml`
> - --user tidb:通过 tidb 用户登录到目标主机完成集群部署,该用户需要有 ssh 到目标机器的权限,并且在目标机器有 sudo 权限。也可以用其他有 ssh 和 sudo 权限的用户完成部署。
> - [-i] 及 [-p]:非必选项,如果已经配置免密登陆目标机,则不需填写。否则选择其一即可,[-i] 为可登录到部署机 root 用户(或 --user 指定的其他用户)的私钥,也可使用 [-p] 交互式输入该用户的密码
Expand Down
2 changes: 1 addition & 1 deletion ticdc/troubleshoot-ticdc.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ aliases: ['/docs-cn/stable/reference/tools/ticdc/troubleshoot/']

## `gc-ttl` 和文件排序

最新版本(v4.0.0-rc.1 之后)的 PD 支持外部服务设置服务级别 GC safepoint。任何一个服务可以注册更新自己服务的 GC safepoint。PD 会保证任何小于该 GC safepoint 的 KV 数据不会在 TiKV 中被 GC 清理掉。在 TiCDC 中启用了这一功能,用来保证 TiCDC 在不可用、或同步任务中断情况下,可以在 TiKV 内保留 TiCDC 需要消费的数据不被 GC 清理掉。
从 TiDB v4.0.0-rc.1 版本起,PD 支持外部服务设置服务级别 GC safepoint。任何一个服务可以注册更新自己服务的 GC safepoint。PD 会保证任何小于该 GC safepoint 的 KV 数据不会在 TiKV 中被 GC 清理掉。在 TiCDC 中启用了这一功能,用来保证 TiCDC 在不可用、或同步任务中断情况下,可以在 TiKV 内保留 TiCDC 需要消费的数据不被 GC 清理掉。

启动 CDC server 时可以通过 `gc-ttl` 指定 GC safepoint 的 TTL,这个值的含义是当 TiCDC 服务全部挂掉后,由 TiCDC 在 PD 所设置的 GC safepoint 保存的最长时间,该值默认为 86400 秒。

Expand Down

0 comments on commit 2aebd2c

Please sign in to comment.