Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add collapsible topology files #15210

Merged
merged 4 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add collapsible topology files
  • Loading branch information
ran-huang committed Oct 16, 2023
commit 92bc9b9b7eba1bb2eb5b4fa21b59bca2bc885bcd
123 changes: 122 additions & 1 deletion geo-distributed-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,128 @@ aliases: ['/docs-cn/dev/geo-distributed-deployment-topology/']

### 拓扑模版

[跨机房配置模板](https://github.com/pingcap/docs-cn/blob/master/config-templates/geo-redundancy-deployment.yaml)
<details>
<summary>跨机房配置模板</summary>

```yaml
# Tip: PD priority needs to be manually set using the PD-ctl client tool. such as, member Leader_priority PD-name numbers.
# Global variables are applied to all deployments and used as the default value of
# the deployments if a specific deployment value is missing.
#
# Abbreviations used in this example:
# sh: Shanghai Zone
# bj: Beijing Zone
# sha: Shanghai Datacenter A
# bja: Beijing Datacenter A
# bjb: Beijing Datacenter B

global:
user: "tidb"
ssh_port: 22
deploy_dir: "/tidb-deploy"
data_dir: "/tidb-data"
monitored:
node_exporter_port: 9100
blackbox_exporter_port: 9115
deploy_dir: "/tidb-deploy/monitored-9100"
server_configs:
tidb:
log.level: debug
log.slow-query-file: tidb-slow.log
tikv:
server.grpc-compression-type: gzip
readpool.storage.use-unified-pool: true
readpool.storage.low-concurrency: 8
pd:
replication.location-labels: ["zone","dc","rack","host"]
replication.max-replicas: 5
label-property: # TiDB 5.2 及以上版本默认不支持 label-property 配置。若要设置副本策略,请使用 Placement Rules。
reject-leader:
- key: "dc"
value: "sha"
pd_servers:
- host: 10.0.1.6
- host: 10.0.1.7
- host: 10.0.1.8
- host: 10.0.1.9
- host: 10.0.1.10
tidb_servers:
- host: 10.0.1.1
- host: 10.0.1.2
- host: 10.0.1.3
- host: 10.0.1.4
- host: 10.0.1.5
tikv_servers:
- host: 10.0.1.11
ssh_port: 22
port: 20160
status_port: 20180
deploy_dir: "/tidb-deploy/tikv-20160"
data_dir: "/tidb-data/tikv-20160"
config:
server.labels:
zone: bj
dc: bja
rack: rack1
host: host1
- host: 10.0.1.12
ssh_port: 22
port: 20161
status_port: 20181
deploy_dir: "/tidb-deploy/tikv-20161"
data_dir: "/tidb-data/tikv-20161"
config:
server.labels:
zone: bj
dc: bja
rack: rack1
host: host2
- host: 10.0.1.13
ssh_port: 22
port: 20160
status_port: 20180
deploy_dir: "/tidb-deploy/tikv-20160"
data_dir: "/tidb-data/tikv-20160"
config:
server.labels:
zone: bj
dc: bjb
rack: rack1
host: host1
- host: 10.0.1.14
ssh_port: 22
port: 20161
status_port: 20181
deploy_dir: "/tidb-deploy/tikv-20161"
data_dir: "/tidb-data/tikv-20161"
config:
server.labels:
zone: bj
dc: bjb
rack: rack1
host: host2
- host: 10.0.1.15
ssh_port: 22
port: 20160
deploy_dir: "/tidb-deploy/tikv-20160"
data_dir: "/tidb-data/tikv-20160"
config:
server.labels:
zone: sh
dc: sha
rack: rack1
host: host1
readpool.storage.use-unified-pool: true
readpool.storage.low-concurrency: 10
raftstore.raft-min-election-timeout-ticks: 1000
raftstore.raft-max-election-timeout-ticks: 1020
monitoring_servers:
- host: 10.0.1.16
grafana_servers:
- host: 10.0.1.16
```

</details>

以上 TiDB 集群拓扑文件中,详细的配置项说明见[通过 TiUP 部署 TiDB 集群的拓扑文件配置](/tiup/tiup-cluster-topology-reference.md)。

Expand Down
263 changes: 260 additions & 3 deletions hybrid-deployment-topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,266 @@ aliases: ['/docs-cn/dev/hybrid-deployment-topology/']

### 拓扑模版

[简单混部配置模板](https://github.com/pingcap/docs-cn/blob/master/config-templates/simple-multi-instance.yaml)

[详细混部配置模板](https://github.com/pingcap/docs-cn/blob/master/config-templates/complex-multi-instance.yaml)
<details>
<summary>简单混部配置模板</summary>

```yaml
# # Global variables are applied to all deployments and used as the default value of
# # the deployments if a specific deployment value is missing.
global:
user: "tidb"
ssh_port: 22
deploy_dir: "/tidb-deploy"
data_dir: "/tidb-data"

server_configs:
tikv:
readpool.unified.max-thread-count: <The value refers to the calculation formula result of the multi-instance topology document.>
readpool.storage.use-unified-pool: false
readpool.coprocessor.use-unified-pool: true
storage.block-cache.capacity: "<The value refers to the calculation formula result of the multi-instance topology document.>"
raftstore.capacity: "<The value refers to the calculation formula result of the multi-instance topology document.>"
pd:
replication.location-labels: ["host"]

pd_servers:
- host: 10.0.1.4
- host: 10.0.1.5
- host: 10.0.1.6

tidb_servers:
- host: 10.0.1.1
port: 4000
status_port: 10080
numa_node: "0"
- host: 10.0.1.1
port: 4001
status_port: 10081
numa_node: "1"
- host: 10.0.1.2
port: 4000
status_port: 10080
numa_node: "0"
- host: 10.0.1.2
port: 4001
status_port: 10081
numa_node: "1"
- host: 10.0.1.3
port: 4000
status_port: 10080
numa_node: "0"
- host: 10.0.1.3
port: 4001
status_port: 10081
numa_node: "1"

tikv_servers:
- host: 10.0.1.7
port: 20160
status_port: 20180
numa_node: "0"
config:
server.labels: { host: "tikv1" }
- host: 10.0.1.7
port: 20161
status_port: 20181
numa_node: "1"
config:
server.labels: { host: "tikv1" }
- host: 10.0.1.8
port: 20160
status_port: 20180
numa_node: "0"
config:
server.labels: { host: "tikv2" }
- host: 10.0.1.8
port: 20161
status_port: 20181
numa_node: "1"
config:
server.labels: { host: "tikv2" }
- host: 10.0.1.9
port: 20160
status_port: 20180
numa_node: "0"
config:
server.labels: { host: "tikv3" }
- host: 10.0.1.9
port: 20161
status_port: 20181
numa_node: "1"
config:
server.labels: { host: "tikv3" }

monitoring_servers:
- host: 10.0.1.10

grafana_servers:
- host: 10.0.1.10

alertmanager_servers:
- host: 10.0.1.10
```

</details>

<details>
<summary>详细混部配置模板</summary>

```yaml
# # Global variables are applied to all deployments and used as the default value of
# # the deployments if a specific deployment value is missing.
global:
user: "tidb"
ssh_port: 22
deploy_dir: "/tidb-deploy"
data_dir: "/tidb-data"

monitored:
node_exporter_port: 9100
blackbox_exporter_port: 9115
deploy_dir: "/tidb-deploy/monitored-9100"
data_dir: "/tidb-data/monitored-9100"
log_dir: "/tidb-deploy/monitored-9100/log"

server_configs:
tidb:
log.slow-threshold: 300
tikv:
readpool.unified.max-thread-count: <The value refers to the calculation formula result of the multi-instance topology document.>
readpool.storage.use-unified-pool: false
readpool.coprocessor.use-unified-pool: true
storage.block-cache.capacity: "<The value refers to the calculation formula result of the multi-instance topology document.>"
raftstore.capacity: "<The value refers to the calculation formula result of the multi-instance topology document.>"
pd:
replication.location-labels: ["host"]
schedule.leader-schedule-limit: 4
schedule.region-schedule-limit: 2048
schedule.replica-schedule-limit: 64

pd_servers:
- host: 10.0.1.4
- host: 10.0.1.5
- host: 10.0.1.6

tidb_servers:
- host: 10.0.1.1
port: 4000
status_port: 10080
deploy_dir: "/tidb-deploy/tidb-4000"
log_dir: "/tidb-deploy/tidb-4000/log"
numa_node: "0"
- host: 10.0.1.1
port: 4001
status_port: 10081
deploy_dir: "/tidb-deploy/tidb-4001"
log_dir: "/tidb-deploy/tidb-4001/log"
numa_node: "1"
- host: 10.0.1.2
port: 4000
status_port: 10080
deploy_dir: "/tidb-deploy/tidb-4000"
log_dir: "/tidb-deploy/tidb-4000/log"
numa_node: "0"
- host: 10.0.1.2
port: 4001
status_port: 10081
deploy_dir: "/tidb-deploy/tidb-4001"
log_dir: "/tidb-deploy/tidb-4001/log"
numa_node: "1"
- host: 10.0.1.3
port: 4000
status_port: 10080
deploy_dir: "/tidb-deploy/tidb-4000"
log_dir: "/tidb-deploy/tidb-4000/log"
numa_node: "0"
- host: 10.0.1.3
port: 4001
status_port: 10081
deploy_dir: "/tidb-deploy/tidb-4001"
log_dir: "/tidb-deploy/tidb-4001/log"
numa_node: "1"

tikv_servers:
- host: 10.0.1.7
port: 20160
status_port: 20180
deploy_dir: "/tidb-deploy/tikv-20160"
data_dir: "/tidb-data/tikv-20160"
log_dir: "/tidb-deploy/tikv-20160/log"
numa_node: "0"
config:
server.labels: { host: "tikv1" }
- host: 10.0.1.7
port: 20161
status_port: 20181
deploy_dir: "/tidb-deploy/tikv-20161"
data_dir: "/tidb-data/tikv-20161"
log_dir: "/tidb-deploy/tikv-20161/log"
numa_node: "1"
config:
server.labels: { host: "tikv1" }
- host: 10.0.1.8
port: 20160
status_port: 20180
deploy_dir: "/tidb-deploy/tikv-20160"
data_dir: "/tidb-data/tikv-20160"
log_dir: "/tidb-deploy/tikv-20160/log"
numa_node: "0"
config:
server.labels: { host: "tikv2" }
- host: 10.0.1.8
port: 20161
status_port: 20181
deploy_dir: "/tidb-deploy/tikv-20161"
data_dir: "/tidb-data/tikv-20161"
log_dir: "/tidb-deploy/tikv-20161/log"
numa_node: "1"
config:
server.labels: { host: "tikv2" }
- host: 10.0.1.9
port: 20160
status_port: 20180
deploy_dir: "/tidb-deploy/tikv-20160"
data_dir: "/tidb-data/tikv-20160"
log_dir: "/tidb-deploy/tikv-20160/log"
numa_node: "0"
config:
server.labels: { host: "tikv3" }
- host: 10.0.1.9
port: 20161
status_port: 20181
deploy_dir: "/tidb-deploy/tikv-20161"
data_dir: "/tidb-data/tikv-20161"
log_dir: "/tidb-deploy/tikv-20161/log"
numa_node: "1"
config:
server.labels: { host: "tikv3" }

monitoring_servers:
- host: 10.0.1.10
# ssh_port: 22
# port: 9090
# deploy_dir: "/tidb-deploy/prometheus-8249"
# data_dir: "/tidb-data/prometheus-8249"
# log_dir: "/tidb-deploy/prometheus-8249/log"

grafana_servers:
- host: 10.0.1.10
# port: 3000
# deploy_dir: /tidb-deploy/grafana-3000

alertmanager_servers:
- host: 10.0.1.10
# ssh_port: 22
# web_port: 9093
# cluster_port: 9094
# deploy_dir: "/tidb-deploy/alertmanager-9093"
# data_dir: "/tidb-data/alertmanager-9093"
# log_dir: "/tidb-deploy/alertmanager-9093/log"
```

</details>

以上 TiDB 集群拓扑文件中,详细的配置项说明见[通过 TiUP 部署 TiDB 集群的拓扑文件配置](/tiup/tiup-cluster-topology-reference.md)。

Expand Down
Loading
Loading