Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

TiUP: add three docs for cluster start, stop, and more info #5277

Merged
merged 24 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8ff471e
TiUP: add three docs for cluster start, stop, and more information
qiancai Apr 9, 2021
8e362cf
add three docs for cluster start, stop and more information
qiancai Apr 9, 2021
a07bbf4
Create tiup-component-cluster.md
qiancai Apr 12, 2021
9ba22a6
Merge remote-tracking branch 'upstream/master' into TiUP-add-three-do…
qiancai Apr 12, 2021
45c942d
Update tiup-component-cluster-stop.md
qiancai Apr 12, 2021
69b5f46
Update tiup-component-cluster-start.md
qiancai Apr 12, 2021
0251bd7
Update tiup/tiup-component-cluster-start.md
qiancai Apr 12, 2021
17f4aaf
Update tiup/tiup-component-cluster.md
qiancai Apr 13, 2021
74f8b7c
Update tiup/tiup-component-cluster-start.md
qiancai Apr 15, 2021
b113edc
Update tiup/tiup-component-cluster-start.md
qiancai Apr 15, 2021
90ce11d
Update tiup/tiup-component-cluster-stop.md
qiancai Apr 15, 2021
37f29b6
Apply suggestions from code review
qiancai Apr 15, 2021
de2ebe9
Update tiup/tiup-component-cluster-start.md
qiancai Apr 15, 2021
aa532b4
Update tiup/tiup-component-cluster-start.md
qiancai Apr 15, 2021
7b3974a
Apply suggestions from code review
qiancai Apr 15, 2021
2c0aef8
Apply suggestions from code review
qiancai Apr 15, 2021
4f03008
Merge remote-tracking branch 'upstream/master' into TiUP-add-three-do…
qiancai Apr 15, 2021
9a18073
Apply review comments
qiancai Apr 15, 2021
e093a1b
Update tiup/tiup-component-cluster.md
qiancai Apr 16, 2021
7f49761
Merge remote-tracking branch 'upstream/master' into TiUP-add-three-do…
qiancai Apr 16, 2021
f6585f5
Merge branch 'TiUP-add-three-docs-for-cluster,-start-and-stop,' of ht…
qiancai Apr 16, 2021
ff3167c
fixed the broken links
qiancai Apr 16, 2021
0b799c4
fixed the lint issues
qiancai Apr 16, 2021
213c32f
Apply suggestions from code review
qiancai Apr 16, 2021
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
47 changes: 47 additions & 0 deletions tiup/tiup-component-cluster-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: tiup cluster start
---

# tiup cluster start

The `tiup cluster start` command is used to start all services or some services of the specified cluster.

## Syntax

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

`<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.

## Options

### -N, --node

- Specifies the nodes to be restarted. 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.
qiancai marked this conversation as resolved.
Show resolved Hide resolved
- Data type: `STRING`
- Default: `[]`. If this option is not specified in the command, all nodes are started.

> **Note:**
>
> 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.

### -R, --role

- Specified the roles of nodes to be restarted. 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.
qiancai marked this conversation as resolved.
Show resolved Hide resolved
- Data type: `STRING`
- Default: `[]`. If this option is not specified in the command, all roles are started.

> **Note:**
>
> 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.

### -h, --help

- Prints the help information.
- Data type: `BOOLEAN`
- 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.

## Output

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

# tiup cluster stop

The `tiup cluster stop` command is used to stop all services or some services of the specified cluster.

> **Note:**
>
> If the core services of a cluster are stopped, the cluster cannot provide services anymore.

## Syntax

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

`<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.

## Options

### -N, --node

Specifies the nodes to be restarted. 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.
Data type: `STRING`
Default: []. If this option is not specified in the command, the command stops all the nodes.

> **Note:**
>
> 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.

### -R, --role

Specified the roles of nodes to be restarted. 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.
Data type: `STRING`
Default: []. If this option is not specified in the command, the command stops all the roles.

> **Note:**
>
> 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.

### -h, --help

- Prints the help information.
- Data type: `BOOLEAN`
- 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.

## Output

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

# TiUP Cluster

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.

## Syntax

```shell
tiup cluster [command] [flags]
```

`[command]` is the name of the command. For the supported commands, refer to the [command list](#command-list) below.

## Options

### --ssh

- Specifies the SSH client to connect to the remote end (the machine where the TiDB service is deployed) for the command execution.
- Data type: `STRING`
- Supported values:

- `builtin`: uses the easyssh client built in tiup-cluster as the SSH client.
- `system`: uses the default SSH client of the current operating system.
- `none`: The SSH client is not used. The deployment is only for the current machine.
qiancai marked this conversation as resolved.
Show resolved Hide resolved

- If this option is not specified in the command, `builtin` is used as the default value.

### --ssh-timeout

- Specifies the SSH connection timeout in seconds.
- Data type: `UINT`
- If this option is not specified in the command, the default timeout is `5` seconds.

### --wait-timeout

- 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.
- Data type: `UINT`
- If this option is not specified in the command, the maximum waiting time for each step is `120` seconds.

### -y, --yes

- Skips the secondary confirmation of all risky operations. Using this option is not recommended, unless you are using a script to call TiUP.
- 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.

### -v, --version

- Prints the current version of TiUP Cluster.
- Data type: `BOOLEAN`
- 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.

### -h, --help

- Prints the help information of the related commands.
- Data type: `BOOLEAN`
- 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.

## Command list

- [import](/tiup/tiup-component-cluster-import.md): imports a cluster deployed by Ansible
- [check](/tiup/tiup-component-cluster-check.md): check a cluster before and after the deployment
- [deploy](/tiup/tiup-component-cluster-deploy.md): deploy a cluster based on a specified topology
- [list](/tiup/tiup-component-cluster-list.md): query the list of deployed clusters
- [display](/tiup/tiup-component-cluster-display.md): display the status of a specified cluster
- [start](/tiup/tiup-component-cluster-start.md): start a specified cluster
- [stop](/tiup/tiup-component-cluster-stop.md): stop a specified cluster
- [restart](/tiup/tiup-component-cluster-restart.md): restart a specified cluster
- [scale-in](/tiup/tiup-component-cluster-scale-in.md): scale in a specified cluster
- [scale-out](/tiup/tiup-component-cluster-scale-out.md): scale out a specified cluster
- [upgrade](/tiup/tiup-component-cluster-upgrade.md): upgrade a specified cluster
- [prune](/tiup/tiup-component-cluster-prune.md): clean up the instances in the Tombstone status for a specified cluster
- [edit-config](/tiup/tiup-component-cluster-edit-config.md): modify the configuration of a specified cluster
- [reload](/tiup/tiup-component-cluster-reload.md): reload the configuration of a specified cluster
- [patch](/tiup/tiup-component-cluster-patch.md): replace a service in a deployed cluster
- [rename](/tiup/tiup-component-cluster-rename.md): rename a cluster
- [clean](/tiup/tiup-component-cluster-clean.md): delete data from the specified cluster
- [destroy](/tiup/tiup-component-cluster-destroy.md): destroy a specified cluster
- [audit](/tiup/tiup-component-cluster-audit.md): query the operation audit log of a specified cluster
- [enable](/tiup/tiup-component-cluster-enable.md): enable a specified cluster or service to start on boot
- [disable](/tiup/tiup-component-cluster-disable.md): disable a specified cluster or service to start on boot
- [help](/tiup/tiup-component-cluster-help.md): print the help information