add tiup-cluster-topology-reference.md#5314
Conversation
|
/label needs-cherry-pick-4.0 |
|
|
||
| `pd_servers` specifies the machines on which PD services are deployed. It also specifies the service configuration on each machine. `pd_servers` is an array, and each element of the array contains the following fields: | ||
|
|
||
| - `host`: Specifies the machine on which the PD services are deploy. The field value is the IP address and cannot be omitted. |
There was a problem hiding this comment.
| - `host`: Specifies the machine on which the PD services are deploy. The field value is the IP address and cannot be omitted. | |
| - `host`: Specifies the machine on which the PD services are deployed. The field value is the IP address and cannot be omitted. |
|
/cc @Joyinqin @ran-huang |
ran-huang
left a comment
There was a problem hiding this comment.
Reviewed all lines above L380.
Just minor edits. Good job!
|
|
||
| To deploy or scale TiDB using TiUP, you need to provide a topology file ([sample](https://github.com/pingcap/tiup/blob/master/embed/templates/examples/topology.example.yaml)) to describe the cluster topology. | ||
|
|
||
| Similarly, to modify the cluster topology, you need to modify the topology file. The difference is that you can only modify a part of the fields in the topology file. This document introduces each section of the topology file and each field in each section. |
There was a problem hiding this comment.
| Similarly, to modify the cluster topology, you need to modify the topology file. The difference is that you can only modify a part of the fields in the topology file. This document introduces each section of the topology file and each field in each section. | |
| Similarly, to modify the cluster topology, you need to modify the topology file. The difference is that you can modify only a part of the fields in the topology file. This document introduces each section of the topology file and each field in each section. |
|
|
||
| A topology configuration file for TiDB deployment using TiUP might contains the following sections: | ||
|
|
||
| - [global](/tiup/tiup-cluster-topology-reference.md#global): The cluster's global configuration. Some of the configuration items use the default values and you can configure them separately in each instance. |
There was a problem hiding this comment.
| - [global](/tiup/tiup-cluster-topology-reference.md#global): The cluster's global configuration. Some of the configuration items use the default values and you can configure them separately in each instance. | |
| - [global](#global): The cluster's global configuration. Some of the configuration items use the default values and you can configure them separately in each instance. |
As I recall, self-referencing only needs an anchor name without a file name.
|
|
||
| - If `global.deploy_dir` is a relative path, the component is deployed to the `/home/<global.user>/<global.deploy_dir>/<instance.deploy_dir>` directory. | ||
|
|
||
| - `data_dir`: The data directory. Default value: "data". Its application rules are as follows: |
There was a problem hiding this comment.
| - `data_dir`: The data directory. Default value: "data". Its application rules are as follows: | |
| - `data_dir`: The data directory. Default value: `"data"`. Its application rules are as follows: |
|
|
||
| - If `data_dir` is a relative path, the component data is placed in `<deploy_dir>/<data_dir>`. For the calculation rules of `<deploy_dir>`, see the application rules of the `deploy_dir` field. | ||
|
|
||
| - `log_dir`: The data directory. Default value: "log". Its application rules are as follows: |
There was a problem hiding this comment.
| - `log_dir`: The data directory. Default value: "log". Its application rules are as follows: | |
| - `log_dir`: The data directory. Default value: `"log"`. Its application rules are as follows: |
|
|
||
| - `arch`: The CPU architecture of the target machine. This field determines the binary package of which platform is pushed to the target machine. Value options are `amd64` (default) and `arm64`. | ||
|
|
||
| - `resource_control`: Runtime resource control. All configurations in this field are written into the service file of systemd. There is no limit by default. The resources that support control are as follows: |
There was a problem hiding this comment.
| - `resource_control`: Runtime resource control. All configurations in this field are written into the service file of systemd. There is no limit by default. The resources that support control are as follows: | |
| - `resource_control`: Runtime resource control. All configurations in this field are written into the service file of systemd. There is no limit by default. The resources that can be controled are as follows: |
| blackbox_exporter_port: 9115 | ||
| ``` | ||
|
|
||
| The above configuration specifies that `node_exporter` uses the `9100` port and `blackbox_exporter` uses the `9115` port. |
There was a problem hiding this comment.
Please enclose other node_exporter in this doc with `.
|
|
||
| ### `server_configs` | ||
|
|
||
| `server_configs` is used to configure services and to generate configuration files for each component, which is similar to the `global` section. The configuration of this section can be overwritten in a specific instance. `server_configs`mainly includes the following fields: |
There was a problem hiding this comment.
| `server_configs` is used to configure services and to generate configuration files for each component, which is similar to the `global` section. The configuration of this section can be overwritten in a specific instance. `server_configs`mainly includes the following fields: | |
| `server_configs` is used to configure services and to generate configuration files for each component, which is similar to the `global` section. The configuration of this section can be overwritten in a specific instance. `server_configs` mainly includes the following fields: |
|
|
||
| - `config`: The configuration rule of this field is the same as the `pd` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `pd` content in `server_configs` (if the two fields overlap, the content of this field takes effect). Then, a configuration file is generated and sent to the machine specified in `host`. | ||
|
|
||
| - `os`: The operating system of the machine specified in`host`. If this field is not specified, the default value is the `os` value in `global`. |
There was a problem hiding this comment.
| - `os`: The operating system of the machine specified in`host`. If this field is not specified, the default value is the `os` value in `global`. | |
| - `os`: The operating system of the machine specified in `host`. If this field is not specified, the default value is the `os` value in `global`. |
|
|
||
| - `port`: The listening port of the TiKV services. The default value is `20160`. | ||
|
|
||
| - `status_port`: The listening port of the TiDB status service. The default value is `20180`. |
There was a problem hiding this comment.
| - `status_port`: The listening port of the TiDB status service. The default value is `20180`. | |
| - `status_port`: The listening port of the TiKV status service. The default value is `20180`. |
|
|
||
| - `config`: The configuration rule of this field is the same as the `tikv` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `tikv` content in `server_configs` (if the two fields overlap, the content of this field takes effect). Then, a configuration file is generated and sent to the machine specified in `host`. | ||
|
|
||
| - `os`: The operating system of the machine specified in`host`. If this field is not specified, the default value is the `os` value in `global`. |
There was a problem hiding this comment.
| - `os`: The operating system of the machine specified in`host`. If this field is not specified, the default value is the `os` value in `global`. | |
| - `os`: The operating system of the machine specified in `host`. If this field is not specified, the default value is the `os` value in `global`. |
| - `arch` | ||
| - `os` | ||
|
|
||
| A `pump_servers` configuration example: |
There was a problem hiding this comment.
| A `pump_servers` configuration example: | |
| A `pump_servers` configuration example is as follows: |
| - `arch` | ||
| - `os` | ||
|
|
||
| A `drainer_servers` configuration example: |
|
|
||
| - `java_home`: Specifies the path in which the JRE environment to be used is located. This parameter corresponds to the `JAVA_HOME` system environment variable. | ||
|
|
||
| - `spark_config`: Used to configure the TiSpark services. Then, a configuration file is generated and sent to the machine specified in `host`. |
There was a problem hiding this comment.
| - `spark_config`: Used to configure the TiSpark services. Then, a configuration file is generated and sent to the machine specified in `host`. | |
| - `spark_config`: Configures the TiSpark services. Then, a configuration file is generated and sent to the machine specified in `host`. |
| - `arch` | ||
| - `os` | ||
|
|
||
| A `tispark_masters` configuration example: |
|
|
||
| - `deploy_dir`: Specifies the deployment directory. If it is not specified or specified as a relative directory, the directory is generated according to the `deploy_dir` directory configured in `global`. | ||
|
|
||
| - `java_home`: Specifies the path in which the JRE environment to be used is located. This parameter corresponds to the `JAVA_HOME` system environment variable. |
There was a problem hiding this comment.
| - `java_home`: Specifies the path in which the JRE environment to be used is located. This parameter corresponds to the `JAVA_HOME` system environment variable. | |
| - `java_home`: Specifies the path of the JRE environment to be used. This parameter corresponds to the `JAVA_HOME` system environment variable. |
| > + For the `*.json` files in the local dashboards directory, update the value of the `datasource` field to the new cluster name (because `datasource` is named after the cluster name). | ||
| > + Execute the `tiup cluster reload -R grafana` command. |
There was a problem hiding this comment.
| > + For the `*.json` files in the local dashboards directory, update the value of the `datasource` field to the new cluster name (because `datasource` is named after the cluster name). | |
| > + Execute the `tiup cluster reload -R grafana` command. | |
| > 1. For the `*.json` files in the local dashboards directory, update the value of the `datasource` field to the new cluster name (because `datasource` is named after the cluster name). | |
| > 2. Execute the `tiup cluster reload -R grafana` command. |
| - `arch` | ||
| - `os` | ||
|
|
||
| A `grafana_servers` configuration example: |
|
|
||
| - `numa_node`: Allocates the NUMA policy to the instance. If this parameter is specified, you need to ensure that the target machine has [numactl](https://linux.die.net/man/8/numactl) installed. If this parameter is specified, cpubind and membind policies are allocated via [numactl](https://linux.die.net/man/8/numactl). This parameter field is the string type. The field value is the ID of the NUMA node, such as "0,1". | ||
|
|
||
| - `config_file`: This field specifies a local file that is transferred to the target machine during the initialization phase of the cluster configuration as the configuration of Alertmanager. |
There was a problem hiding this comment.
| - `config_file`: This field specifies a local file that is transferred to the target machine during the initialization phase of the cluster configuration as the configuration of Alertmanager. | |
| - `config_file`: Specifies a local file that is transferred to the target machine during the initialization phase of the cluster configuration as the configuration of Alertmanager. |
| - `arch` | ||
| - `os` | ||
|
|
||
| A `alertmanager_servers` configuration example: |
|
|
||
| `tispark_masters` specifies the machines on which the master node of TiSpark is deployed. It also specifies the service configuration on each machine. `tispark_masters` is an array. Each array element contains the following fields: | ||
|
|
||
| - `host`: Specifies the machine on which the TiSpark master is deploy. The field value is the IP address and cannot be omitted. |
There was a problem hiding this comment.
| - `host`: Specifies the machine on which the TiSpark master is deploy. The field value is the IP address and cannot be omitted. | |
| - `host`: Specifies the machine on which the TiSpark master is deployed. The field value is the IP address and cannot be omitted. |
|
@Joyinqin @ran-huang @qiancai All comments are addressed. PTAL again, thanks! |
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by writing |
|
/lgtm |
Co-authored-by: Grace Cai <qqzczy@126.com>
|
Rest LGTM |
|
|
||
| - If `log_dir` is a relative path, the component log is placed in `<deploy_dir>/<log_dir>`. For the calculation rules of `<deploy_dir>`, see the application rules of the `deploy_dir` field. | ||
|
|
||
| - `os`: The operating system of the target machine. This field determines the components applicable to which system are pushed to the target machine. Its default value is `linux`. |
There was a problem hiding this comment.
| - `os`: The operating system of the target machine. This field determines the components applicable to which system are pushed to the target machine. Its default value is `linux`. | |
| - `os`: The operating system of the target machine. The field controls which operating system to adapt to for the components pushed to the target machine. The default value is "linux". |
|
|
||
| - `os`: The operating system of the target machine. This field determines the components applicable to which system are pushed to the target machine. Its default value is `linux`. | ||
|
|
||
| - `arch`: The CPU architecture of the target machine. This field determines the binary package of which platform is pushed to the target machine. Value options are `amd64` (default) and `arm64`. |
There was a problem hiding this comment.
| - `arch`: The CPU architecture of the target machine. This field determines the binary package of which platform is pushed to the target machine. Value options are `amd64` (default) and `arm64`. | |
| - `arch`: The CPU architecture of the target machine. The field controls which platform to adapt to for the binary packages pushed to the target machine. The supported values are "amd64" and "arm64". The default value is "amd64". |
|
|
||
| - `cpu_quota`: Limits the maximum CPU usage at runtime. For example, "200%". | ||
|
|
||
| - `io_read_bandwidth_max`: The maximum I/O bandwidth for disk reads. For example, `"/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 100M"`. |
There was a problem hiding this comment.
| - `io_read_bandwidth_max`: The maximum I/O bandwidth for disk reads. For example, `"/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 100M"`. | |
| - `io_read_bandwidth_max`: Limits the maximum I/O bandwidth for disk reads. For example, `"/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 100M"`. |
|
|
||
| - `io_read_bandwidth_max`: The maximum I/O bandwidth for disk reads. For example, `"/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 100M"`. | ||
|
|
||
| - `io_write_bandwidth_max`: The maximum I/O bandwidth for disk writes. For example, `/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 100M`. |
There was a problem hiding this comment.
| - `io_write_bandwidth_max`: The maximum I/O bandwidth for disk writes. For example, `/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 100M`. | |
| - `io_write_bandwidth_max`: Limits the maximum I/O bandwidth for disk writes. For example, `/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 100M`. |
|
|
||
| ### `server_configs` | ||
|
|
||
| `server_configs` is used to configure services and to generate configuration files for each component, which is similar to the `global` section. The configuration of this section can be overwritten in a specific instance. `server_configs` mainly includes the following fields: |
There was a problem hiding this comment.
| `server_configs` is used to configure services and to generate configuration files for each component, which is similar to the `global` section. The configuration of this section can be overwritten in a specific instance. `server_configs` mainly includes the following fields: | |
| `server_configs` is used to configure services and to generate configuration files for each component. Similar to the `global` section, the configuration of this section can be overwritten by the configurations with the same names in an instance. `server_configs` mainly includes the following fields: |
|
|
||
| `pd_servers` specifies the machines to which PD services are deployed. It also specifies the service configuration on each machine. `pd_servers` is an array, and each element of the array contains the following fields: | ||
|
|
||
| - `host`: Specifies the machine to which the PD services are deployed. The field value is the IP address and cannot be omitted. |
There was a problem hiding this comment.
| - `host`: Specifies the machine to which the PD services are deployed. The field value is the IP address and cannot be omitted. | |
| - `host`: Specifies the machine to which the PD services are deployed. The field value is an IP address and is mandatory. |
|
|
||
| - `listen_host`: When the machine has multiple IP addresses, `listen_host` specifies the listening IP address of the service. The default value is `0.0.0.0`. | ||
|
|
||
| - `ssh_port`: The SSH port used when connecting to the target machine for operations. If it is not specified, the `ssh_port` of the `global` section is used. |
There was a problem hiding this comment.
| - `ssh_port`: The SSH port used when connecting to the target machine for operations. If it is not specified, the `ssh_port` of the `global` section is used. | |
| - `ssh_port`: Specifies the SSH port to connect to the target machine for operations. If it is not specified, the `ssh_port` of the `global` section is used. |
|
|
||
| - `log_dir`: Specifies the log directory. If it is not specified or specified as a relative directory, the log is generated according to the `log_dir` directory configured in `global`. | ||
|
|
||
| - `numa_node`: Allocates the NUMA policy to the instance. If this parameter is specified, you need to ensure that the target machine has [numactl](https://linux.die.net/man/8/numactl) installed. When this parameter is specified, cpubind and membind policies are allocated via [numactl](https://linux.die.net/man/8/numactl). This parameter field is the string type. The field value is the ID of the NUMA node, such as "0,1". |
There was a problem hiding this comment.
| - `numa_node`: Allocates the NUMA policy to the instance. If this parameter is specified, you need to ensure that the target machine has [numactl](https://linux.die.net/man/8/numactl) installed. When this parameter is specified, cpubind and membind policies are allocated via [numactl](https://linux.die.net/man/8/numactl). This parameter field is the string type. The field value is the ID of the NUMA node, such as "0,1". | |
| - `numa_node`: Allocates the NUMA policy to the instance. Before specifying this field, you need to make sure that the target machine has [numactl](https://linux.die.net/man/8/numactl) installed. If this field is specified, cpubind and membind policies are allocated using [numactl](https://linux.die.net/man/8/numactl). This field is the string type. The field value is the ID of the NUMA node, such as "0,1". |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 00273f8 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-4.0 in PR #5355 |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
cherry pick to release-5.0 in PR #5356 |
What is changed, added or deleted? (Required)
add tiup-cluster-topology-reference.md
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?