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

```sh
qiancai marked this conversation as resolved.
Show resolved Hide resolved
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 in [tiup cluster list](/tiup/tiup-component-cluster-list.md).
qiancai marked this conversation as resolved.
Show resolved Hide resolved

## Options

### -N, --node

Specifies the IDs of the nodes to start, splitting by commas if starting multiple nodes. The node IDs are in the first column of the [tiup cluster display](/tiup/tiup-component-cluster-display.md) table.
Data type: `STRING`
Default: []. If this option is not specified in the command, the command starts all the nodes.

> **Note:**
>
> If `-R, --role` is also specified, only the services in the intersection of the specified nodes and roles will be started.
qiancai marked this conversation as resolved.
Show resolved Hide resolved

### -R, --role strings

Specifies the roles to be started, splitting by commas if starting multiple roles. The roles are in the second column of the [tiup cluster display](/tiup/tiup-component-cluster-display.md) table.
Data type: `STRING`
Default: []. If this option is not specified in the command, the command starts all the roles.

> **Note:**
>
> If `-N, --node` is also specified, only the services in the intersection of the specified nodes and roles will be started.
qiancai marked this conversation as resolved.
Show resolved Hide resolved

### -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 output contains the starting logs.
qiancai marked this conversation as resolved.
Show resolved Hide resolved
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

```sh
qiancai marked this conversation as resolved.
Show resolved Hide resolved
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 in [tiup cluster list](/tiup/tiup-component-cluster-list.md).
qiancai marked this conversation as resolved.
Show resolved Hide resolved

## Options

### -N, --node

Specifies the IDs of the nodes to stop, splitting by commas for multiple nodes. The node IDs are in the first column of the [tiup cluster display](/tiup/tiup-component-cluster-display.md) table.
Data type: `STRING`
Default: []. If this option is not specified in the command, the command stops all the nodes.

> **Note:**
>
> If `-R, --role` is also specified, only the services in the intersection of the specified nodes and roles are stopped.

### -R, --role strings

Specifies the roles to stop, splitting by commas for multiple roles. The roles are in the second column of the [tiup cluster display](/tiup/tiup-component-cluster-display.md) table.
Data type: `STRING`
Default: []. If this option is not specified in the command, the command stops all the roles.

> **Note:**
>
> If `-N, --node` is also specified, only the services in the intersection of the specified nodes and roles are stopped.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto


### -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 output contains the stopping logs.
qiancai marked this conversation as resolved.
Show resolved Hide resolved
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
qiancai marked this conversation as resolved.
Show resolved Hide resolved
---

# 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 tasks, including deploying, starting, shutting down, destroying, elastic scaling, upgrading TiDB clusters, and managing TiDB cluster parameters.
qiancai marked this conversation as resolved.
Show resolved Hide resolved

## Syntax

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

`[command]` is the command name as in the following command list:
qiancai marked this conversation as resolved.
Show resolved Hide resolved

## 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

- The option is enabled by default with `builtin` (the default value) passed in.
qiancai marked this conversation as resolved.
Show resolved Hide resolved

### --ssh-timeout

- Specifies the SSH connection timeout in seconds.
- Data type: `UINT`
- The option is enabled by default with `5` seconds (the default value) passed in.
qiancai marked this conversation as resolved.
Show resolved Hide resolved

### --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`
- The option is enabled by default with `120` seconds (the default value) passed in.
qiancai marked this conversation as resolved.
Show resolved Hide resolved

### -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 (boolean, default false)
qiancai marked this conversation as resolved.
Show resolved Hide resolved

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

## List of commands
qiancai marked this conversation as resolved.
Show resolved Hide resolved

- [import](/tiup/tiup-component-cluster-import.md): import a cluster deployed by Ansible
qiancai marked this conversation as resolved.
Show resolved Hide resolved
- [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 help information
qiancai marked this conversation as resolved.
Show resolved Hide resolved