From 00a35cff10313182d9982ef670630f852e7c4934 Mon Sep 17 00:00:00 2001 From: superlzs0476 Date: Wed, 8 Apr 2020 21:46:53 +0800 Subject: [PATCH 01/14] add module of deploy topology configuration for Tiflash --- how-to/deploy/orchestrated/tiup.md | 81 ++++++++++++++++++++---------- 1 file changed, 54 insertions(+), 27 deletions(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index c16ec8552f1d..15fe4406c885 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -5,7 +5,7 @@ category: how-to # 使用 TiUP 部署 TiDB 集群 -[TiUP](https://github.com/pingcap-incubator/tiup-cluster) 是通过 Golang 编写的 TiDB 运维工具,TiUP cluster 是 TiUP 提供的集群管理组件,通过 TiUP cluster 组件就可以进行日常的运维工作,包括部署、启动、关闭、销毁、弹性扩缩容、升级 TiDB 集群;管理 TiDB 集群参数;部署 TiDB Binlog;部署 TiFlash 等。 +[TiUP](https://github.com/pingcap-incubator/tiup) 是 TiDB 4.0 版本引入的集群运维工具,[TiUP cluster](https://github.com/pingcap-incubator/tiup-cluster) 是 TiUP 提供的使用 Golang 编写的集群管理组件,通过 TiUP cluster 组件就可以进行日常的运维工作,包括部署、启动、关闭、销毁、弹性扩缩容、升级 TiDB 集群;管理 TiDB 集群参数;部署 TiDB Binlog;部署 TiFlash 等。 本文介绍了使用 TiUP 部署 TiDB 集群的流程,具体步骤如下: @@ -310,15 +310,20 @@ category: how-to |实例 | 个数 | 物理机配置 | IP |配置 | | :-- | :-- | :-- | :-- | :-- | -| TiKV | 3 | 16 Vcore 32GB * 1 | 10.0.1.1
10.0.1.2
10.0.1.3 | 默认端口
全局目录配置 | -| TiDB |3 | 16 Vcore 32GB * 1 | 10.0.1.7
10.0.1.8
10.0.1.9 | 默认端口
全局目录配置 | -| PD | 3 |4 Vcore 8GB * 1 |10.0.1.4
10.0.1.5
10.0.1.6 | 默认端口
全局目录配置 | +| TiKV | 3 | 16 VCore 32GB * 1 | 10.0.1.1
10.0.1.2
10.0.1.3 | 默认端口
全局目录配置 | +| TiDB |3 | 16 VCore 32GB * 1 | 10.0.1.7
10.0.1.8
10.0.1.9 | 默认端口
全局目录配置 | +| PD | 3 | 4 VCore 8GB * 1 |10.0.1.4
10.0.1.5
10.0.1.6 | 默认端口
全局目录配置 | +| Tiflash | 1 | 32 VCore 64 GB * 1 | 10.0.1.10 | 默认端口
全局目录配置 | #### 第 4 步:配置文件模版 topology.yaml > **注意:** > -> 无需手动创建 tidb 用户,TiUP cluster 组件会在部署主机上自动创建该用户。可以自定义用户,也可以和中控机的用户保持一致。 +> - 无需手动创建 tidb 用户,TiUP cluster 组件会在部署主机上自动创建该用户。可以自定义用户,也可以和中控机的用户保持一致。 +> +> - [部署 Tiflash](https://pingcap.com/docs-cn/dev/reference/tiflash/deploy/) 需要开启 `replication.enable-placement-rules` ,以开启 PD 的 [Placement Rules](https://pingcap.com/docs-cn/dev/how-to/configure/placement-rules/) 功能。 +> +> - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 {{< copyable "shell-regular" >}} @@ -353,7 +358,8 @@ server_configs: schedule.leader-schedule-limit: 4 schedule.region-schedule-limit: 2048 schedule.replica-schedule-limit: 64 - + replication.enable-placement-rules: true + pd_servers: - host: 10.0.1.4 @@ -403,6 +409,9 @@ tikv_servers: # host: host1 - host: 10.0.1.2 - host: 10.0.1.3 +tiflash_servers: + - host: 10.0.1.10 + # data_dir: /data1/tiflash/data,/data2/tiflash/data monitoring_servers: - host: 10.0.1.4 grafana_servers: @@ -415,7 +424,7 @@ alertmanager_servers: #### 部署需求 -部署 TiDB 和 TiKV 组件的物理机为 2 路处理器,每路 16 vcore,内存也达标,为提高物理机资源利用率,可为单机多实例,即 TiDB、TiKV 通过 numa 绑核,隔离 CPU 资源。PD 和 Prometheus 混合部署,但两者的数据目录需要使用独立的文件系统。 +部署 TiDB 和 TiKV 组件的物理机为 2 路处理器,每路 16 VCore,内存也达标,为提高物理机资源利用率,可为单机多实例,即 TiDB、TiKV 通过 numa 绑核,隔离 CPU 资源。PD 和 Prometheus 混合部署,但两者的数据目录需要使用独立的文件系统。 #### 单机多实例部署的关键参数配置 @@ -476,15 +485,21 @@ alertmanager_servers: | 实例 | 个数 | 物理机配置 | IP | 配置 | | :-- | :-- | :-- | :-- | :-- | -| TiKV | 6 | 32 Vcore 64GB * 3 | 10.0.1.1
10.0.1.2
10.0.1.3 | 1. 区分实例级别的 port、status_port;
2. 配置全局参数 readpool、storage 以及 raftstore 参数;
3. 配置实例级别 host 维度的 labels;
4. 配置 numa 绑核操作| -| TiDB | 6 | 32 Vcore 64GB * 3 | 10.0.1.7
10.0.1.8
10.0.1.9 | 配置 numa 绑核操作 | -| PD | 3 | 16 Vcore 32 GB | 10.0.1.4
10.0.1.5
10.0.1.6 | 配置 location_lables 参数 | +| TiKV | 6 | 32 VCore 64GB | 10.0.1.1
10.0.1.2
10.0.1.3 | 1. 区分实例级别的 port、status_port;
2. 配置全局参数 readpool、storage 以及 raftstore 参数;
3. 配置实例级别 host 维度的 labels;
4. 配置 numa 绑核操作| +| TiDB | 6 | 32 VCore 64GB | 10.0.1.7
10.0.1.8
10.0.1.9 | 配置 numa 绑核操作 | +| PD | 3 | 16 VCore 32 GB | 10.0.1.4
10.0.1.5
10.0.1.6 | 配置 location_lables 参数 | +| Tiflash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录 /data1/tiflash/data | #### 第 4 步:配置文件模版 topology.yaml > **注意:** > -> 配置文件模版时,注意修改必要参数、IP、端口及目录。 +> - 配置文件模版时,注意修改必要参数、IP、端口及目录。 +> +> - [部署 Tiflash](https://pingcap.com/docs-cn/dev/reference/tiflash/deploy/) 需要开启 `replication.enable-placement-rules` ,以开启 PD 的 [Placement Rules](https://pingcap.com/docs-cn/dev/how-to/configure/placement-rules/) 功能。 +> +> - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 + {{< copyable "shell-regular" >}} @@ -518,6 +533,7 @@ server_configs: raftstore.capactiy: "<取值参考上文计算公式的结果>" pd: replication.location-labels: ["host"] + replication.enable-placement-rules: true pd_servers: - host: 10.0.1.4 @@ -623,14 +639,15 @@ tikv_servers: config: server.labels: host: tikv3 +tiflash_servers: + - host: 10.0.1.10 + data_dir: /data1/tiflash/data monitoring_servers: - - host: 10.0.1.7 - + - host: 10.0.1.7 grafana_servers: - - host: 10.0.1.7 - + - host: 10.0.1.7 alertmanager_servers: - - host: 10.0.1.7 + - host: 10.0.1.7 ``` ### 场景 3:TiDB Binlog 部署模版 @@ -653,19 +670,24 @@ TiDB 关键参数: #### 拓扑信息 -| 实例 | 物理机配置 | IP | 配置 | -| :-- | :-- | :-- | :-- | -| TiKV | 16 vcore 32 GB * 3 | 10.0.1.1
10.0.1.2
10.0.1.3 | 默认端口配置 | -|TiDB | 16 vcore 32 GB * 3 | 10.0.1.7
10.0.1.8
10.0.1.9 | 默认端口配置;
开启 enable_binlog;
开启 ignore-error | -| PD | 4 vcore 8 GB * 3| 10.0.1.4
10.0.1.5
10.0.1.6 | 默认端口配置 | -| Pump|8 vcore 16GB * 3|10.0.1.6
10.0.1.7
10.0.1.8 | 默认端口配置;
设置 GC 时间 7 天 | -| Drainer | 8 vcore 16GB | 10.0.1.9 | 默认端口配置;
设置默认初始化 commitTS | +| 实例 |个数| 物理机配置 | IP | 配置 | +| :-- | :-- | :-- | :-- | :-- | +| TiKV | 3 | 16 VCore 32 GB | 10.0.1.1
10.0.1.2
10.0.1.3 | 默认端口配置 | +|TiDB | 3 | 16 VCore 32 GB | 10.0.1.7
10.0.1.8
10.0.1.9 | 默认端口配置;
开启 enable_binlog;
开启 ignore-error | +| PD | 3 | 4 VCore 8 GB | 10.0.1.4
10.0.1.5
10.0.1.6 | 默认端口配置 | +| Tiflash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录,通过 /data1/tiflash/data,/data2/tiflash/data 多盘部署 | +| Pump| 3 |8 VCore 16GB |10.0.1.6
10.0.1.7
10.0.1.8 | 默认端口配置;
设置 GC 时间 7 天 | +| Drainer | 1 | 8 VCore 16GB | 10.0.1.9 | 默认端口配置;
设置默认初始化 commitTS | #### 第 4 步:配置文件模版 topology.yaml > **注意:** > -> 配置文件模版时,如无需自定义端口或者目录,仅修改 IP 即可。 +> - 配置文件模版时,如无需自定义端口或者目录,仅修改 IP 即可。 +> +> - [部署 Tiflash](https://pingcap.com/docs-cn/dev/reference/tiflash/deploy/) 需要开启 `replication.enable-placement-rules` ,以开启 PD 的 [Placement Rules](https://pingcap.com/docs-cn/dev/how-to/configure/placement-rules/) 功能。 +> +> - tiflash_servers 实例级别配置 `"-host"` 目前只支持 ip,不支持域名。 {{< copyable "shell-regular" >}} @@ -692,6 +714,8 @@ server_configs: tidb: binlog.enable: true binlog.ignore-error: true + pd: + replication.enable-placement-rules: true pd_servers: - host: 10.0.1.4 @@ -746,12 +770,15 @@ drainer_servers: syncer.to.user: "root" syncer.to.password: "" syncer.to.port: 4000 +tiflash_servers: + - host: 10.0.1.10 + data_dir: /data1/tiflash/data,/data2/tiflash/data monitoring_servers: - - host: 10.0.1.4 + - host: 10.0.1.4 grafana_servers: - - host: 10.0.1.4 + - host: 10.0.1.4 alertmanager_servers: - - host: 10.0.1.4 + - host: 10.0.1.4 ``` ## 三、执行部署命令 From 0460005c6cc888f5d374a70112a076504fe7917f Mon Sep 17 00:00:00 2001 From: yikeke Date: Thu, 9 Apr 2020 11:02:36 +0800 Subject: [PATCH 02/14] fix typo: tomestone -> tombstone --- reference/tiflash/maintain.md | 2 +- reference/tiflash/scale.md | 2 +- releases/2.1.17.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/tiflash/maintain.md b/reference/tiflash/maintain.md index 019f0f43fc14..1c665446454e 100644 --- a/reference/tiflash/maintain.md +++ b/reference/tiflash/maintain.md @@ -53,7 +53,7 @@ category: reference 4. 在 pd-ctl 中输入 `store delete `,其中 为上一步查到的该 TiFlash 节点对应的 store id。 -5. 等待该 TiFlash 节点对应的 store 消失或者 state_name 变成 Tomestone 再关闭 TiFlash 进程。 +5. 等待该 TiFlash 节点对应的 store 消失或者 state_name 变成 Tombstone 再关闭 TiFlash 进程。 > **注意:** > diff --git a/reference/tiflash/scale.md b/reference/tiflash/scale.md index 3ff680e226d0..da445ea584ca 100644 --- a/reference/tiflash/scale.md +++ b/reference/tiflash/scale.md @@ -50,7 +50,7 @@ category: reference 2. 使用 Grafana 或者 pd-ctl 检查节点是否下线成功(下线需要一定时间)。 -3. 等待 TiFlash 对应的 `store` 消失,或者 `state_name` 变成 `Tomestone` 后,执行如下命令关闭 TiFlash 进程: +3. 等待 TiFlash 对应的 `store` 消失,或者 `state_name` 变成 `Tombstone` 后,执行如下命令关闭 TiFlash 进程: {{< copyable "shell-regular" >}} diff --git a/releases/2.1.17.md b/releases/2.1.17.md index 5dd52c509daa..ffb3a69a153f 100644 --- a/releases/2.1.17.md +++ b/releases/2.1.17.md @@ -14,7 +14,7 @@ TiDB Ansible 版本:2.1.17 - 新特性 - TiDB 的 `SHOW TABLE REGIONS` 语法新增 `WHERE` 条件子句 - TiKV、PD 新增 `config-check` 功能,用于配置项检查 - - pd-ctl 新增 `remove-tomestone` 命令,支持清理 tombstone store 记录 + - pd-ctl 新增 `remove-tombstone` 命令,支持清理 tombstone store 记录 - Reparo 新增 `worker-count` 和 `txn-batch` 配置项,用于控制恢复速率 - 改进提升 @@ -73,7 +73,7 @@ TiDB Ansible 版本:2.1.17 ## PD - PD 新增 `config-check` 选项,用于检查 PD 配置项是否合法 [#1725](https://github.com/pingcap/pd/pull/1725) -- pd-ctl 新增 `remove-tomestone` 命令,支持清理 tombstone store 记录 [#1705](https://github.com/pingcap/pd/pull/1705) +- pd-ctl 新增 `remove-tombstone` 命令,支持清理 tombstone store 记录 [#1705](https://github.com/pingcap/pd/pull/1705) - 支持主动下发 Operator,加快调度速度 [#1686](https://github.com/pingcap/pd/pull/1686) ## Tools From 6e4c2c85b79c10cb2e2ceaeb31cfd66a70978917 Mon Sep 17 00:00:00 2001 From: lzs <43946384+superlzs0476@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:37:45 +0800 Subject: [PATCH 03/14] Update how-to/deploy/orchestrated/tiup.md Co-Authored-By: Liangliang Gu --- how-to/deploy/orchestrated/tiup.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 15fe4406c885..2244bda7f053 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -411,7 +411,23 @@ tikv_servers: - host: 10.0.1.3 tiflash_servers: - host: 10.0.1.10 - # data_dir: /data1/tiflash/data,/data2/tiflash/data + # ssh_port: 22 + # tcp_port: 9000 + # http_port: 8123 + # flash_service_port: 3930 + # flash_proxy_port: 20170 + # flash_proxy_status_port: 20292 + # metrics_port: 8234 + # deploy_dir: deploy/tiflash-9000 + # data_dir: deploy/tiflash-9000/data + # log_dir: deploy/tiflash-9000/log + # numa_node: "0,1" + # # Config is used to overwrite the `server_configs.tiflash` values + # config: + # logger: + # level: "info" + # learner_config: + # log-level: "info" monitoring_servers: - host: 10.0.1.4 grafana_servers: From 7e1cfafadb820035c2d5b5841411e14ad1f07a87 Mon Sep 17 00:00:00 2001 From: lzs <43946384+superlzs0476@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:37:59 +0800 Subject: [PATCH 04/14] Update how-to/deploy/orchestrated/tiup.md Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> --- how-to/deploy/orchestrated/tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 2244bda7f053..3688fc3baee0 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -512,7 +512,7 @@ alertmanager_servers: > > - 配置文件模版时,注意修改必要参数、IP、端口及目录。 > -> - [部署 Tiflash](https://pingcap.com/docs-cn/dev/reference/tiflash/deploy/) 需要开启 `replication.enable-placement-rules` ,以开启 PD 的 [Placement Rules](https://pingcap.com/docs-cn/dev/how-to/configure/placement-rules/) 功能。 +> - [部署 Tiflash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 From 27ae77825e2683ed623366f670f8ecf9035c7ff0 Mon Sep 17 00:00:00 2001 From: lzs <43946384+superlzs0476@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:38:14 +0800 Subject: [PATCH 05/14] Update how-to/deploy/orchestrated/tiup.md Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> --- how-to/deploy/orchestrated/tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 3688fc3baee0..0c31cb2aed5f 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -691,7 +691,7 @@ TiDB 关键参数: | TiKV | 3 | 16 VCore 32 GB | 10.0.1.1
10.0.1.2
10.0.1.3 | 默认端口配置 | |TiDB | 3 | 16 VCore 32 GB | 10.0.1.7
10.0.1.8
10.0.1.9 | 默认端口配置;
开启 enable_binlog;
开启 ignore-error | | PD | 3 | 4 VCore 8 GB | 10.0.1.4
10.0.1.5
10.0.1.6 | 默认端口配置 | -| Tiflash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录,通过 /data1/tiflash/data,/data2/tiflash/data 多盘部署 | +| Tiflash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录,配置 data_dir 参数为 `/data1/tiflash/data,/data2/tiflash/data`,进行多盘部署 | | Pump| 3 |8 VCore 16GB |10.0.1.6
10.0.1.7
10.0.1.8 | 默认端口配置;
设置 GC 时间 7 天 | | Drainer | 1 | 8 VCore 16GB | 10.0.1.9 | 默认端口配置;
设置默认初始化 commitTS | From 149eba84a46fca4238af6623ba4b4e446104c260 Mon Sep 17 00:00:00 2001 From: lzs <43946384+superlzs0476@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:38:27 +0800 Subject: [PATCH 06/14] Update how-to/deploy/orchestrated/tiup.md Co-Authored-By: Liangliang Gu --- how-to/deploy/orchestrated/tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 0c31cb2aed5f..793bfc1c87d8 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -321,7 +321,7 @@ category: how-to > > - 无需手动创建 tidb 用户,TiUP cluster 组件会在部署主机上自动创建该用户。可以自定义用户,也可以和中控机的用户保持一致。 > -> - [部署 Tiflash](https://pingcap.com/docs-cn/dev/reference/tiflash/deploy/) 需要开启 `replication.enable-placement-rules` ,以开启 PD 的 [Placement Rules](https://pingcap.com/docs-cn/dev/how-to/configure/placement-rules/) 功能。 +> - [部署 Tiflash](/reference/tiflash/deploy/) 需要开启 `replication.enable-placement-rules` ,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules/) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 From 6c6d14f6699b8b86395fba16f8dfb745130c8d38 Mon Sep 17 00:00:00 2001 From: lzs <43946384+superlzs0476@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:40:51 +0800 Subject: [PATCH 07/14] Update how-to/deploy/orchestrated/tiup.md Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> --- how-to/deploy/orchestrated/tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 793bfc1c87d8..29e5e22c0d41 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -701,7 +701,7 @@ TiDB 关键参数: > > - 配置文件模版时,如无需自定义端口或者目录,仅修改 IP 即可。 > -> - [部署 Tiflash](https://pingcap.com/docs-cn/dev/reference/tiflash/deploy/) 需要开启 `replication.enable-placement-rules` ,以开启 PD 的 [Placement Rules](https://pingcap.com/docs-cn/dev/how-to/configure/placement-rules/) 功能。 +> - [部署 Tiflash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 ip,不支持域名。 From 9505c661fb75670b09f052c0fc3bbfa4b033917e Mon Sep 17 00:00:00 2001 From: lzs <43946384+superlzs0476@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:41:02 +0800 Subject: [PATCH 08/14] Update how-to/deploy/orchestrated/tiup.md Co-Authored-By: Keke Yi <40977455+yikeke@users.noreply.github.com> --- how-to/deploy/orchestrated/tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 29e5e22c0d41..21c135a10694 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -504,7 +504,7 @@ alertmanager_servers: | TiKV | 6 | 32 VCore 64GB | 10.0.1.1
10.0.1.2
10.0.1.3 | 1. 区分实例级别的 port、status_port;
2. 配置全局参数 readpool、storage 以及 raftstore 参数;
3. 配置实例级别 host 维度的 labels;
4. 配置 numa 绑核操作| | TiDB | 6 | 32 VCore 64GB | 10.0.1.7
10.0.1.8
10.0.1.9 | 配置 numa 绑核操作 | | PD | 3 | 16 VCore 32 GB | 10.0.1.4
10.0.1.5
10.0.1.6 | 配置 location_lables 参数 | -| Tiflash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录 /data1/tiflash/data | +| Tiflash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录,配置 data_dir 参数为 `/data1/tiflash/data` | #### 第 4 步:配置文件模版 topology.yaml From 372503dc25ad4f3f0af37af6f33cae7f1ec9c963 Mon Sep 17 00:00:00 2001 From: yikeke Date: Thu, 9 Apr 2020 11:44:04 +0800 Subject: [PATCH 09/14] Revert "fix typo: tomestone -> tombstone" This reverts commit 0460005c6cc888f5d374a70112a076504fe7917f. --- reference/tiflash/maintain.md | 2 +- reference/tiflash/scale.md | 2 +- releases/2.1.17.md | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/tiflash/maintain.md b/reference/tiflash/maintain.md index 1c665446454e..019f0f43fc14 100644 --- a/reference/tiflash/maintain.md +++ b/reference/tiflash/maintain.md @@ -53,7 +53,7 @@ category: reference 4. 在 pd-ctl 中输入 `store delete `,其中 为上一步查到的该 TiFlash 节点对应的 store id。 -5. 等待该 TiFlash 节点对应的 store 消失或者 state_name 变成 Tombstone 再关闭 TiFlash 进程。 +5. 等待该 TiFlash 节点对应的 store 消失或者 state_name 变成 Tomestone 再关闭 TiFlash 进程。 > **注意:** > diff --git a/reference/tiflash/scale.md b/reference/tiflash/scale.md index da445ea584ca..3ff680e226d0 100644 --- a/reference/tiflash/scale.md +++ b/reference/tiflash/scale.md @@ -50,7 +50,7 @@ category: reference 2. 使用 Grafana 或者 pd-ctl 检查节点是否下线成功(下线需要一定时间)。 -3. 等待 TiFlash 对应的 `store` 消失,或者 `state_name` 变成 `Tombstone` 后,执行如下命令关闭 TiFlash 进程: +3. 等待 TiFlash 对应的 `store` 消失,或者 `state_name` 变成 `Tomestone` 后,执行如下命令关闭 TiFlash 进程: {{< copyable "shell-regular" >}} diff --git a/releases/2.1.17.md b/releases/2.1.17.md index ffb3a69a153f..5dd52c509daa 100644 --- a/releases/2.1.17.md +++ b/releases/2.1.17.md @@ -14,7 +14,7 @@ TiDB Ansible 版本:2.1.17 - 新特性 - TiDB 的 `SHOW TABLE REGIONS` 语法新增 `WHERE` 条件子句 - TiKV、PD 新增 `config-check` 功能,用于配置项检查 - - pd-ctl 新增 `remove-tombstone` 命令,支持清理 tombstone store 记录 + - pd-ctl 新增 `remove-tomestone` 命令,支持清理 tombstone store 记录 - Reparo 新增 `worker-count` 和 `txn-batch` 配置项,用于控制恢复速率 - 改进提升 @@ -73,7 +73,7 @@ TiDB Ansible 版本:2.1.17 ## PD - PD 新增 `config-check` 选项,用于检查 PD 配置项是否合法 [#1725](https://github.com/pingcap/pd/pull/1725) -- pd-ctl 新增 `remove-tombstone` 命令,支持清理 tombstone store 记录 [#1705](https://github.com/pingcap/pd/pull/1705) +- pd-ctl 新增 `remove-tomestone` 命令,支持清理 tombstone store 记录 [#1705](https://github.com/pingcap/pd/pull/1705) - 支持主动下发 Operator,加快调度速度 [#1686](https://github.com/pingcap/pd/pull/1686) ## Tools From 0f7d2295a3bf59e56ff54d30e09fc38dd5956ea7 Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:44:56 +0800 Subject: [PATCH 10/14] Update how-to/deploy/orchestrated/tiup.md --- how-to/deploy/orchestrated/tiup.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 21c135a10694..98f0eb48e787 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -321,7 +321,7 @@ category: how-to > > - 无需手动创建 tidb 用户,TiUP cluster 组件会在部署主机上自动创建该用户。可以自定义用户,也可以和中控机的用户保持一致。 > -> - [部署 Tiflash](/reference/tiflash/deploy/) 需要开启 `replication.enable-placement-rules` ,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules/) 功能。 +> - [部署 Tiflash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 From 095e4f23e2c727e6c13a0c2057d4f19e5c3436ef Mon Sep 17 00:00:00 2001 From: Keke Yi <40977455+yikeke@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:58:37 +0800 Subject: [PATCH 11/14] FIX CI --- how-to/deploy/orchestrated/tiup.md | 1 - 1 file changed, 1 deletion(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 98f0eb48e787..aad8c62d81b0 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -516,7 +516,6 @@ alertmanager_servers: > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 - {{< copyable "shell-regular" >}} ```shell From 9bfd345ba509e3b31fe2bb448f4b839d6eda6428 Mon Sep 17 00:00:00 2001 From: superlzs0476 Date: Thu, 9 Apr 2020 12:14:57 +0800 Subject: [PATCH 12/14] add module of deploy topology configuration for Tiflash --- how-to/deploy/orchestrated/tiup.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index aad8c62d81b0..98e28506aeee 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -324,6 +324,8 @@ category: how-to > - [部署 Tiflash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 +> +> - Tiflash 具体的参数配置介绍请见[常见部署问题 Tiflash 参数配置](#常见部署问题)。 {{< copyable "shell-regular" >}} @@ -515,6 +517,8 @@ alertmanager_servers: > - [部署 Tiflash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 +> +> - Tiflash 具体的参数配置介绍请见[常见部署问题 Tiflash 参数配置](#常见部署问题)。 {{< copyable "shell-regular" >}} @@ -703,6 +707,8 @@ TiDB 关键参数: > - [部署 Tiflash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 ip,不支持域名。 +> +> - Tiflash 具体的参数配置介绍请见[常见部署问题 Tiflash 参数配置](#常见部署问题)。 {{< copyable "shell-regular" >}} @@ -1341,6 +1347,22 @@ Destroyed cluster `tidb-test` successfully | 实例 | data_dir | 继承 global 配置 | 数据目录 | | 实例 | log_dir | 继承 global 配置 | 日志目录 | + +### Tiflash 参数 + +| 参数 | 默认配置 | 说明 | +| :-- | :-- | :-- | +| ssh_port | 22 | ssh 默认端口 | +| tcp_port | 9000 | TiFlash TCP 服务端口 | +| http_port | 8123 | TiFlash HTTP 服务端口 | +| flash_service_port | 3930 | TiFlash RAFT 服务 和 Coprocessor 服务端口 | +| flash_proxy_port | 20170 | TiFlash Proxy 服务端口 | +| flash_proxy_status_port | 20292 | Prometheus 拉取 TiFlash Proxy metrics 端口 | +| metrics_port | 8234 | Prometheus 拉取 TiFlash metrics 端口 | +| deploy_dir | /home/tidb/deploy/tiflash-9000 | TiFlash 部署目录 | +| data_dir | /home/tidb/deploy/tiflash-9000/data | TiFlash 数据存储目录 | +| log_dir | /home/tidb/deploy/tiflash-9000/log | TiFlash 日志存储目录 | + ### 参数模块配置(按照从高到低顺序) #### 1. 实例参数模块 From 41065813615484e99ce161931d83f3e139fdf4d5 Mon Sep 17 00:00:00 2001 From: superlzs0476 Date: Thu, 9 Apr 2020 12:53:51 +0800 Subject: [PATCH 13/14] add module of deploy topology configuration for Tiflash --- how-to/deploy/orchestrated/tiup.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index 98e28506aeee..d2ab775dd1db 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -321,11 +321,11 @@ category: how-to > > - 无需手动创建 tidb 用户,TiUP cluster 组件会在部署主机上自动创建该用户。可以自定义用户,也可以和中控机的用户保持一致。 > -> - [部署 Tiflash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 +> - [部署 TiFlash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 > -> - Tiflash 具体的参数配置介绍请见[常见部署问题 Tiflash 参数配置](#常见部署问题)。 +> - TiFlash 具体的参数配置介绍请见[常见部署问题 TiFlash 参数配置](#常见部署问题)。 {{< copyable "shell-regular" >}} @@ -506,7 +506,7 @@ alertmanager_servers: | TiKV | 6 | 32 VCore 64GB | 10.0.1.1
10.0.1.2
10.0.1.3 | 1. 区分实例级别的 port、status_port;
2. 配置全局参数 readpool、storage 以及 raftstore 参数;
3. 配置实例级别 host 维度的 labels;
4. 配置 numa 绑核操作| | TiDB | 6 | 32 VCore 64GB | 10.0.1.7
10.0.1.8
10.0.1.9 | 配置 numa 绑核操作 | | PD | 3 | 16 VCore 32 GB | 10.0.1.4
10.0.1.5
10.0.1.6 | 配置 location_lables 参数 | -| Tiflash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录,配置 data_dir 参数为 `/data1/tiflash/data` | +| TiFlash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录,配置 data_dir 参数为 `/data1/tiflash/data` | #### 第 4 步:配置文件模版 topology.yaml @@ -514,11 +514,11 @@ alertmanager_servers: > > - 配置文件模版时,注意修改必要参数、IP、端口及目录。 > -> - [部署 Tiflash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 +> - [部署 TiFlash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 > -> - Tiflash 具体的参数配置介绍请见[常见部署问题 Tiflash 参数配置](#常见部署问题)。 +> - TiFlash 具体的参数配置介绍请见[常见部署问题 TiFash 参数配置](#常见部署问题)。 {{< copyable "shell-regular" >}} @@ -694,7 +694,7 @@ TiDB 关键参数: | TiKV | 3 | 16 VCore 32 GB | 10.0.1.1
10.0.1.2
10.0.1.3 | 默认端口配置 | |TiDB | 3 | 16 VCore 32 GB | 10.0.1.7
10.0.1.8
10.0.1.9 | 默认端口配置;
开启 enable_binlog;
开启 ignore-error | | PD | 3 | 4 VCore 8 GB | 10.0.1.4
10.0.1.5
10.0.1.6 | 默认端口配置 | -| Tiflash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录,配置 data_dir 参数为 `/data1/tiflash/data,/data2/tiflash/data`,进行多盘部署 | +| TiFlash | 1 | 32 VCore 64 GB | 10.0.1.10 | 默认端口
自定义部署目录,配置 data_dir 参数为 `/data1/tiflash/data,/data2/tiflash/data`,进行多盘部署 | | Pump| 3 |8 VCore 16GB |10.0.1.6
10.0.1.7
10.0.1.8 | 默认端口配置;
设置 GC 时间 7 天 | | Drainer | 1 | 8 VCore 16GB | 10.0.1.9 | 默认端口配置;
设置默认初始化 commitTS | @@ -704,11 +704,11 @@ TiDB 关键参数: > > - 配置文件模版时,如无需自定义端口或者目录,仅修改 IP 即可。 > -> - [部署 Tiflash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 +> - [部署 TiFlash](/reference/tiflash/deploy.md) 需要在 topology.yaml 配置文件中将 `replication.enable-placement-rules` 设置为 `true`,以开启 PD 的 [Placement Rules](/how-to/configure/placement-rules.md) 功能。 > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 ip,不支持域名。 > -> - Tiflash 具体的参数配置介绍请见[常见部署问题 Tiflash 参数配置](#常见部署问题)。 +> - TiFlash 具体的参数配置介绍请见[常见部署问题 TiFlash 参数配置](#常见部署问题)。 {{< copyable "shell-regular" >}} @@ -1348,7 +1348,7 @@ Destroyed cluster `tidb-test` successfully | 实例 | log_dir | 继承 global 配置 | 日志目录 | -### Tiflash 参数 +### TiFlash 参数 | 参数 | 默认配置 | 说明 | | :-- | :-- | :-- | From 99d3dfcdd0d7523116812501fdd7479250a09503 Mon Sep 17 00:00:00 2001 From: yikeke Date: Thu, 9 Apr 2020 14:15:26 +0800 Subject: [PATCH 14/14] refine format and content --- how-to/deploy/orchestrated/tiup.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/how-to/deploy/orchestrated/tiup.md b/how-to/deploy/orchestrated/tiup.md index d2ab775dd1db..f34efaf85dad 100644 --- a/how-to/deploy/orchestrated/tiup.md +++ b/how-to/deploy/orchestrated/tiup.md @@ -313,7 +313,7 @@ category: how-to | TiKV | 3 | 16 VCore 32GB * 1 | 10.0.1.1
10.0.1.2
10.0.1.3 | 默认端口
全局目录配置 | | TiDB |3 | 16 VCore 32GB * 1 | 10.0.1.7
10.0.1.8
10.0.1.9 | 默认端口
全局目录配置 | | PD | 3 | 4 VCore 8GB * 1 |10.0.1.4
10.0.1.5
10.0.1.6 | 默认端口
全局目录配置 | -| Tiflash | 1 | 32 VCore 64 GB * 1 | 10.0.1.10 | 默认端口
全局目录配置 | +| TiFlash | 1 | 32 VCore 64 GB * 1 | 10.0.1.10 | 默认端口
全局目录配置 | #### 第 4 步:配置文件模版 topology.yaml @@ -325,7 +325,7 @@ category: how-to > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 > -> - TiFlash 具体的参数配置介绍请见[常见部署问题 TiFlash 参数配置](#常见部署问题)。 +> - TiFlash 具体的参数配置介绍可参考 [TiFlash 参数配置](#tiflash-参数)。 {{< copyable "shell-regular" >}} @@ -518,7 +518,7 @@ alertmanager_servers: > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 IP,不支持域名。 > -> - TiFlash 具体的参数配置介绍请见[常见部署问题 TiFash 参数配置](#常见部署问题)。 +> - TiFlash 具体的参数配置介绍可参考 [TiFlash 参数配置](#tiflash-参数)。 {{< copyable "shell-regular" >}} @@ -708,7 +708,7 @@ TiDB 关键参数: > > - tiflash_servers 实例级别配置 `"-host"` 目前只支持 ip,不支持域名。 > -> - TiFlash 具体的参数配置介绍请见[常见部署问题 TiFlash 参数配置](#常见部署问题)。 +> - TiFlash 具体的参数配置介绍可参考 [TiFlash 参数配置](#tiflash-参数)。 {{< copyable "shell-regular" >}} @@ -1347,7 +1347,6 @@ Destroyed cluster `tidb-test` successfully | 实例 | data_dir | 继承 global 配置 | 数据目录 | | 实例 | log_dir | 继承 global 配置 | 日志目录 | - ### TiFlash 参数 | 参数 | 默认配置 | 说明 | @@ -1355,7 +1354,7 @@ Destroyed cluster `tidb-test` successfully | ssh_port | 22 | ssh 默认端口 | | tcp_port | 9000 | TiFlash TCP 服务端口 | | http_port | 8123 | TiFlash HTTP 服务端口 | -| flash_service_port | 3930 | TiFlash RAFT 服务 和 Coprocessor 服务端口 | +| flash_service_port | 3930 | TiFlash RAFT 服务和 Coprocessor 服务端口 | | flash_proxy_port | 20170 | TiFlash Proxy 服务端口 | | flash_proxy_status_port | 20292 | Prometheus 拉取 TiFlash Proxy metrics 端口 | | metrics_port | 8234 | Prometheus 拉取 TiFlash metrics 端口 |