Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tiup/tiup-component-cluster-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ tiup cluster deploy <cluster-name> <version> <topology.yaml> [flags]
- Data type: `BOOLEAN`
- Default: false

### --skip-create-user(boolean,false)
### --skip-create-user

- During the cluster deployment, tiup-cluster checks whether the specified user name in the topology file exists or not. If not, it creates one. To skip this check, you can use the `--skip-create-user` option.
- Data type: `BOOLEAN`
Expand Down
6 changes: 3 additions & 3 deletions tiup/tiup-component-cluster-disable.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ tiup cluster disable <cluster-name> [flags]

### -N, --node

- Specifies the nodes whose auto-enabling service is to be disabled. The value of this option is a comma-separated list of node IDs. The node ID is the first column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.
- Data type: `strings`
- Default: `[]`, which means no node is selected.
- Specifies the nodes whose auto-enabling service is to be disabled. The value of this option is a comma-separated list of node IDs. The node ID is the first column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.

> **Note:**
>
> If the `-R, --role` option is specified at the same time, the auto-enabling of services in their intersection is disabled.

### -R, --role strings
### -R, --role

- Data type: `strings`
- Default: `[]`, which means no role is selected.
Expand All @@ -38,7 +38,7 @@ tiup cluster disable <cluster-name> [flags]

### -h, --help

- Outputs the help information.
- Prints the help information.
- Data type: `BOOLEAN`
- Default: false

Expand Down
4 changes: 2 additions & 2 deletions tiup/tiup-component-cluster-display.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ tiup cluster display <cluster-name> [flags]

### -N, --node

- Specifies the node to query. If not specified, all nodes are queried. The value of this option is a comma-separated list of node IDs. The node ID is the first column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.
- Data type: `strings`
- Default: `[]`, which means all nodes.
- Specifies the node to query. If not specified, all nodes are queried. The value of this option is a comma-separated list of node IDs. The node ID is the first column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.

> **Note:**
>
> If the `-R, --role` option is specified at the same time, then the service status in their intersection is queried.

### -R, --role strings

- Specifies the role to query. If not specified, all roles are queried. The value of this option is a comma-separated list of node roles. The role is the second column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.
- Data type: `strings`
- Default: `[]`, which means all roles.
- Specifies the role to query. If not specified, all roles are queried. The value of this option is a comma-separated list of node roles. The role is the second column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.

> **Note:**
>
Expand Down
51 changes: 51 additions & 0 deletions tiup/tiup-component-cluster-enable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: tiup cluster enable
---

# tiup cluster enable

The `tiup cluster enable` command is used to set the self-enabling of the cluster service after a machine restarts. To enable the self-enabling of the service, this command executes `systemctl enable <service>` at the specified node.

> **Note:**
>
> When all clusters are shut down and restarted, the order of service startup is determined by the node's operating system startup order. When the restart order is incorrect, in some cases, the restarted cluster still cannot provide services. For example, if TiKV is started first but PD is not started, systemd gives up if TiKV is restarted multiple times while PD is not found).

## Syntax

```shell
tiup cluster enable <cluster-name> [flags]
```

`<cluster-name>`: the cluster whose auto-enabling service is to be enabled.

## Options

### -N, --node

- Specifies the nodes whose auto-enabling service is to be enabled. The value of this option is a comma-separated list of node IDs. The node ID is the first column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.
- Data type: `strings`
- Default: `[]`, which means no node is selected.

> **Note:**
>
> If the `-R, --role` option is specified at the same time, the auto-enabling of services in their intersection is enabled.

### -R, --role

- Specifies the roles whose auto-enabling service is to be enabled. The value of this option is a comma-separated list of node roles. The role is the second column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.
- Data type: `strings`
- Default: `[]`, which means no role is selected.

> **Note:**
>
> If the `-N, --node` option is specified at the same time, the auto-enabling of services in their intersection is enabled.

### -h, --help

- Prints the help information.
- Data type: `BOOLEAN`
- Default: false

## Output

The execution log of the tiup-cluster.
83 changes: 83 additions & 0 deletions tiup/tiup-component-cluster-reload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: tiup cluster reload
---

# tiup cluster reload

After [modifying the cluster configuration](/tiup/tiup-component-cluster-edit-config.md), the cluster needs to be reloaded using the `tiup cluster reload` command for the configuration to take effect. This command publishes the configuration of the control machine to the remote machine where the service is running, and follows the upgrade process to restart the services in order according to the upgrade process. The cluster is still available during the restart process.

## Syntax

```shell
tiup cluster reload <cluster-name> [flags]
```

`<cluster-name>`: the cluster name to operate on.

## Options

### --force

- Ignores errors in the reloading process and forces reload.
- Data type: `BOOLEAN`
- Default: false

### --transfer-timeout

- When restarting PD or TiKV, the leader of the restarted node is migrated to other nodes first, and the migration process takes some time. You can set the maximum wait time (in seconds) by setting `-transfer-timeout`. After the timeout, the service can be restarted directly without waiting.
- Data type: `uint`
- Default: 300

> **Note:**
>
> In the case of skipping the waiting and restarting directly, the service performance might jitter.

### --ignore-config-check

- After the binary files of components are deployed, the configurations of TiDB, TiKV, and PD components are checked using `<binary> --config-check <config-file>`. `<binary>` is the path of the deployed binary file. `<config-file>` is the configuration file generated based on the user configuration. If you want to skip this check, you can use this option.
- Data type: `BOOLEAN`
- Default: false

### -N, --node

- Specifies the nodes to be restarted. If not specified, all nodes are restarted. The value of this option is a comma-separated list of node IDs. The node ID is the first column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.
- Data type: `strings`
- Default: `[]`, which means all nodes are selected.

> **Note:**
>
> + If the `-R, --role` option is specified at the same time, then the service status in their intersection is restarted.
> + If the `--skip-restart` option is specified, the `-N, --node` option is invalid.

### -R, --role

- Specifies the roles to be restarted. If not specified, all roles are restarted. The value of this option is a comma-separated list of node roles. The role is the second column of the [cluster status](/tiup/tiup-component-cluster-display.md) table.
- Data type: `strings`
- Default: `[]`, which means all roles are selected.

> **Note:**
>
> 1. If the `-N, --node` option is specified at the same time, the services in their intersection is restarted.
> 2. If the `--skip-restart` option is specified, the `-R, --role` option is invalid.

### --skip-restart

The `tiup cluster reload` command performs two operations:

- Refreshes all node configurations
- Restarts the specified node

After you specify the `--skip-restart` option, it only refreshes the configuration without restarting any nodes, so that the refreshed configuration is not applied and does not take effect until the next restart of the corresponding service.

- Data type: `BOOLEAN`
- Default: false

### -h, --help

- Prints the help information.
- Data type: `BOOLEAN`
- Default: false

## Output

The execution log of the tiup-cluster.
63 changes: 63 additions & 0 deletions tiup/tiup-component-cluster-scale-out.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
title: tiup cluster scale-out
---

# tiup cluster scale-out

The `tiup cluster scale-out` command is used for scaling out the cluster. The internal logic of scaling out the cluster is similar to the cluster deployment. The tiup-cluster component first establishes an SSH connection to the new node, creates the necessary directories on the target node, then performs the deployment and starts the service.

When PD is scaled out, new PD nodes are added to the cluster by the join operation, and the configuration of the services associated with PD is updated; other services are directly started and added to the cluster.

## Syntax

```shell
tiup cluster scale-out <cluster-name> <topology.yaml> [flags]
```

`<cluster-name>`: the name of the cluster to operate on. If you forget the cluster name, you can check it with the `cluster list`<!-- (/tiup/tiup-component-dm-list.md) -->command.

`<topology.yaml>`: the prepared topology file<!--(/tiup/tiup-dm-topology-reference.md) -->. This topology file should only contain the new nodes that are to be added to the current cluster.

## Options

### -u, --user

- Specifies the user name used to connect to the target machine. This user must have the secret-free sudo root permission on the target machine.
- Data type: `STRING`
- Default: the current user who executes the command.

### -i, --identity_file

- Specifies the key file used to connect to the target machine.
- Data type: `STRING`
- If this option is not specified in the command, the `~/.ssh/id_rsa` file is used to connect to the target machine by default.

### -p, --password

- Specifies the password used to connect to the target machine. Do not use this option and `-i/--identity_file` at the same time.
- Data type: `BOOLEAN`
- Default: false

### --no-labels

- This option is used to skip the label check.
- When two or more TiKV nodes are deployed on the same physical machine, a risk exists: PD does not know the cluster topology, so it might schedule multiple replicas of a Region to different TiKV nodes on one physical machine, which makes this physical machine a single point of failure. To avoid this risk, you can use labels to tell PD not to schedule the same Region to the same machine. See [Schedule Replicas by Topology Labels](/schedule-replicas-by-topology-labels.md) for label configuration.
- For the test environment, this risk might not matter, and you can use `--no-labels` to skip the check.
- Data type: `BOOLEAN`
- Default: false

### --skip-create-user

- During the cluster deployment, tiup-cluster checks whether the specified user name in the topology file exists or not. If not, it creates one. To skip this check, you can use the `--skip-create-user` option.
- Data type: `BOOLEAN`
- Default: false

### -h, --help

- Prints the help information.
- Data type: `BOOLEAN`
- Default: false

## Output

The log of scaling out.