From e2a3c844f25d02821ddcd4d38c8bf565aec51a31 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 2 Jun 2020 18:40:16 +0800 Subject: [PATCH 1/8] deploy: fix issues in deployment docs --- geo-distributed-deployment-topology.md | 2 +- hardware-and-software-requirements.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/geo-distributed-deployment-topology.md b/geo-distributed-deployment-topology.md index c80ae04ba0c2..e8d19bbb43f4 100644 --- a/geo-distributed-deployment-topology.md +++ b/geo-distributed-deployment-topology.md @@ -71,7 +71,7 @@ category: how-to replication.max-replicas: 5 ``` -- 拒绝异地机房 TiKV 的 Raft 副本拒绝选举为 leader。 +- 拒绝异地机房 TiKV 的 Raft 副本选举为 Leader。 ```yaml label-property: diff --git a/hardware-and-software-requirements.md b/hardware-and-software-requirements.md index 89464f4a500c..ab1ad4369248 100644 --- a/hardware-and-software-requirements.md +++ b/hardware-and-software-requirements.md @@ -34,7 +34,7 @@ TiDB 作为一款开源分布式 NewSQL 数据库,可以很好的部署和运 > **注意:** > -> 中控机需要[部署 TiUP 软件](/tiup/tiup-cluster.md)完成 TiDB 集群运维管理。 +> 中控机需要[部署 TiUP 软件](/tiup/tiup-documentation-guide.md)完成 TiDB 集群运维管理。 ### 目标主机建议配置软件 From 76a43615cf1462ffda59ec34a7d3fa8001f36231 Mon Sep 17 00:00:00 2001 From: Ran Date: Tue, 2 Jun 2020 18:43:58 +0800 Subject: [PATCH 2/8] Update hardware-and-software-requirements.md Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- hardware-and-software-requirements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware-and-software-requirements.md b/hardware-and-software-requirements.md index ab1ad4369248..3c1d1028ca53 100644 --- a/hardware-and-software-requirements.md +++ b/hardware-and-software-requirements.md @@ -34,7 +34,7 @@ TiDB 作为一款开源分布式 NewSQL 数据库,可以很好的部署和运 > **注意:** > -> 中控机需要[部署 TiUP 软件](/tiup/tiup-documentation-guide.md)完成 TiDB 集群运维管理。 +> 中控机需要部署 [TiUP 软件](/tiup/tiup-documentation-guide.md)来完成 TiDB 集群运维管理。 ### 目标主机建议配置软件 From b347c88b7d7483c146938b02cb36e1c675356a15 Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 3 Jun 2020 16:45:46 +0800 Subject: [PATCH 3/8] rm redundant note --- check-before-deployment.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/check-before-deployment.md b/check-before-deployment.md index e273210b7b8f..6ca68fb62f27 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -12,10 +12,6 @@ category: how-to 生产环境部署,建议使用 EXT4 类型文件系统的 NVME 类型的 SSD 磁盘存储 TiKV 数据文件。这个配置方案为最佳实施方案,其可靠性、安全性、稳定性已经在大量线上场景中得到证实。 -> **注意:** -> -> 推荐 TiKV 部署目标机器的数据目录使用 EXT4 文件系统格式。相比于 XFS 文件系统格式,EXT4 文件系统格式在 TiDB 集群部署案例较多,生产环境优先选择使用 EXT4 文件系统格式。 - 使用 `root` 用户登录目标机器,将部署目标机器数据盘格式化成 ext4 文件系统,挂载时添加 `nodelalloc` 和 `noatime` 挂载参数。`nodelalloc` 是必选参数,否则 TiUP 安装时检测无法通过;`noatime` 是可选建议参数。 > **注意:** From ae567671a59a9c0c8e33877eecfe1a0bc65bb96e Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 3 Jun 2020 16:48:22 +0800 Subject: [PATCH 4/8] fix check-before-deployment --- check-before-deployment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-before-deployment.md b/check-before-deployment.md index 6ca68fb62f27..8e0e2f1a7189 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -296,7 +296,7 @@ TiDB 是一套分布式数据库系统,需要节点间保证时间的同步, ## 安装 numactl 工具 -本段主要介绍如果安装 NUMA 工具。在线上环境中,因为硬件采购机器配置较高,为了更合理规划资源,会考虑单机多实例部署 TiDB 或者 TiKV。NUMA 绑核工具的使用,主要为了防止 CPU 资源的争抢,引发性能衰退。 +本段主要介绍如果安装 NUMA 工具。在线上环境中,因为硬件机器配置往往高于需求,为了更合理规划资源,会考虑单机多实例部署 TiDB 或者 TiKV。NUMA 绑核工具的使用,主要为了防止 CPU 资源的争抢,引发性能衰退。 > **注意:** > From 02004b32fd7bcf1c034bc6a77376acfd35978862 Mon Sep 17 00:00:00 2001 From: Ran Date: Wed, 3 Jun 2020 16:53:51 +0800 Subject: [PATCH 5/8] fix typo --- hybrid-deployment-topology.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hybrid-deployment-topology.md b/hybrid-deployment-topology.md index b475746e43a5..0a9ed8be6032 100644 --- a/hybrid-deployment-topology.md +++ b/hybrid-deployment-topology.md @@ -14,7 +14,7 @@ category: how-to | :-- | :-- | :-- | :-- | :-- | | TiDB | 6 | 32 VCore 64GB | 10.0.1.1
10.0.1.2
10.0.1.3 | 配置 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.7
10.0.1.8
10.0.1.9 | 1. 区分实例级别的 port、status_port;
2. 配置全局参数 readpool、storage 以及 raftstore 参数;
3. 配置实例级别 host 维度的 labels;
4. 配置 numa 绑核操作| +| TiKV | 6 | 32 VCore 64GB | 10.0.1.7
10.0.1.8
10.0.1.9 | 1. 区分实例级别的 port、status_port;
2. 配置全局参数 readpool、storage 以及 raftstore;
3. 配置实例级别 host 维度的 labels;
4. 配置 numa 绑核操作| | Monitoring & Grafana | 1 | 4 VCore 8GB * 1 500GB (ssd) | 10.0.1.10 | 默认配置 | ### 拓扑模版 From 725de1d56ae3e0081c3b51d8b68cd28380912700 Mon Sep 17 00:00:00 2001 From: yikeke Date: Wed, 3 Jun 2020 17:02:18 +0800 Subject: [PATCH 6/8] =?UTF-8?q?add=20an=20anchor;=20refine=20"=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=E5=8F=8A=E5=85=B3=E9=97=AD=E7=9B=AE=E6=A0=87=E9=83=A8?= =?UTF-8?q?=E7=BD=B2=E6=9C=BA=E5=99=A8=E7=9A=84=E9=98=B2=E7=81=AB=E5=A2=99?= =?UTF-8?q?"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check-before-deployment.md | 74 +++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 41 deletions(-) diff --git a/check-before-deployment.md b/check-before-deployment.md index 8e0e2f1a7189..8b5ccd985a50 100644 --- a/check-before-deployment.md +++ b/check-before-deployment.md @@ -122,7 +122,7 @@ sysctl -p ## 检测及关闭目标部署机器的防火墙 -本段介绍如何关闭目标主机防火墙配置,因为在 TiDB 集群中,需要将节点间的访问端口打通才可以保证读写请求、数据心跳等信息的正常的传输。在普遍线上场景中,数据库到业务服务和数据库节点的网络联通都是在安全域内完成数据交互。如果没有特殊安全的要求,建议将目标节点的防火墙进行关闭。否则建议[按照端口使用规则](/hardware-and-software-requirements.md),将端口信息配置到防火墙服务的白名单中。 +本段介绍如何关闭目标主机防火墙配置,因为在 TiDB 集群中,需要将节点间的访问端口打通才可以保证读写请求、数据心跳等信息的正常的传输。在普遍线上场景中,数据库到业务服务和数据库节点的网络联通都是在安全域内完成数据交互。如果没有特殊安全的要求,建议将目标节点的防火墙进行关闭。否则建议[按照端口使用规则](/hardware-and-software-requirements.md#网络要求),将端口信息配置到防火墙服务的白名单中。 1. 检查防火墙状态(以 CentOS Linux release 7.7.1908 (Core) 为例) @@ -161,6 +161,8 @@ sysctl -p TiDB 是一套分布式数据库系统,需要节点间保证时间的同步,从而确保 ACID 模型的事务线性一致性。目前解决授时的普遍方案是采用 NTP 服务,可以通过互联网中的 `pool.ntp.org` 授时服务来保证节点的时间同步,也可以使用离线环境自己搭建的 NTP 服务来解决授时。 +采用如下步骤检查是否安装 NTP 服务以及与 NTP 服务器正常同步: + 1. 执行以下命令,如果输出 `running` 表示 NTP 服务正在运行: {{< copyable "shell-regular" >}} @@ -175,67 +177,57 @@ TiDB 是一套分布式数据库系统,需要节点间保证时间的同步, Active: active (running) since 一 2017-12-18 13:13:19 CST; 3s ago ``` -2. 执行 `ntpstat` 命令,如果输出 `synchronised to NTP server`(正在与 NTP server 同步),表示在正常同步: - - {{< copyable "shell-regular" >}} - - ```bash - ntpstat - ``` - - ``` - synchronised to NTP server (85.199.214.101) at stratum 2 - time correct to within 91 ms - polling server every 1024 s - ``` +2. 执行 `ntpstat` 命令检测是否与 NTP 服务器同步: > **注意:** > > Ubuntu 系统需安装 `ntpstat` 软件包。 -- 以下情况表示 NTP 服务未正常同步: - {{< copyable "shell-regular" >}} ```bash ntpstat ``` - ``` - unsynchronised - ``` + - 如果输出 `synchronised to NTP server`,表示正在与 NTP 服务器正常同步: -- 以下情况表示 NTP 服务未正常运行: + ``` + synchronised to NTP server (85.199.214.101) at stratum 2 + time correct to within 91 ms + polling server every 1024 s + ``` - {{< copyable "shell-regular" >}} + - 以下情况表示 NTP 服务未正常同步: - ```bash - ntpstat - ``` + ``` + unsynchronised + ``` - ``` - Unable to talk to NTP daemon. Is it running? - ``` + - 以下情况表示 NTP 服务未正常运行: -- 如果要使 NTP 服务尽快开始同步,执行以下命令。可以将 `pool.ntp.org` 替换为你的 NTP server: + ``` + Unable to talk to NTP daemon. Is it running? + ``` - {{< copyable "shell-regular" >}} +如果要使 NTP 服务尽快开始同步,执行以下命令。可以将 `pool.ntp.org` 替换为你的 NTP 服务器: - ```bash - sudo systemctl stop ntpd.service && \ - sudo ntpdate pool.ntp.org && \ - sudo systemctl start ntpd.service - ``` +{{< copyable "shell-regular" >}} + +```bash +sudo systemctl stop ntpd.service && \ +sudo ntpdate pool.ntp.org && \ +sudo systemctl start ntpd.service +``` -- 如果要在 CentOS 7 系统上手动安装 NTP 服务,可执行以下命令: +如果要在 CentOS 7 系统上手动安装 NTP 服务,可执行以下命令: - {{< copyable "shell-regular" >}} +{{< copyable "shell-regular" >}} - ```bash - sudo yum install ntp ntpdate && \ - sudo systemctl start ntpd.service && \ - sudo systemctl enable ntpd.service - ``` +```bash +sudo yum install ntp ntpdate && \ +sudo systemctl start ntpd.service && \ +sudo systemctl enable ntpd.service +``` ## 手动配置 SSH 互信及 sudo 免密码 From bef74e6bcef967625f082f4fe20a62d3801ad9e3 Mon Sep 17 00:00:00 2001 From: yikeke Date: Fri, 5 Jun 2020 21:08:59 +0800 Subject: [PATCH 7/8] Update post-installation-check.md --- post-installation-check.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/post-installation-check.md b/post-installation-check.md index 63366e1c38ac..d3dc4f38f986 100644 --- a/post-installation-check.md +++ b/post-installation-check.md @@ -46,25 +46,23 @@ category: how-to mysql -u root -h 10.0.1.4 -P 4000 ``` -### 数据库操作 - -+ 登录成功 +登录成功: - {{< copyable "sql" >}} +```sql +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 - ```sql - 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, 2015, Oracle and/or its affiliates. All rights reserved. - 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. - 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. +``` - Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. - ``` +### 数据库操作 + 检查 TiDB 版本 From 365be5e391bb6f28e3c7417f801f1aac10d97b94 Mon Sep 17 00:00:00 2001 From: yikeke Date: Fri, 5 Jun 2020 21:15:37 +0800 Subject: [PATCH 8/8] Update post-installation-check.md --- post-installation-check.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/post-installation-check.md b/post-installation-check.md index d3dc4f38f986..6caaf2d8719c 100644 --- a/post-installation-check.md +++ b/post-installation-check.md @@ -46,7 +46,7 @@ category: how-to mysql -u root -h 10.0.1.4 -P 4000 ``` -登录成功: +输出下列信息表示登录成功: ```sql Welcome to the MySQL monitor. Commands end with ; or \g.