From f21975031695dc03cc9456aa16d41b951a303d1b Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 13 Apr 2021 17:40:07 +0800 Subject: [PATCH 1/9] add tiup-cluster-topology-reference.md --- tiup/tiup-cluster-topology-reference.md | 769 ++++++++++++++++++++++++ 1 file changed, 769 insertions(+) create mode 100644 tiup/tiup-cluster-topology-reference.md diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md new file mode 100644 index 0000000000000..bd324deaec384 --- /dev/null +++ b/tiup/tiup-cluster-topology-reference.md @@ -0,0 +1,769 @@ +--- +title: Topology Configuration File for TiDB Deployment Using TiUP +--- + +# Topology Configuration File for TiDB Deployment Using TiUP + +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. + +## File structure + +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. +- [monitored](/tiup/tiup-cluster-topology-reference.md#monitored): Configuration for monitoring services, namely, the blackbox_exporter and the node_exporter. On each machine, a node_exporter and a blackbox_exporter are deployed. +- [server_configs](/tiup/tiup-cluster-topology-reference.md#server_configs): Components' global configuration. You can configure each component separately. If an instance has a configuration item with the same name, the instance's configuration item will take effect. +- [pd_servers](/tiup/tiup-cluster-topology-reference.md#pd_servers): The configuration of the PD instance. This configuration specifies the machines on which the PD component is deployed. +- [tidb_servers](/tiup/tiup-cluster-topology-reference.md#tidb_servers): The configuration of the TiDB instance. This configuration specifies the machines on which the TiDB component is deployed. +- [tikv_servers](/tiup/tiup-cluster-topology-reference.md#tikv_servers): The configuration of the TiKV instance. This configuration specifies the machines on which the TiKV component is deployed. +- [tiflash_servers](/tiup/tiup-cluster-topology-reference.md#tiflash_servers): The configuration of the TiFlash instance. This configuration specifies the machines on which the TiFlash component is deployed. +- [pump_servers](/tiup/tiup-cluster-topology-reference.md#pump_servers): The configuration of the Pump instance. This configuration specifies the machines on which the Pump component is deployed. +- [drainer_servers](/tiup/tiup-cluster-topology-reference.md#drainer_servers): The configuration of the Drainer instance. This configuration specifies the machines on which the Drainer component is deployed. +- [cdc_servers](/tiup/tiup-cluster-topology-reference.md#cdc_servers): The configuration of the TiCDC instance. This configuration specifies the machines on which the TiCDC component is deployed. +- [tispark_masters](/tiup/tiup-cluster-topology-reference.md#tispark_masters): The configuration of the TiSpark master instance. This configuration specifies the machines on which the TiSpark master component is deployed. Only one node of TiSpark master can be deployed. +- [tispark_workers](/tiup/tiup-cluster-topology-reference.md#tispark_workers): The configuration of the TiSpark worker instance. This configuration specifies the machines on which the TiSpark worker component is deployed. +- [monitoring_servers](/tiup/tiup-cluster-topology-reference.md#monitoring_servers): Specifies the machines on which Prometheus is deployed. TiUP supports deploying multiple Prometheus instances but only the first instance is used. +- [grafana_servers](/tiup/tiup-cluster-topology-reference.md#grafana_servers): The configuration of the Grafana instance. This configuration specifies the machines on which Grafana is deployed. +- [alertmanager_servers](/tiup/tiup-cluster-topology-reference.md#alertmanager_servers): The configuration of the Alertmanager instance. This configuration specifies the machines on which Alertmanager is deployed. + +### `global` + +The `global` section corresponds to the cluster's global configuration and has the following fields: + +- `user`: The user used to start the deployed cluster. The default value is `"tidb"`. If the user specified in the `` field does not exist on the target machine, this user is automatically created. + +- `group`: The user group to which a user belongs. It is specified when the user is created. The value defaults to that of the `` field. If the specified group does not exist, it is automatically created. + +- `ssh_port`: The SSH port used when connecting to the target machine for operations. The default value is `22`. + +- `enable_tls`: Specifies whether to enable TLS for the cluster. After TLS is enabled, the generated TLS certificate must be used for connections between components or between the client and the component. **Once it is enabled, it cannot be disabled**. The default value is `false`. + +- `deploy_dir`: The deployment directory of each component. The default value is `"deployed"`. Its application rules are as follows: + + - If the absolute path of `deploy_dir` is configured at the instance level, the actual deployment directory is `deploy_dir` configured for the instance. + + - For each instance, if you do not configure `deploy_dir`, its default value is the relative path `-`. + + - If `global.deploy_dir` is an absolute path, the component is deployed to the `/` directory. + + - If `global.deploy_dir` is a relative path, the component is deployed to the `/home///` directory. + +- `data_dir`: The data directory. Default value: "data". Its application rules are as follows: + + - If the absolute path of `data_dir` is configured at the instance level, the actual deployment directory is `data_dir` configured for the instance. + + - For each instance, if you do not configure `data_dir`, its default value is ``. + + - If `data_dir` is a relative path, the component data is placed in `/`. For the calculation rules of ``, see the application rules of the `deploy_dir` field. + +- `log_dir`: The data directory. Default value: "log". Its application rules are as follows: + + - If the absolute path `log_dir` is configured at the instance level, the actual log directory is the `log_dir` configured for the instance. + + - For each instance, if you not configure `log_dir`, its default value is ``. + + - If `log_dir` is a relative path, the component log is placed in `/`. For the calculation rules of ``, 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`. + +- `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: + + - `memory_limit`: Limits the maximum runtime memory. For example, "2G" means that the maximum memory of 2 GB can be used. + + - `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"`. + + - `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`. + + - `limit_core`: Controls the size of core dump. + +A `global` configuration example: + +```yaml +global: + user: "tidb" + resource_control: + memory_limit: "2G" +``` + +In the above configuration, the `tidb` user is used to start the cluster. At the same time, each component is restricted to a maximum of 2 GB of memory when it is running. + +### `monitored` + +`monitored` is used to configure the monitoring service on the target machine: [node_exporter](https://github.com/prometheus/node_exporter) and [blackbox_exporter](https://github.com/prometheus/blackbox_exporter). The following fields are included: + +- `node_exporter_port`: The service port of node_exporter. The default value is `9100`. + +- `blackbox_exporter_port`: The service port of blackbox_exporter. The default value is `9115`. + +- `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`. + +- `data_dir`: Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated according to the `data_dir` directory configured in `global`. + +- `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`. + +A `monitored` configuration example: + +```yaml +monitored: + node_exporter_port: 9100 + blackbox_exporter_port: 9115 +``` + +The above configuration specifies that `node_exporter` uses the `9100` port and `blackbox_exporter` uses the `9115` port. + +### `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: + +- `tidb`: TiDB service-related configuration. For the complete configuration, see [TiDB configuration file](/tidb-configuration-file.md). + +- `tikv`: TiKV service-related configuration. For the complete configuration, see [TiKV configuration file](/tikv-configuration-file.md). + +- `pd`: PD service-related configuration. For the complete configuration, see [PD configuration file](/pd-configuration-file.md). + +- `tiflash`: TiFlash service-related configuration. For the complete configuration, see [TiFlash configuration file](/tiflash-configuration-file.md). + +- `tiflash_learner`: Each TiFlash node has a special built-in TiKV. This configuration item is used to configure this special TiKV. It is generally not recommended to modify the content under this configuration item. + +- `pump`: Pump service-related configuration. For the complete configuration, see [TiDB Binlog configuration file](/tidb-binlog-configuration-file.md#pump). + +- `drainer`: Drainer service-related configuration. For the complete configuration, see [TiDB Binlog configuration file](/tidb-binlog-configuration-file.md#drainer). + +- `cdc`: TiCDC service-related configuration. For the complete configuration, see [Deploy TiCDC](/ticdc/deploy-ticdc.md). + +A `server_configs` configuration example: + +```yaml +server_configs: + tidb: + run-ddl: true + lease: "45s" + split-table: true + token-limit: 1000 + tikv: + log-level: "info" + readpool.unified.min-thread-count: 1 +``` + +The above configuration specifies the global configuration of TiDB and TiKV. + +### `pd_servers` + +`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. + +- `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. + +- `name`: Specifies the name of the PD instance. Different instances must have unique names; otherwise, instances cannot be deployed. + +- `client_port`: Specifies the port that PD uses to connect to the client. The default value is `2379`. + +- `peer_port`: Specifies the port for communication between PDs. The default value is `2380`. + +- `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`. + +- `data_dir`: Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated according to the `data_dir` directory configured in `global`. + +- `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". + +- `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`. + +- `arch`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `listen_host` +- `name` +- `client_port` +- `peer_port` +- `deploy_dir` +- `data_dir` +- `log_dir` +- `arch` +- `os` + +A `pd_servers` configuration example: + +```yaml +pd_servers: + - host: 10.0.1.11 + config: + schedule.max-merge-region-size: 20 + schedule.max-merge-region-keys: 200000 + - host: 10.0.1.12 +``` + +The above configuration specifies that PD will be deployed on `10.0.1.11` and `10.0.1.12`, and makes specific configurations for the PD of `10.0.1.11`. + +### `tidb_servers` + +`tidb_servers` specifies the machines on which TiDB services are deployed. It also specifies the service configuration on each machine. `tidb_servers` is an array, and each element of the array contains the following fields: + +- `host`: Specifies the machine on which the TiDB services are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `port`: The listening port of TiDB services, which is used to provide connection to the MySQL client. The default value is `4000`. + +- `status_port`: The listening port of the TiDB status service, which is used to view the status of the TiDB services from the external via HTTP requests. The default value is `10080`. + +- `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`. + +- `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. 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`: The configuration rule of this field is the same as the `tidb` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `tidb` 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`. + +- `arch`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `listen_host` +- `port` +- `status_port` +- `deploy_dir` +- `log_dir` +- `arch` +- `os` + +A `tidb_servers` configuration example: + +```yaml +tidb_servers: + - host: 10.0.1.14 + config: + log.level: warn + log.slow-query-file: tidb-slow-overwrited.log + - host: 10.0.1.15 +``` + +### `tikv_servers` + +`tikv_servers` specifies the machines on which TiKV services are deployed. It also specifies the service configuration on each machine. `tikv_servers` is an array, and each element of the array contains the following fields: + +- `host`: Specifies the machine on which the TiKV services are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `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`. + +- `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`. + +- `data_dir`: Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated according to the `data_dir` directory configured in `global`. + +- `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. 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`: 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`. + +- `arch`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `listen_host` +- `port` +- `status_port` +- `deploy_dir` +- `data_dir` +- `log_dir` +- `arch` +- `os` + +A `tikv_servers` configuration example: + +```yaml +tikv_servers: + - host: 10.0.1.14 + config: + server.labels: { zone: "zone1", host: "host1" } + - host: 10.0.1.15 + config: + server.labels: { zone: "zone1", host: "host2" } +``` + +### `tiflash_servers` + +`tiflash_servers` specifies the machines on which TiFlash services are deployed. It also specifies the service configuration on each machine. This section is an array, and each element of the array contains the following fields: + +- `host`: Specifies the machine on which the TiFlash services are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `tcp_port`: The port of the TiFlash TCP service. The default value is `9000`. + +- `http_port`: The port of the TiFlash HTTP service. The default value is `8123`. + +- `flash_service_port`: The port via which TiFlash provides services. TiDB reads data from TiFlash via this port. The default value is `3930`. + +- `metrics_port`: TiFlash's status port, which is used to output metric data. The default value is `8234`. + +- `flash_proxy_port`: The port of the built-in TiKV. The default value is `20170`. + +- `flash_proxy_status_port`: The status port of the built-in TiKV. The default value is `20292`. + +- `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`. + +- `data_dir`: Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated according to the `data_dir` directory configured in `global`. TiFlash supports multiple `data_dir` directories separated by commas. + +- `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`. + +- `tmp_path`: The storage path of TiFlash temporary files. The default value is [`path` or the first directory of `storage.latest.dir`] + "/tmp". + +- `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`: The configuration rule of this field is the same as the `tiflash` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `tiflash` 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`. + +- `learner_config`: Each TiFlash node has a special built-in TiKV. This configuration item is used to configure this special TiKV. It is generally not recommended to modify the content under this configuration item. + +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +After the deployment, for the fields above, you can only add directories to `data_dir`; for the fields below, you cannot modified these fields: + +- `host` +- `tcp_port` +- `http_port` +- `flash_service_port` +- `flash_proxy_port` +- `flash_proxy_status_port` +- `metrics_port` +- `deploy_dir` +- `log_dir` +- `tmp_path` +- `arch` +- `os` + +A `tiflash_servers` configuration example: + +```yaml +tiflash_servers: + - host: 10.0.1.21 + - host: 10.0.1.22 +``` + +### `pump_servers` + +`pump_servers` specifies the machines on which the Pump services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `pump_servers` is an array, and each element of the array contains the following fields: + +- `host`: Specifies the machine on which the Pump services are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `port`: The listening port of the Pump services. The default value is `8250`. + +- `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`. + +- `data_dir`: Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated according to the `data_dir` directory configured in `global`. + +- `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. 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`: The configuration rule of this field is the same as the `pump` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `pump` 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`. + +- `arch`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `port` +- `deploy_dir` +- `data_dir` +- `log_dir` +- `arch` +- `os` + +A `pump_servers` configuration example: + +```yaml +pump_servers: + - host: 10.0.1.21 + config: + gc: 7 + - host: 10.0.1.22 +``` + +### `drainer_servers` + +`drainer_servers` specifies the machines on which the Drainer services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `drainer_servers` is an array. Each array element contains the following fields: + +- `host`: Specifies the machine on which the Drainer services are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `port`: The listening port of Drainer services. The default value is `8249`. + +- `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`. + +- `data_dir`: Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated according to the `data_dir` directory configured in `global`. + +- `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`. + +- `commit_ts`: When Drainer starts, it reads the checkpoint. If Drainer cannot read the checkpoint, it uses this field as the replication time point for the initial startup. This field defaults to `-1` (Drainer always gets the latest timestamp from the PD as the commit_ts). + +- `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`: The configuration rule of this field is the same as the `drainer` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `drainer` 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`. + +- `arch`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `port` +- `deploy_dir` +- `data_dir` +- `log_dir` +- `commit_ts` +- `arch` +- `os` + +A `drainer_servers` configuration example: + +```yaml +drainer_servers: + - host: 10.0.1.21 + config: + syncer.db-type: "mysql" + syncer.to.host: "127.0.0.1" + syncer.to.user: "root" + syncer.to.password: "" + syncer.to.port: 3306 + syncer.ignore-table: + - db-name: test + tbl-name: log + - db-name: test + tbl-name: audit +``` + +### `cdc_servers` + +`cdc_servers` specifies the machines on which the TiCDC services are deployed. It also specifies the service configuration on each machine. `cdc_servers` is an array. Each array element contains the following fields: + +- `host`: Specifies the machine on which the TiCDC services are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `port`: The listening port of the TiCDC services. The default value is `8300`. + +- `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`. + +- `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`. + +- `gc-ttl`: The Time To Live (TTL) duration of the service level GC safepoint set by TiCDC in PD, in seconds. The default value is `86400`, which is 24 hours. + +- `tz`: The time zone that the TiCDC services use. TiCDC uses this time zone when internally converting time data types such as timestamp and when replicating data to the downstream. The default value is the local time zone where the process runs. + +- `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`: The field content is merged with the `cdc` 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`. + +- `arch`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `port` +- `deploy_dir` +- `log_dir` +- `gc-ttl` +- `tz` +- `arch` +- `os` + +A `cdc_servers` configuration example: + +```yaml +cdc_servers: + - host: 10.0.1.20 + gc-ttl: 86400 + - host: 10.0.1.21 +``` + +### `tispark_masters` + +`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. + +- `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. + +- `port`: Spark's listening port, used for communication before the node. The default value is `7077`. + +- `web_port`: Spark's web port, which provides web services and the task status. The default value is `8080`. + +- `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. + +- `spark_config`: Used to configure the TiSpark services. Then, a configuration file is generated and sent to the machine specified in `host`. + +- `spark_env`: Configures the environment variables when Spark starts. + +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `listen_host` +- `port` +- `web_port` +- `deploy_dir` +- `arch` +- `os` + +A `tispark_masters` configuration example: + +```yaml +tispark_masters: + - host: 10.0.1.21 + spark_config: + spark.driver.memory: "2g" + spark.eventLog.enabled: "False" + spark.tispark.grpc.framesize: 2147483647 + spark.tispark.grpc.timeout_in_sec: 100 + spark.tispark.meta.reload_period_in_sec: 60 + spark.tispark.request.command.priority: "Low" + spark.tispark.table.scan_concurrency: 256 + spark_env: + SPARK_EXECUTOR_CORES: 5 + SPARK_EXECUTOR_MEMORY: "10g" + SPARK_WORKER_CORES: 5 + SPARK_WORKER_MEMORY: "10g" + - host: 10.0.1.22 +``` + +### `tispark_workers` + +`tispark_workers` specifies the machines on which the worker nodes of TiSpark are deployed. It also specifies the service configuration on each machine. `tispark_workers` is an array. Each array element contains the following fields: + +- `host`: Specifies the machine on which the TiSpark workers are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `port`: Spark's listening port, used for communication before the node. The default value is `7077`. + +- `web_port`: Spark's web port, which provides web services and the task status. The default value is `8080`. + +- `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. + +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `listen_host` +- `port` +- `web_port` +- `deploy_dir` +- `arch` +- `os` + +A `tispark_workers` configuration example: + +```yaml +tispark_workers: + - host: 10.0.1.22 + - host: 10.0.1.23 +``` + +### `monitoring_servers` + +`monitoring_servers` specifies the machines on which the Prometheus services are deployed. It also specifies the service configuration on each machine. `monitoring_servers` is an array. Each array element contains the following fields: + +- `host`: Specifies the machine on which the monitoring services are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `port`: The listening port of the Prometheus services. The default value is `9090`. + +- `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`. + +- `data_dir`: Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated according to the `data_dir` directory configured in `global`. + +- `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. 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". + +- `storage_retention`: The retention time of the Prometheus monitoring data. The default value is "15d". + +- `rule_dir`: This field specifies a local directory that should contain complete `*.rules.yml` files. These files are transferred to the target machine during the initialization phase of the cluster configuration as the rules for Prometheus. + +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `port` +- `deploy_dir` +- `data_dir` +- `log_dir` +- `arch` +- `os` + +A `monitoring_servers` configuration example: + +```yaml +monitoring_servers: + - host: 10.0.1.11 + rule_dir: /local/rule/dir +``` + +### `grafana_servers` + +`grafana_servers` specifies the machines on which the Grafana services are deployed. It also specifies the service configuration on each machine. `grafana_servers` is an array. Each array element contains the following fields: + +- `host`: Specifies the machine on which the Grafana services are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `port`: The listening port of the Grafana services. The default value is `3000`. + +- `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`. + +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `username`: The user name on the Grafana login interface. + +- `password`: The password corresponding to Grafana. + +- `dashboard_dir`: This field specifies a local directory that should contain complete `dashboard(*.json)` files. These files are transferred to the target machine during the initialization phase of the cluster configuration as the dashboards for Grafana. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +> **Note:** +> +> If the `dashboard_dir` field of `grafana_servers` is configured, after executing the `tiup cluster rename` command to rename the cluster, you need to perform the following operations: +> +> + 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. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `port` +- `deploy_dir` +- `arch` +- `os` + +A `grafana_servers` configuration example: + +```yaml +grafana_servers: + - host: 10.0.1.11 + dashboard_dir: /local/dashboard/dir +``` + +### `alertmanager_servers` + +`alertmanager_servers` specifies the machines on which the Alertmanager services are deployed. It also specifies the service configuration on each machine. `alertmanager_servers` is an array. Each array element contains the following fields: + +- `host`: Specifies the machine on which the Alertmanager services are deploy. The field value is the IP address and cannot be omitted. + +- `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. + +- `web_port`: Specifies the port used that Alertmanager uses to provide web services. The default value is `9093`. + +- `cluster_port`: Specifies the communication port between one Alertmanger and other Alertmanager. The default value is `9094`. + +- `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`. + +- `data_dir`: Specifies the data directory. If it is not specified or specified as a relative directory, the directory is generated according to the `data_dir` directory configured in `global`. + +- `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. 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. + +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. + +- `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. + +For the above fields, you cannot modify these configured fields after the deployment: + +- `host` +- `web_port` +- `cluster_port` +- `deploy_dir` +- `data_dir` +- `log_dir` +- `arch` +- `os` + +A `alertmanager_servers` configuration example: + +```yaml +alertmanager_servers: + - host: 10.0.1.11 + config_file: /local/config/file + - host: 10.0.1.12 + config_file: /local/config/file +``` From 47616dabb277a6057655520134be7db16f89617d Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Tue, 13 Apr 2021 17:47:31 +0800 Subject: [PATCH 2/9] fix broken links --- tiup/tiup-cluster-topology-reference.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md index bd324deaec384..951beb08d935d 100644 --- a/tiup/tiup-cluster-topology-reference.md +++ b/tiup/tiup-cluster-topology-reference.md @@ -127,13 +127,13 @@ The above configuration specifies that `node_exporter` uses the `9100` port and - `pd`: PD service-related configuration. For the complete configuration, see [PD configuration file](/pd-configuration-file.md). -- `tiflash`: TiFlash service-related configuration. For the complete configuration, see [TiFlash configuration file](/tiflash-configuration-file.md). +- `tiflash`: TiFlash service-related configuration. For the complete configuration, see [TiFlash configuration file](/tiflash/tiflash-configuration.md). - `tiflash_learner`: Each TiFlash node has a special built-in TiKV. This configuration item is used to configure this special TiKV. It is generally not recommended to modify the content under this configuration item. -- `pump`: Pump service-related configuration. For the complete configuration, see [TiDB Binlog configuration file](/tidb-binlog-configuration-file.md#pump). +- `pump`: Pump service-related configuration. For the complete configuration, see [TiDB Binlog configuration file](/tidb-binlog/tidb-binlog-configuration-file.md#pump). -- `drainer`: Drainer service-related configuration. For the complete configuration, see [TiDB Binlog configuration file](/tidb-binlog-configuration-file.md#drainer). +- `drainer`: Drainer service-related configuration. For the complete configuration, see [TiDB Binlog configuration file](/tidb-binlog/tidb-binlog-configuration-file.md#drainer). - `cdc`: TiCDC service-related configuration. For the complete configuration, see [Deploy TiCDC](/ticdc/deploy-ticdc.md). From 3bf15bd4304172d8cdcdb84e249e0d7d674141ee Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 14 Apr 2021 10:17:42 +0800 Subject: [PATCH 3/9] are deploy --> are deployed --- tiup/tiup-cluster-topology-reference.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md index 951beb08d935d..aacd4697abd8b 100644 --- a/tiup/tiup-cluster-topology-reference.md +++ b/tiup/tiup-cluster-topology-reference.md @@ -157,7 +157,7 @@ The above configuration specifies the global configuration of TiDB and TiKV. `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. +- `host`: Specifies the machine on which the PD services are deployed. The field value is the IP address and cannot be omitted. - `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`. @@ -215,7 +215,7 @@ The above configuration specifies that PD will be deployed on `10.0.1.11` and `1 `tidb_servers` specifies the machines on which TiDB services are deployed. It also specifies the service configuration on each machine. `tidb_servers` is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine on which the TiDB services are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the TiDB services are deployed. The field value is the IP address and cannot be omitted. - `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`. @@ -265,7 +265,7 @@ tidb_servers: `tikv_servers` specifies the machines on which TiKV services are deployed. It also specifies the service configuration on each machine. `tikv_servers` is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine on which the TiKV services are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the TiKV services are deployed. The field value is the IP address and cannot be omitted. - `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`. @@ -319,7 +319,7 @@ tikv_servers: `tiflash_servers` specifies the machines on which TiFlash services are deployed. It also specifies the service configuration on each machine. This section is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine on which the TiFlash services are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the TiFlash services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -382,7 +382,7 @@ tiflash_servers: `pump_servers` specifies the machines on which the Pump services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `pump_servers` is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine on which the Pump services are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the Pump services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -428,7 +428,7 @@ pump_servers: `drainer_servers` specifies the machines on which the Drainer services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `drainer_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the Drainer services are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the Drainer services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -485,7 +485,7 @@ drainer_servers: `cdc_servers` specifies the machines on which the TiCDC services are deployed. It also specifies the service configuration on each machine. `cdc_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the TiCDC services are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the TiCDC services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -590,7 +590,7 @@ tispark_masters: `tispark_workers` specifies the machines on which the worker nodes of TiSpark are deployed. It also specifies the service configuration on each machine. `tispark_workers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the TiSpark workers are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the TiSpark workers are deployed. The field value is the IP address and cannot be omitted. - `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`. @@ -630,7 +630,7 @@ tispark_workers: `monitoring_servers` specifies the machines on which the Prometheus services are deployed. It also specifies the service configuration on each machine. `monitoring_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the monitoring services are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the monitoring services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -676,7 +676,7 @@ monitoring_servers: `grafana_servers` specifies the machines on which the Grafana services are deployed. It also specifies the service configuration on each machine. `grafana_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the Grafana services are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the Grafana services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -723,7 +723,7 @@ grafana_servers: `alertmanager_servers` specifies the machines on which the Alertmanager services are deployed. It also specifies the service configuration on each machine. `alertmanager_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the Alertmanager services are deploy. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine on which the Alertmanager services are deployed. The field value is the IP address and cannot be omitted. - `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. From dea9dd9ed803c568adc32836b8a46890d848535a Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 14 Apr 2021 13:38:37 +0800 Subject: [PATCH 4/9] address comments from ran --- tiup/tiup-cluster-topology-reference.md | 70 ++++++++++++------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md index aacd4697abd8b..334b204cdd97c 100644 --- a/tiup/tiup-cluster-topology-reference.md +++ b/tiup/tiup-cluster-topology-reference.md @@ -6,27 +6,27 @@ title: Topology Configuration File for TiDB Deployment Using TiUP 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. +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. ## File structure 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. -- [monitored](/tiup/tiup-cluster-topology-reference.md#monitored): Configuration for monitoring services, namely, the blackbox_exporter and the node_exporter. On each machine, a node_exporter and a blackbox_exporter are deployed. -- [server_configs](/tiup/tiup-cluster-topology-reference.md#server_configs): Components' global configuration. You can configure each component separately. If an instance has a configuration item with the same name, the instance's configuration item will take effect. -- [pd_servers](/tiup/tiup-cluster-topology-reference.md#pd_servers): The configuration of the PD instance. This configuration specifies the machines on which the PD component is deployed. -- [tidb_servers](/tiup/tiup-cluster-topology-reference.md#tidb_servers): The configuration of the TiDB instance. This configuration specifies the machines on which the TiDB component is deployed. -- [tikv_servers](/tiup/tiup-cluster-topology-reference.md#tikv_servers): The configuration of the TiKV instance. This configuration specifies the machines on which the TiKV component is deployed. -- [tiflash_servers](/tiup/tiup-cluster-topology-reference.md#tiflash_servers): The configuration of the TiFlash instance. This configuration specifies the machines on which the TiFlash component is deployed. -- [pump_servers](/tiup/tiup-cluster-topology-reference.md#pump_servers): The configuration of the Pump instance. This configuration specifies the machines on which the Pump component is deployed. -- [drainer_servers](/tiup/tiup-cluster-topology-reference.md#drainer_servers): The configuration of the Drainer instance. This configuration specifies the machines on which the Drainer component is deployed. -- [cdc_servers](/tiup/tiup-cluster-topology-reference.md#cdc_servers): The configuration of the TiCDC instance. This configuration specifies the machines on which the TiCDC component is deployed. -- [tispark_masters](/tiup/tiup-cluster-topology-reference.md#tispark_masters): The configuration of the TiSpark master instance. This configuration specifies the machines on which the TiSpark master component is deployed. Only one node of TiSpark master can be deployed. -- [tispark_workers](/tiup/tiup-cluster-topology-reference.md#tispark_workers): The configuration of the TiSpark worker instance. This configuration specifies the machines on which the TiSpark worker component is deployed. -- [monitoring_servers](/tiup/tiup-cluster-topology-reference.md#monitoring_servers): Specifies the machines on which Prometheus is deployed. TiUP supports deploying multiple Prometheus instances but only the first instance is used. -- [grafana_servers](/tiup/tiup-cluster-topology-reference.md#grafana_servers): The configuration of the Grafana instance. This configuration specifies the machines on which Grafana is deployed. -- [alertmanager_servers](/tiup/tiup-cluster-topology-reference.md#alertmanager_servers): The configuration of the Alertmanager instance. This configuration specifies the machines on which Alertmanager is deployed. +- [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. +- [monitored](#monitored): Configuration for monitoring services, namely, the blackbox_exporter and the `node_exporter`. On each machine, a `node_exporter` and a `blackbox_exporter` are deployed. +- [server_configs](#server_configs): Components' global configuration. You can configure each component separately. If an instance has a configuration item with the same name, the instance's configuration item will take effect. +- [pd_servers](#pd_servers): The configuration of the PD instance. This configuration specifies the machines on which the PD component is deployed. +- [tidb_servers](#tidb_servers): The configuration of the TiDB instance. This configuration specifies the machines on which the TiDB component is deployed. +- [tikv_servers](#tikv_servers): The configuration of the TiKV instance. This configuration specifies the machines on which the TiKV component is deployed. +- [tiflash_servers](#tiflash_servers): The configuration of the TiFlash instance. This configuration specifies the machines on which the TiFlash component is deployed. +- [pump_servers](#pump_servers): The configuration of the Pump instance. This configuration specifies the machines on which the Pump component is deployed. +- [drainer_servers](#drainer_servers): The configuration of the Drainer instance. This configuration specifies the machines on which the Drainer component is deployed. +- [cdc_servers](#cdc_servers): The configuration of the TiCDC instance. This configuration specifies the machines on which the TiCDC component is deployed. +- [tispark_masters](#tispark_masters): The configuration of the TiSpark master instance. This configuration specifies the machines on which the TiSpark master component is deployed. Only one node of TiSpark master can be deployed. +- [tispark_workers](#tispark_workers): The configuration of the TiSpark worker instance. This configuration specifies the machines on which the TiSpark worker component is deployed. +- [monitoring_servers](#monitoring_servers): Specifies the machines on which Prometheus is deployed. TiUP supports deploying multiple Prometheus instances but only the first instance is used. +- [grafana_servers](#grafana_servers): The configuration of the Grafana instance. This configuration specifies the machines on which Grafana is deployed. +- [alertmanager_servers](#alertmanager_servers): The configuration of the Alertmanager instance. This configuration specifies the machines on which Alertmanager is deployed. ### `global` @@ -50,7 +50,7 @@ The `global` section corresponds to the cluster's global configuration and has t - If `global.deploy_dir` is a relative path, the component is deployed to the `/home///` directory. -- `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 the absolute path of `data_dir` is configured at the instance level, the actual deployment directory is `data_dir` configured for the instance. @@ -58,7 +58,7 @@ The `global` section corresponds to the cluster's global configuration and has t - If `data_dir` is a relative path, the component data is placed in `/`. For the calculation rules of ``, see the application rules of the `deploy_dir` field. -- `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: - If the absolute path `log_dir` is configured at the instance level, the actual log directory is the `log_dir` configured for the instance. @@ -70,7 +70,7 @@ The `global` section corresponds to the cluster's global configuration and has t - `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: +- `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 controlled are as follows: - `memory_limit`: Limits the maximum runtime memory. For example, "2G" means that the maximum memory of 2 GB can be used. @@ -95,11 +95,11 @@ In the above configuration, the `tidb` user is used to start the cluster. At the ### `monitored` -`monitored` is used to configure the monitoring service on the target machine: [node_exporter](https://github.com/prometheus/node_exporter) and [blackbox_exporter](https://github.com/prometheus/blackbox_exporter). The following fields are included: +`monitored` is used to configure the monitoring service on the target machine: [`node_exporter`](https://github.com/prometheus/node_exporter) and [`blackbox_exporter`](https://github.com/prometheus/blackbox_exporter). The following fields are included: -- `node_exporter_port`: The service port of node_exporter. The default value is `9100`. +- `node_exporter_port`: The service port of `node_exporter`. The default value is `9100`. -- `blackbox_exporter_port`: The service port of blackbox_exporter. The default value is `9115`. +- `blackbox_exporter_port`: The service port of `blackbox_exporter`. The default value is `9115`. - `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`. @@ -119,7 +119,7 @@ The above configuration specifies that `node_exporter` uses the `9100` port and ### `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: +`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: - `tidb`: TiDB service-related configuration. For the complete configuration, see [TiDB configuration file](/tidb-configuration-file.md). @@ -179,7 +179,7 @@ The above configuration specifies the global configuration of TiDB and TiKV. - `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`. +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -233,7 +233,7 @@ The above configuration specifies that PD will be deployed on `10.0.1.11` and `1 - `config`: The configuration rule of this field is the same as the `tidb` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `tidb` 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`. +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -273,7 +273,7 @@ tidb_servers: - `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`. +- `status_port`: The listening port of the TiKV status service. The default value is `20180`. - `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`. @@ -285,7 +285,7 @@ tidb_servers: - `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`. +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -349,7 +349,7 @@ tikv_servers: - `learner_config`: Each TiFlash node has a special built-in TiKV. This configuration item is used to configure this special TiKV. It is generally not recommended to modify the content under this configuration item. -- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -398,7 +398,7 @@ tiflash_servers: - `config`: The configuration rule of this field is the same as the `pump` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `pump` 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`. +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -446,7 +446,7 @@ pump_servers: - `config`: The configuration rule of this field is the same as the `drainer` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `drainer` 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`. +- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -551,7 +551,7 @@ cdc_servers: - `spark_env`: Configures the environment variables when Spark starts. -- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -604,7 +604,7 @@ tispark_masters: - `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. -- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -648,7 +648,7 @@ tispark_workers: - `rule_dir`: This field specifies a local directory that should contain complete `*.rules.yml` files. These files are transferred to the target machine during the initialization phase of the cluster configuration as the rules for Prometheus. -- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -684,7 +684,7 @@ monitoring_servers: - `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`. -- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. @@ -741,7 +741,7 @@ grafana_servers: - `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. -- `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`: The architecture of the machine specified in `host`. If this field is not specified, the default value is the `arch` value in `global`. From a2633e50df7c4fb6b10953e49a66628936cdceaf Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 14 Apr 2021 17:18:40 +0800 Subject: [PATCH 5/9] address comments from Joyin --- tiup/tiup-cluster-topology-reference.md | 48 ++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md index 334b204cdd97c..007d3aa3469da 100644 --- a/tiup/tiup-cluster-topology-reference.md +++ b/tiup/tiup-cluster-topology-reference.md @@ -82,7 +82,7 @@ The `global` section corresponds to the cluster's global configuration and has t - `limit_core`: Controls the size of core dump. -A `global` configuration example: +A `global` configuration example is as follows: ```yaml global: @@ -107,7 +107,7 @@ In the above configuration, the `tidb` user is used to start the cluster. At the - `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`. -A `monitored` configuration example: +A `monitored` configuration example is as follows: ```yaml monitored: @@ -137,7 +137,7 @@ The above configuration specifies that `node_exporter` uses the `9100` port and - `cdc`: TiCDC service-related configuration. For the complete configuration, see [Deploy TiCDC](/ticdc/deploy-ticdc.md). -A `server_configs` configuration example: +A `server_configs` configuration example is as follows: ```yaml server_configs: @@ -198,7 +198,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `pd_servers` configuration example: +A `pd_servers` configuration example is as follows: ```yaml pd_servers: @@ -250,7 +250,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `tidb_servers` configuration example: +A `tidb_servers` configuration example is as follows: ```yaml tidb_servers: @@ -303,7 +303,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `tikv_servers` configuration example: +A `tikv_servers` configuration example is as follows: ```yaml tikv_servers: @@ -370,7 +370,7 @@ After the deployment, for the fields above, you can only add directories to `dat - `arch` - `os` -A `tiflash_servers` configuration example: +A `tiflash_servers` configuration example is as follows: ```yaml tiflash_servers: @@ -414,7 +414,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `pump_servers` configuration example: +A `pump_servers` configuration example is as follows: ```yaml pump_servers: @@ -463,7 +463,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `drainer_servers` configuration example: +A `drainer_servers` configuration example is as follows: ```yaml drainer_servers: @@ -520,7 +520,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `cdc_servers` configuration example: +A `cdc_servers` configuration example is as follows: ```yaml cdc_servers: @@ -533,7 +533,7 @@ cdc_servers: `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. +- `host`: Specifies the machine on which the TiSpark master is deployed. The field value is the IP address and cannot be omitted. - `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`. @@ -545,9 +545,9 @@ cdc_servers: - `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. +- `java_home`: Specifies the path of the JRE environment to be used. 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`. +- `spark_config`: Configures to configure the TiSpark services. Then, a configuration file is generated and sent to the machine specified in `host`. - `spark_env`: Configures the environment variables when Spark starts. @@ -565,7 +565,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `tispark_masters` configuration example: +A `tispark_masters` configuration example is as follows: ```yaml tispark_masters: @@ -618,7 +618,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `tispark_workers` configuration example: +A `tispark_workers` configuration example is as follows: ```yaml tispark_workers: @@ -644,9 +644,9 @@ tispark_workers: - `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". -- `storage_retention`: The retention time of the Prometheus monitoring data. The default value is "15d". +- `storage_retention`: The retention time of the Prometheus monitoring data. The default value is `"15d"`. -- `rule_dir`: This field specifies a local directory that should contain complete `*.rules.yml` files. These files are transferred to the target machine during the initialization phase of the cluster configuration as the rules for Prometheus. +- `rule_dir`: Specifies a local directory that should contain complete `*.rules.yml` files. These files are transferred to the target machine during the initialization phase of the cluster configuration as the rules for Prometheus. - `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`. @@ -664,7 +664,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `monitoring_servers` configuration example: +A `monitoring_servers` configuration example is as follows: ```yaml monitoring_servers: @@ -692,7 +692,7 @@ monitoring_servers: - `password`: The password corresponding to Grafana. -- `dashboard_dir`: This field specifies a local directory that should contain complete `dashboard(*.json)` files. These files are transferred to the target machine during the initialization phase of the cluster configuration as the dashboards for Grafana. +- `dashboard_dir`: Specifies a local directory that should contain complete `dashboard(*.json)` files. These files are transferred to the target machine during the initialization phase of the cluster configuration as the dashboards for Grafana. - `resource_control`: Resource control for the service. If this field is configured, the field content is merged with the `resource_control` content in `global` (if the two fields overlap, the content of this field takes effect). Then, a systemd configuration file is generated and sent to the machine specified in `host`. The configuration rules of `resource_control` are the same as the `resource_control` content in `global`. @@ -700,8 +700,8 @@ monitoring_servers: > > If the `dashboard_dir` field of `grafana_servers` is configured, after executing the `tiup cluster rename` command to rename the cluster, you need to perform the following operations: > -> + 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. For the above fields, you cannot modify these configured fields after the deployment: @@ -711,7 +711,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `grafana_servers` configuration example: +A `grafana_servers` configuration example is as follows: ```yaml grafana_servers: @@ -739,7 +739,7 @@ grafana_servers: - `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. +- `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. - `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`. @@ -758,7 +758,7 @@ For the above fields, you cannot modify these configured fields after the deploy - `arch` - `os` -A `alertmanager_servers` configuration example: +A `alertmanager_servers` configuration example is as follows: ```yaml alertmanager_servers: From 38bbfb411569dd3f855496384370d892dc36e5a4 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Wed, 14 Apr 2021 19:07:39 +0800 Subject: [PATCH 6/9] Update tiup/tiup-cluster-topology-reference.md Co-authored-by: Grace Cai --- tiup/tiup-cluster-topology-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md index 007d3aa3469da..f0ddfd4983296 100644 --- a/tiup/tiup-cluster-topology-reference.md +++ b/tiup/tiup-cluster-topology-reference.md @@ -10,7 +10,7 @@ Similarly, to modify the cluster topology, you need to modify the topology file. ## File structure -A topology configuration file for TiDB deployment using TiUP might contains the following sections: +A topology configuration file for TiDB deployment using TiUP might contain the following sections: - [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. - [monitored](#monitored): Configuration for monitoring services, namely, the blackbox_exporter and the `node_exporter`. On each machine, a `node_exporter` and a `blackbox_exporter` are deployed. From ab3c9ef20c2b9d0d999087c9e8b0176898b20ef7 Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 15 Apr 2021 11:29:30 +0800 Subject: [PATCH 7/9] Update tiup/tiup-cluster-topology-reference.md --- tiup/tiup-cluster-topology-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md index f0ddfd4983296..668471b546ae5 100644 --- a/tiup/tiup-cluster-topology-reference.md +++ b/tiup/tiup-cluster-topology-reference.md @@ -6,7 +6,7 @@ title: Topology Configuration File for TiDB Deployment Using TiUP 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 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. +Similarly, to modify the cluster topology, you need to modify the topology file. The difference is that, after the cluster is deployed, 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. ## File structure From d25e655fc18e975eac6062bbb903656518ed3f6d Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 15 Apr 2021 14:36:54 +0800 Subject: [PATCH 8/9] machine on which --> machine to which --- tiup/tiup-cluster-topology-reference.md | 72 ++++++++++++------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md index 668471b546ae5..641e7a578ba3d 100644 --- a/tiup/tiup-cluster-topology-reference.md +++ b/tiup/tiup-cluster-topology-reference.md @@ -15,18 +15,18 @@ A topology configuration file for TiDB deployment using TiUP might contain the f - [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. - [monitored](#monitored): Configuration for monitoring services, namely, the blackbox_exporter and the `node_exporter`. On each machine, a `node_exporter` and a `blackbox_exporter` are deployed. - [server_configs](#server_configs): Components' global configuration. You can configure each component separately. If an instance has a configuration item with the same name, the instance's configuration item will take effect. -- [pd_servers](#pd_servers): The configuration of the PD instance. This configuration specifies the machines on which the PD component is deployed. -- [tidb_servers](#tidb_servers): The configuration of the TiDB instance. This configuration specifies the machines on which the TiDB component is deployed. -- [tikv_servers](#tikv_servers): The configuration of the TiKV instance. This configuration specifies the machines on which the TiKV component is deployed. -- [tiflash_servers](#tiflash_servers): The configuration of the TiFlash instance. This configuration specifies the machines on which the TiFlash component is deployed. -- [pump_servers](#pump_servers): The configuration of the Pump instance. This configuration specifies the machines on which the Pump component is deployed. -- [drainer_servers](#drainer_servers): The configuration of the Drainer instance. This configuration specifies the machines on which the Drainer component is deployed. -- [cdc_servers](#cdc_servers): The configuration of the TiCDC instance. This configuration specifies the machines on which the TiCDC component is deployed. -- [tispark_masters](#tispark_masters): The configuration of the TiSpark master instance. This configuration specifies the machines on which the TiSpark master component is deployed. Only one node of TiSpark master can be deployed. -- [tispark_workers](#tispark_workers): The configuration of the TiSpark worker instance. This configuration specifies the machines on which the TiSpark worker component is deployed. -- [monitoring_servers](#monitoring_servers): Specifies the machines on which Prometheus is deployed. TiUP supports deploying multiple Prometheus instances but only the first instance is used. -- [grafana_servers](#grafana_servers): The configuration of the Grafana instance. This configuration specifies the machines on which Grafana is deployed. -- [alertmanager_servers](#alertmanager_servers): The configuration of the Alertmanager instance. This configuration specifies the machines on which Alertmanager is deployed. +- [pd_servers](#pd_servers): The configuration of the PD instance. This configuration specifies the machines to which the PD component is deployed. +- [tidb_servers](#tidb_servers): The configuration of the TiDB instance. This configuration specifies the machines to which the TiDB component is deployed. +- [tikv_servers](#tikv_servers): The configuration of the TiKV instance. This configuration specifies the machines to which the TiKV component is deployed. +- [tiflash_servers](#tiflash_servers): The configuration of the TiFlash instance. This configuration specifies the machines to which the TiFlash component is deployed. +- [pump_servers](#pump_servers): The configuration of the Pump instance. This configuration specifies the machines to which the Pump component is deployed. +- [drainer_servers](#drainer_servers): The configuration of the Drainer instance. This configuration specifies the machines to which the Drainer component is deployed. +- [cdc_servers](#cdc_servers): The configuration of the TiCDC instance. This configuration specifies the machines to which the TiCDC component is deployed. +- [tispark_masters](#tispark_masters): The configuration of the TiSpark master instance. This configuration specifies the machines to which the TiSpark master component is deployed. Only one node of TiSpark master can be deployed. +- [tispark_workers](#tispark_workers): The configuration of the TiSpark worker instance. This configuration specifies the machines to which the TiSpark worker component is deployed. +- [monitoring_servers](#monitoring_servers): Specifies the machines to which Prometheus is deployed. TiUP supports deploying multiple Prometheus instances but only the first instance is used. +- [grafana_servers](#grafana_servers): The configuration of the Grafana instance. This configuration specifies the machines to which Grafana is deployed. +- [alertmanager_servers](#alertmanager_servers): The configuration of the Alertmanager instance. This configuration specifies the machines to which Alertmanager is deployed. ### `global` @@ -155,9 +155,9 @@ The above configuration specifies the global configuration of TiDB and TiKV. ### `pd_servers` -`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: +`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 on 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 the IP address and cannot be omitted. - `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`. @@ -213,9 +213,9 @@ The above configuration specifies that PD will be deployed on `10.0.1.11` and `1 ### `tidb_servers` -`tidb_servers` specifies the machines on which TiDB services are deployed. It also specifies the service configuration on each machine. `tidb_servers` is an array, and each element of the array contains the following fields: +`tidb_servers` specifies the machines to which TiDB services are deployed. It also specifies the service configuration on each machine. `tidb_servers` is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine on which the TiDB services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiDB services are deployed. The field value is the IP address and cannot be omitted. - `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`. @@ -263,9 +263,9 @@ tidb_servers: ### `tikv_servers` -`tikv_servers` specifies the machines on which TiKV services are deployed. It also specifies the service configuration on each machine. `tikv_servers` is an array, and each element of the array contains the following fields: +`tikv_servers` specifies the machines to which TiKV services are deployed. It also specifies the service configuration on each machine. `tikv_servers` is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine on which the TiKV services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiKV services are deployed. The field value is the IP address and cannot be omitted. - `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`. @@ -317,9 +317,9 @@ tikv_servers: ### `tiflash_servers` -`tiflash_servers` specifies the machines on which TiFlash services are deployed. It also specifies the service configuration on each machine. This section is an array, and each element of the array contains the following fields: +`tiflash_servers` specifies the machines to which TiFlash services are deployed. It also specifies the service configuration on each machine. This section is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine on which the TiFlash services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiFlash services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -380,9 +380,9 @@ tiflash_servers: ### `pump_servers` -`pump_servers` specifies the machines on which the Pump services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `pump_servers` is an array, and each element of the array contains the following fields: +`pump_servers` specifies the machines to which the Pump services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `pump_servers` is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine on which the Pump services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the Pump services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -426,9 +426,9 @@ pump_servers: ### `drainer_servers` -`drainer_servers` specifies the machines on which the Drainer services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `drainer_servers` is an array. Each array element contains the following fields: +`drainer_servers` specifies the machines to which the Drainer services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `drainer_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the Drainer services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the Drainer services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -483,9 +483,9 @@ drainer_servers: ### `cdc_servers` -`cdc_servers` specifies the machines on which the TiCDC services are deployed. It also specifies the service configuration on each machine. `cdc_servers` is an array. Each array element contains the following fields: +`cdc_servers` specifies the machines to which the TiCDC services are deployed. It also specifies the service configuration on each machine. `cdc_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the TiCDC services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiCDC services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -531,9 +531,9 @@ cdc_servers: ### `tispark_masters` -`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: +`tispark_masters` specifies the machines to 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 deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiSpark master is deployed. The field value is the IP address and cannot be omitted. - `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`. @@ -588,9 +588,9 @@ tispark_masters: ### `tispark_workers` -`tispark_workers` specifies the machines on which the worker nodes of TiSpark are deployed. It also specifies the service configuration on each machine. `tispark_workers` is an array. Each array element contains the following fields: +`tispark_workers` specifies the machines to which the worker nodes of TiSpark are deployed. It also specifies the service configuration on each machine. `tispark_workers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the TiSpark workers are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiSpark workers are deployed. The field value is the IP address and cannot be omitted. - `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`. @@ -628,9 +628,9 @@ tispark_workers: ### `monitoring_servers` -`monitoring_servers` specifies the machines on which the Prometheus services are deployed. It also specifies the service configuration on each machine. `monitoring_servers` is an array. Each array element contains the following fields: +`monitoring_servers` specifies the machines to which the Prometheus services are deployed. It also specifies the service configuration on each machine. `monitoring_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the monitoring services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the monitoring services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -674,9 +674,9 @@ monitoring_servers: ### `grafana_servers` -`grafana_servers` specifies the machines on which the Grafana services are deployed. It also specifies the service configuration on each machine. `grafana_servers` is an array. Each array element contains the following fields: +`grafana_servers` specifies the machines to which the Grafana services are deployed. It also specifies the service configuration on each machine. `grafana_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the Grafana services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the Grafana services are deployed. The field value is the IP address and cannot be omitted. - `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. @@ -721,9 +721,9 @@ grafana_servers: ### `alertmanager_servers` -`alertmanager_servers` specifies the machines on which the Alertmanager services are deployed. It also specifies the service configuration on each machine. `alertmanager_servers` is an array. Each array element contains the following fields: +`alertmanager_servers` specifies the machines to which the Alertmanager services are deployed. It also specifies the service configuration on each machine. `alertmanager_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine on which the Alertmanager services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the Alertmanager services are deployed. The field value is the IP address and cannot be omitted. - `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. From 00273f8a1acfcd2d3843a0353a3440eccac6521d Mon Sep 17 00:00:00 2001 From: TomShawn <41534398+TomShawn@users.noreply.github.com> Date: Thu, 15 Apr 2021 17:31:44 +0800 Subject: [PATCH 9/9] address comments from grace --- tiup/tiup-cluster-topology-reference.md | 78 ++++++++++++------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/tiup/tiup-cluster-topology-reference.md b/tiup/tiup-cluster-topology-reference.md index 641e7a578ba3d..257894e5b31d2 100644 --- a/tiup/tiup-cluster-topology-reference.md +++ b/tiup/tiup-cluster-topology-reference.md @@ -36,7 +36,7 @@ The `global` section corresponds to the cluster's global configuration and has t - `group`: The user group to which a user belongs. It is specified when the user is created. The value defaults to that of the `` field. If the specified group does not exist, it is automatically created. -- `ssh_port`: The SSH port used when connecting to the target machine for operations. The default value is `22`. +- `ssh_port`: Specifies the SSH port to connect to the target machine for operations. The default value is `22`. - `enable_tls`: Specifies whether to enable TLS for the cluster. After TLS is enabled, the generated TLS certificate must be used for connections between components or between the client and the component. **Once it is enabled, it cannot be disabled**. The default value is `false`. @@ -66,9 +66,9 @@ The `global` section corresponds to the cluster's global configuration and has t - If `log_dir` is a relative path, the component log is placed in `/`. For the calculation rules of ``, 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`. +- `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". -- `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". - `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 controlled are as follows: @@ -76,9 +76,9 @@ The `global` section corresponds to the cluster's global configuration and has t - `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"`. + - `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_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 maximum I/O bandwidth for disk writes. For example, `/dev/disk/by-path/pci-0000:00:1f.2-scsi-0:0:0:0 100M`. - `limit_core`: Controls the size of core dump. @@ -119,7 +119,7 @@ The above configuration specifies that `node_exporter` uses the `9100` port and ### `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: +`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: - `tidb`: TiDB service-related configuration. For the complete configuration, see [TiDB configuration file](/tidb-configuration-file.md). @@ -157,11 +157,11 @@ The above configuration specifies the global configuration of TiDB and TiKV. `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. +- `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. +- `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. - `name`: Specifies the name of the PD instance. Different instances must have unique names; otherwise, instances cannot be deployed. @@ -175,7 +175,7 @@ The above configuration specifies the global configuration of TiDB and TiKV. - `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". +- `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". - `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`. @@ -215,11 +215,11 @@ The above configuration specifies that PD will be deployed on `10.0.1.11` and `1 `tidb_servers` specifies the machines to which TiDB services are deployed. It also specifies the service configuration on each machine. `tidb_servers` is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine to which the TiDB services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiDB 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. +- `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. - `port`: The listening port of TiDB services, which is used to provide connection to the MySQL client. The default value is `4000`. @@ -229,7 +229,7 @@ The above configuration specifies that PD will be deployed on `10.0.1.11` and `1 - `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. 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". +- `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". - `config`: The configuration rule of this field is the same as the `tidb` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `tidb` 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`. @@ -265,11 +265,11 @@ tidb_servers: `tikv_servers` specifies the machines to which TiKV services are deployed. It also specifies the service configuration on each machine. `tikv_servers` is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine to which the TiKV services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiKV 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. +- `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. - `port`: The listening port of the TiKV services. The default value is `20160`. @@ -281,7 +281,7 @@ tidb_servers: - `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. 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". +- `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". - `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`. @@ -319,9 +319,9 @@ tikv_servers: `tiflash_servers` specifies the machines to which TiFlash services are deployed. It also specifies the service configuration on each machine. This section is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine to which the TiFlash services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiFlash services are deployed. The field value is an IP address and is mandatory. -- `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. - `tcp_port`: The port of the TiFlash TCP service. The default value is `9000`. @@ -343,7 +343,7 @@ tikv_servers: - `tmp_path`: The storage path of TiFlash temporary files. The default value is [`path` or the first directory of `storage.latest.dir`] + "/tmp". -- `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". +- `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". - `config`: The configuration rule of this field is the same as the `tiflash` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `tiflash` 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`. @@ -382,9 +382,9 @@ tiflash_servers: `pump_servers` specifies the machines to which the Pump services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `pump_servers` is an array, and each element of the array contains the following fields: -- `host`: Specifies the machine to which the Pump services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the Pump services are deployed. The field value is an IP address and is mandatory. -- `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. - `port`: The listening port of the Pump services. The default value is `8250`. @@ -394,7 +394,7 @@ tiflash_servers: - `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. 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". +- `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". - `config`: The configuration rule of this field is the same as the `pump` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `pump` 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`. @@ -428,9 +428,9 @@ pump_servers: `drainer_servers` specifies the machines to which the Drainer services of TiDB Binlog are deployed. It also specifies the service configuration on each machine. `drainer_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine to which the Drainer services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the Drainer services are deployed. The field value is an IP address and is mandatory. -- `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. - `port`: The listening port of Drainer services. The default value is `8249`. @@ -442,7 +442,7 @@ pump_servers: - `commit_ts`: When Drainer starts, it reads the checkpoint. If Drainer cannot read the checkpoint, it uses this field as the replication time point for the initial startup. This field defaults to `-1` (Drainer always gets the latest timestamp from the PD as the commit_ts). -- `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". +- `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". - `config`: The configuration rule of this field is the same as the `drainer` configuration rule in `server_configs`. If this field is configured, the field content is merged with the `drainer` 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`. @@ -485,9 +485,9 @@ drainer_servers: `cdc_servers` specifies the machines to which the TiCDC services are deployed. It also specifies the service configuration on each machine. `cdc_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine to which the TiCDC services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiCDC services are deployed. The field value is an IP address and is mandatory. -- `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. - `port`: The listening port of the TiCDC services. The default value is `8300`. @@ -499,7 +499,7 @@ drainer_servers: - `tz`: The time zone that the TiCDC services use. TiCDC uses this time zone when internally converting time data types such as timestamp and when replicating data to the downstream. The default value is the local time zone where the process runs. -- `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". +- `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". - `config`: The field content is merged with the `cdc` 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`. @@ -533,11 +533,11 @@ cdc_servers: `tispark_masters` specifies the machines to 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 to which the TiSpark master is deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiSpark master is 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. +- `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. - `port`: Spark's listening port, used for communication before the node. The default value is `7077`. @@ -590,11 +590,11 @@ tispark_masters: `tispark_workers` specifies the machines to which the worker nodes of TiSpark are deployed. It also specifies the service configuration on each machine. `tispark_workers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine to which the TiSpark workers are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the TiSpark workers 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. +- `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. - `port`: Spark's listening port, used for communication before the node. The default value is `7077`. @@ -630,9 +630,9 @@ tispark_workers: `monitoring_servers` specifies the machines to which the Prometheus services are deployed. It also specifies the service configuration on each machine. `monitoring_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine to which the monitoring services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the monitoring services are deployed. The field value is an IP address and is mandatory. -- `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. - `port`: The listening port of the Prometheus services. The default value is `9090`. @@ -642,7 +642,7 @@ tispark_workers: - `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. 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". +- `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". - `storage_retention`: The retention time of the Prometheus monitoring data. The default value is `"15d"`. @@ -676,9 +676,9 @@ monitoring_servers: `grafana_servers` specifies the machines to which the Grafana services are deployed. It also specifies the service configuration on each machine. `grafana_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine to which the Grafana services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the Grafana services are deployed. The field value is an IP address and is mandatory. -- `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. - `port`: The listening port of the Grafana services. The default value is `3000`. @@ -723,9 +723,9 @@ grafana_servers: `alertmanager_servers` specifies the machines to which the Alertmanager services are deployed. It also specifies the service configuration on each machine. `alertmanager_servers` is an array. Each array element contains the following fields: -- `host`: Specifies the machine to which the Alertmanager services are deployed. The field value is the IP address and cannot be omitted. +- `host`: Specifies the machine to which the Alertmanager services are deployed. The field value is an IP address and is mandatory. -- `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. - `web_port`: Specifies the port used that Alertmanager uses to provide web services. The default value is `9093`. @@ -737,7 +737,7 @@ grafana_servers: - `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. 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". +- `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". - `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.