Skip to content

Commit 3b9b115

Browse files
qiancaiti-srebot
authored andcommitted
cherry pick pingcap#5277 to release-5.0
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
1 parent 711f350 commit 3b9b115

File tree

3 files changed

+185
-0
lines changed

3 files changed

+185
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: tiup cluster start
3+
---
4+
5+
# tiup cluster start
6+
7+
The `tiup cluster start` command is used to start all services or some services of the specified cluster.
8+
9+
## Syntax
10+
11+
```shell
12+
tiup cluster start <cluster-name> [flags]
13+
```
14+
15+
`<cluster-name>` is the name of the cluster to operate on. If you forget the cluster name, check it using the [cluster list](/tiup/tiup-component-cluster-list.md) command.
16+
17+
## Options
18+
19+
### -N, --node
20+
21+
- Specifies the nodes to be started. The value of this option is a comma-separated list of node IDs. You can get the node IDs from the first column of the [cluster status table](/tiup/tiup-component-cluster-display.md) returned by the `tiup cluster display` command.
22+
- Data type: `STRING`
23+
- Default: `[]`. If this option is not specified in the command, all nodes are started.
24+
25+
> **Note:**
26+
>
27+
> If the `-R, --role` option is specified at the same time, only the service nodes that match both the specifications of `-N, --node` and `-R, --role` are restarted.
28+
29+
### -R, --role
30+
31+
- Specified the roles of nodes to be started. The value of this option is a comma-separated list of the roles of the nodes. You can get the roles of the nodes from the second column of the [cluster status table](/tiup/tiup-component-cluster-display.md) returned by the `tiup cluster display` command.
32+
- Data type: `STRING`
33+
- Default: `[]`. If this option is not specified in the command, all roles are started.
34+
35+
> **Note:**
36+
>
37+
> If the `-N, --node` option is specified at the same time, only the service nodes that match both the specifications of `-N, --node` and `-R, --role` are restarted.
38+
39+
### -h, --help
40+
41+
- Prints the help information.
42+
- Data type: `BOOLEAN`
43+
- This option is disabled by default with the `false` value. To enable this option, add this option to the command, and either pass the `true` value or do not pass any value.
44+
45+
## Output
46+
47+
The log of starting the service.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: tiup cluster stop
3+
---
4+
5+
# tiup cluster stop
6+
7+
The `tiup cluster stop` command is used to stop all services or some services of the specified cluster.
8+
9+
> **Note:**
10+
>
11+
> If the core services of a cluster are stopped, the cluster cannot provide services anymore.
12+
13+
## Syntax
14+
15+
```shell
16+
tiup cluster stop <cluster-name> [flags]
17+
```
18+
19+
`<cluster-name>` is the name of the cluster to operate on. If you forget the cluster name, check it with the [cluster list](/tiup/tiup-component-cluster-list.md) command.
20+
21+
## Options
22+
23+
### -N, --node
24+
25+
- Specifies the nodes to be stoped. The value of this option is a comma-separated list of node IDs. You can get the node IDs from the first column of the [cluster status table](/tiup/tiup-component-cluster-display.md) returned by the `tiup cluster display` command.
26+
- Data type: `STRING`
27+
- Default: []. If this option is not specified in the command, the command stops all the nodes.
28+
29+
> **Note:**
30+
>
31+
> If the `-R, --role` option is specified at the same time, only the service nodes that match both the specifications of `-N, --node` and `-R, --role` are restarted.
32+
33+
### -R, --role
34+
35+
- Specifies the roles of nodes to be stoped. The value of this option is a comma-separated list of the roles of the nodes. You can get the roles of the nodes from the second column of the [cluster status table](/tiup/tiup-component-cluster-display.md) returned by the `tiup cluster display` command.
36+
- Data type: `STRING`
37+
- Default: []. If this option is not specified in the command, the command stops all the roles.
38+
39+
> **Note:**
40+
>
41+
> If the `-N, --node` option is specified at the same time, only the service nodes that match both the specifications of `-N, --node` and `-R, --role` are restarted.
42+
43+
### -h, --help
44+
45+
- Prints the help information.
46+
- Data type: `BOOLEAN`
47+
- This option is disabled by default with the `false` value. To enable this option, add this option to the command, and either pass the `true` value or do not pass any value.
48+
49+
## Output
50+
51+
The log of stopping the service.

tiup/tiup-component-cluster.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: TiUP Cluster
3+
---
4+
5+
# TiUP Cluster
6+
7+
TiUP Cluster is a cluster management component of TiUP written in Golang. You can use the TiUP Cluster component to perform daily operations and maintenance, including deploying, starting, shutting down, destroying, elastic scaling, upgrading TiDB clusters, and managing TiDB cluster parameters.
8+
9+
## Syntax
10+
11+
```shell
12+
tiup cluster [command] [flags]
13+
```
14+
15+
`[command]` is the name of the command. For the supported commands, refer to the [command list](#command-list) below.
16+
17+
## Options
18+
19+
### --ssh
20+
21+
- Specifies the SSH client to connect to the remote end (the machine where the TiDB service is deployed) for the command execution.
22+
- Data type: `STRING`
23+
- Supported values:
24+
25+
- `builtin`: uses the easyssh client built in tiup-cluster as the SSH client.
26+
- `system`: uses the default SSH client of the current operating system.
27+
- `none`: The SSH client is not used. The deployment is only for the current machine.
28+
29+
- If this option is not specified in the command, `builtin` is used as the default value.
30+
31+
### --ssh-timeout
32+
33+
- Specifies the SSH connection timeout in seconds.
34+
- Data type: `UINT`
35+
- If this option is not specified in the command, the default timeout is `5` seconds.
36+
37+
### --wait-timeout
38+
39+
- Specifies the maximum waiting time (in seconds) for each step in the operation process. The operation process consists of many steps, such as specifying systemctl to start or stop services, and waiting for ports to be online or offline. Each step may take several seconds. If the execution time of a step exceeds the specified timeout, the step exits with an error.
40+
- Data type: `UINT`
41+
- If this option is not specified in the command, the maximum waiting time for each step is `120` seconds.
42+
43+
### -y, --yes
44+
45+
- Skips the secondary confirmation of all risky operations. Using this option is not recommended, unless you are using a script to call TiUP.
46+
- This option is disabled by default with the `false` value. To enable this option, add this option to the command, and either pass the `true` value or do not pass any value.
47+
48+
### -v, --version
49+
50+
- Prints the current version of TiUP Cluster.
51+
- Data type: `BOOLEAN`
52+
- This option is disabled by default with the `false` value. To enable this option, add this option to the command, and either pass the `true` value or do not pass any value.
53+
54+
### -h, --help
55+
56+
- Prints the help information of the related commands.
57+
- Data type: `BOOLEAN`
58+
- This option is disabled by default with the `false` value. To enable this option, add this option to the command, and either pass the `true` value or do not pass any value.
59+
60+
## Command list
61+
62+
- import: imports a cluster deployed by Ansible
63+
<!--- - [import](/tiup/tiup-component-cluster-import.md): imports a cluster deployed by Ansible-->
64+
- check: checks a cluster before and after the deployment
65+
<!--- - [check](/tiup/tiup-component-cluster-check.md): checks a cluster before and after the deployment-->
66+
- [deploy](/tiup/tiup-component-cluster-deploy.md): deploys a cluster based on a specified topology
67+
- [list](/tiup/tiup-component-cluster-list.md): queries the list of deployed clusters
68+
- [display](/tiup/tiup-component-cluster-display.md): displays the status of a specified cluster
69+
- [start](/tiup/tiup-component-cluster-start.md): starts a specified cluster
70+
- [stop](/tiup/tiup-component-cluster-stop.md): stops a specified cluster
71+
- restart: restarts a specified cluster
72+
<!--- - [restart](/tiup/tiup-component-cluster-restart.md): restarts a specified cluster-->
73+
- scale-in: scales in a specified cluster
74+
<!--- - [scale-in](/tiup/tiup-component-cluster-scale-in.md): scales in a specified cluster-->
75+
- [scale-out](/tiup/tiup-component-cluster-scale-out.md): scales out a specified cluster
76+
- [upgrade](/tiup/tiup-component-cluster-upgrade.md): upgrades a specified cluster
77+
- [prune](/tiup/tiup-component-cluster-prune.md): cleans up the instances in the Tombstone status for a specified cluster
78+
- [edit-config](/tiup/tiup-component-cluster-edit-config.md): modifies the configuration of a specified cluster
79+
- [reload](/tiup/tiup-component-cluster-reload.md): reloads the configuration of a specified cluster
80+
- [patch](/tiup/tiup-component-cluster-patch.md): replaces a service in a deployed cluster
81+
<!---- [rename](/tiup/tiup-component-cluster-rename.md): renames a cluster-->
82+
- [clean](/tiup/tiup-component-cluster-clean.md): deletes data from the specified cluster
83+
- [destroy](/tiup/tiup-component-cluster-destroy.md): destroys a specified cluster
84+
- [audit](/tiup/tiup-component-cluster-audit.md): queries the operation audit log of a specified cluster
85+
- [enable](/tiup/tiup-component-cluster-enable.md): enables a specified cluster or service to start on boot
86+
- [disable](/tiup/tiup-component-cluster-disable.md): disables a specified cluster or service to start on boot
87+
- [help](/tiup/tiup-component-cluster-help.md): prints the help information

0 commit comments

Comments
 (0)