From 8ff471eec3fe9245899a9007a7d4a21eeff84dfc Mon Sep 17 00:00:00 2001 From: qiancai Date: Fri, 9 Apr 2021 15:16:00 +0800 Subject: [PATCH 01/20] TiUP: add three docs for cluster start, stop, and more information --- tiup/tiup-component-cluster-start.md | 47 +++++++++++++++++++++++++ tiup/tiup-component-cluster-stop.md | 51 ++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+) create mode 100644 tiup/tiup-component-cluster-start.md create mode 100644 tiup/tiup-component-cluster-stop.md diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md new file mode 100644 index 0000000000000..2792d234f4fb3 --- /dev/null +++ b/tiup/tiup-component-cluster-start.md @@ -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 +tiup cluster start [flags] +``` + +``` 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). + +## 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. + +### -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. + +### -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. diff --git a/tiup/tiup-component-cluster-stop.md b/tiup/tiup-component-cluster-stop.md new file mode 100644 index 0000000000000..ab911b6ee5000 --- /dev/null +++ b/tiup/tiup-component-cluster-stop.md @@ -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 +tiup cluster stop [flags] +``` + +``` 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). + +## 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. + +### -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. From 8e362cf38a5d683cc255c6730dc16ba96717803b Mon Sep 17 00:00:00 2001 From: qiancai Date: Fri, 9 Apr 2021 15:17:38 +0800 Subject: [PATCH 02/20] add three docs for cluster start, stop and more information --- tiup/tiup-component-cluster-start.md | 36 +++++++++++++++++++++++++ tiup/tiup-component-cluster-stop.md | 40 ++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index 2792d234f4fb3..8fc588ca2f89b 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -1,6 +1,12 @@ +<<<<<<< Updated upstream --- title: tiup cluster start --- +======= +-- +title: tiup cluster start +-- +>>>>>>> Stashed changes # tiup cluster start @@ -12,6 +18,7 @@ The `tiup cluster start` command is used to start all services or some services tiup cluster start [flags] ``` +<<<<<<< Updated upstream ``` 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). ## Options @@ -45,3 +52,32 @@ Default: []. If this option is not specified in the command, the command starts ## Output The output contains the starting logs. +======= +``` is the name of the cluster to be operated on. If you forget the cluster name, check it in [tiup cluster list](/tiup/tiup-component-cluster-list.md). + +## Options + +### -N, --node (strings, default is [] for all nodes) + +Specifies the nodes to start, or all nodes if not specified. The value of this option is a comma-separated list of node IDs, with the node IDs being the first column of the [cluster status](/tiup/tiup-component-cluster-display.md) table. + +> **Note:** +> +> If `-R, --role` is also specified, then the services in their intersection will be started. + +### -R, --role strings (strings, default [], means all roles) + +Specify the roles to be started, or all roles if not specified. The value of this option is a comma-separated list of node roles, with the roles being the second column of the [cluster status](/tiup/tiup-component-cluster-display.md) table. + +> **Note:** +> +> If `-N, --node` is also specified, then the services in their intersection will be started. + +### -h, --help (boolean, default false) + +Output help information. + +## Output + +Start log. +>>>>>>> Stashed changes diff --git a/tiup/tiup-component-cluster-stop.md b/tiup/tiup-component-cluster-stop.md index ab911b6ee5000..137bc2bbc69ae 100644 --- a/tiup/tiup-component-cluster-stop.md +++ b/tiup/tiup-component-cluster-stop.md @@ -4,6 +4,7 @@ title: tiup cluster stop # tiup cluster stop +<<<<<<< Updated upstream The `tiup cluster stop` command is used to stop all services or some services of the specified cluster. > **Note:** @@ -11,11 +12,21 @@ The `tiup cluster stop` command is used to stop all services or some services of > If the core services of a cluster are stopped, the cluster cannot provide services anymore. ## Syntax +======= +命令 `tiup cluster stop` 用于停止指定集群的所有服务或部分服务。 + +> **注意:** +> +> 核心服务停止后集群将无法提供服务。 + +## 语法 +>>>>>>> Stashed changes ```sh tiup cluster stop [flags] ``` +<<<<<<< Updated upstream ``` 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). ## Options @@ -49,3 +60,32 @@ Default: []. If this option is not specified in the command, the command stops a ## Output The output contains the stopping logs. +======= +`` 为要操作的集群名字,如果忘记集群名字可通过[集群列表](/tiup/tiup-component-cluster-list.md)查看。 + +## 选项 + +### -N, --node(strings,默认为 [],表示所有节点) + +指定要停止的节点,不指定则表示所有节点。该选项的值为以逗号分割的节点 ID 列表,节点 ID 为[集群状态](/tiup/tiup-component-cluster-display.md)表格的第一列。 + +> **注意:** +> +> 若同时指定了 `-R, --role`,那么将停止它们的交集中的服务。 + +### -R, --role strings(strings,默认为 [],表示所有角色) + +指定要停止的角色,不指定则表示所有角色。该选项的值为以逗号分割的节点角色列表,角色为[集群状态](/tiup/tiup-component-cluster-display.md)表格的第二列。 + +> **注意:** +> +> 若同时指定了 `-N, --node`,那么将停止它们的交集中的服务。 + +### -h, --help(boolean,默认 false) + +输出帮助信息。 + +## 输出 + +停止服务的日志。 +>>>>>>> Stashed changes From a07bbf409510143cdafc755254f389209a664241 Mon Sep 17 00:00:00 2001 From: qiancai Date: Mon, 12 Apr 2021 14:35:37 +0800 Subject: [PATCH 03/20] Create tiup-component-cluster.md --- tiup/tiup-component-cluster.md | 83 ++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 tiup/tiup-component-cluster.md diff --git a/tiup/tiup-component-cluster.md b/tiup/tiup-component-cluster.md new file mode 100644 index 0000000000000..84a1c526be4f6 --- /dev/null +++ b/tiup/tiup-component-cluster.md @@ -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 tasks, 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 command name as in the following command list: + +## 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. + +- The option is enabled by default with `builtin` (the default value) passed in. + +### --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. + +### --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. + +### -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) + +- 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 + +- [import](/tiup/tiup-component-cluster-import.md): import 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 help information From 45c942d2b10d1106a130611b874dcb95c7da5317 Mon Sep 17 00:00:00 2001 From: qiancai Date: Mon, 12 Apr 2021 14:45:55 +0800 Subject: [PATCH 04/20] Update tiup-component-cluster-stop.md --- tiup/tiup-component-cluster-stop.md | 40 ----------------------------- 1 file changed, 40 deletions(-) diff --git a/tiup/tiup-component-cluster-stop.md b/tiup/tiup-component-cluster-stop.md index 137bc2bbc69ae..ab911b6ee5000 100644 --- a/tiup/tiup-component-cluster-stop.md +++ b/tiup/tiup-component-cluster-stop.md @@ -4,7 +4,6 @@ title: tiup cluster stop # tiup cluster stop -<<<<<<< Updated upstream The `tiup cluster stop` command is used to stop all services or some services of the specified cluster. > **Note:** @@ -12,21 +11,11 @@ The `tiup cluster stop` command is used to stop all services or some services of > If the core services of a cluster are stopped, the cluster cannot provide services anymore. ## Syntax -======= -命令 `tiup cluster stop` 用于停止指定集群的所有服务或部分服务。 - -> **注意:** -> -> 核心服务停止后集群将无法提供服务。 - -## 语法 ->>>>>>> Stashed changes ```sh tiup cluster stop [flags] ``` -<<<<<<< Updated upstream ``` 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). ## Options @@ -60,32 +49,3 @@ Default: []. If this option is not specified in the command, the command stops a ## Output The output contains the stopping logs. -======= -`` 为要操作的集群名字,如果忘记集群名字可通过[集群列表](/tiup/tiup-component-cluster-list.md)查看。 - -## 选项 - -### -N, --node(strings,默认为 [],表示所有节点) - -指定要停止的节点,不指定则表示所有节点。该选项的值为以逗号分割的节点 ID 列表,节点 ID 为[集群状态](/tiup/tiup-component-cluster-display.md)表格的第一列。 - -> **注意:** -> -> 若同时指定了 `-R, --role`,那么将停止它们的交集中的服务。 - -### -R, --role strings(strings,默认为 [],表示所有角色) - -指定要停止的角色,不指定则表示所有角色。该选项的值为以逗号分割的节点角色列表,角色为[集群状态](/tiup/tiup-component-cluster-display.md)表格的第二列。 - -> **注意:** -> -> 若同时指定了 `-N, --node`,那么将停止它们的交集中的服务。 - -### -h, --help(boolean,默认 false) - -输出帮助信息。 - -## 输出 - -停止服务的日志。 ->>>>>>> Stashed changes From 69b5f4696f571542bbd72af107db6291f2ba2c51 Mon Sep 17 00:00:00 2001 From: qiancai Date: Mon, 12 Apr 2021 14:46:53 +0800 Subject: [PATCH 05/20] Update tiup-component-cluster-start.md --- tiup/tiup-component-cluster-start.md | 36 ---------------------------- 1 file changed, 36 deletions(-) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index 8fc588ca2f89b..2792d234f4fb3 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -1,12 +1,6 @@ -<<<<<<< Updated upstream --- title: tiup cluster start --- -======= --- -title: tiup cluster start --- ->>>>>>> Stashed changes # tiup cluster start @@ -18,7 +12,6 @@ The `tiup cluster start` command is used to start all services or some services tiup cluster start [flags] ``` -<<<<<<< Updated upstream ``` 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). ## Options @@ -52,32 +45,3 @@ Default: []. If this option is not specified in the command, the command starts ## Output The output contains the starting logs. -======= -``` is the name of the cluster to be operated on. If you forget the cluster name, check it in [tiup cluster list](/tiup/tiup-component-cluster-list.md). - -## Options - -### -N, --node (strings, default is [] for all nodes) - -Specifies the nodes to start, or all nodes if not specified. The value of this option is a comma-separated list of node IDs, with the node IDs being the first column of the [cluster status](/tiup/tiup-component-cluster-display.md) table. - -> **Note:** -> -> If `-R, --role` is also specified, then the services in their intersection will be started. - -### -R, --role strings (strings, default [], means all roles) - -Specify the roles to be started, or all roles if not specified. The value of this option is a comma-separated list of node roles, with the roles being the second column of the [cluster status](/tiup/tiup-component-cluster-display.md) table. - -> **Note:** -> -> If `-N, --node` is also specified, then the services in their intersection will be started. - -### -h, --help (boolean, default false) - -Output help information. - -## Output - -Start log. ->>>>>>> Stashed changes From 0251bd7cb3672e773c955738afee5edbec79e19d Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Mon, 12 Apr 2021 18:26:08 +0800 Subject: [PATCH 06/20] Update tiup/tiup-component-cluster-start.md --- tiup/tiup-component-cluster-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index 2792d234f4fb3..657aeba282f3a 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -12,7 +12,7 @@ The `tiup cluster start` command is used to start all services or some services tiup cluster start [flags] ``` -``` 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). +`` 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). ## Options From 17f4aafdaea14e83c2bb8b88129aff9351aba3f8 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Tue, 13 Apr 2021 10:38:55 +0800 Subject: [PATCH 07/20] Update tiup/tiup-component-cluster.md --- tiup/tiup-component-cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster.md b/tiup/tiup-component-cluster.md index 84a1c526be4f6..f9e39dac25ef1 100644 --- a/tiup/tiup-component-cluster.md +++ b/tiup/tiup-component-cluster.md @@ -51,7 +51,7 @@ tiup cluster [command] [flags] - 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) +### -h, --help - Prints the help information of the related commands. - Data type: `BOOLEAN` From 74f8b7c6dee4f6b6d0168c1c3f019f514fd55deb Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 15 Apr 2021 15:17:19 +0800 Subject: [PATCH 08/20] Update tiup/tiup-component-cluster-start.md Co-authored-by: JoyinQ <56883733+Joyinqin@users.noreply.github.com> --- tiup/tiup-component-cluster-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index 657aeba282f3a..d9c37d8ab8478 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -8,7 +8,7 @@ The `tiup cluster start` command is used to start all services or some services ## Syntax -```sh +```shell tiup cluster start [flags] ``` From b113edc75535951ea65c1a29d92f3fb39922c53d Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 15 Apr 2021 15:17:38 +0800 Subject: [PATCH 09/20] Update tiup/tiup-component-cluster-start.md Co-authored-by: JoyinQ <56883733+Joyinqin@users.noreply.github.com> --- tiup/tiup-component-cluster-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index d9c37d8ab8478..f5296473b804f 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -12,7 +12,7 @@ The `tiup cluster start` command is used to start all services or some services tiup cluster start [flags] ``` -`` 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). +`` 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 From 90ce11d075111eeda00f50d07cecbbf706e59d16 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 15 Apr 2021 15:18:16 +0800 Subject: [PATCH 10/20] Update tiup/tiup-component-cluster-stop.md Co-authored-by: JoyinQ <56883733+Joyinqin@users.noreply.github.com> --- tiup/tiup-component-cluster-stop.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-stop.md b/tiup/tiup-component-cluster-stop.md index ab911b6ee5000..e98bebca7afbe 100644 --- a/tiup/tiup-component-cluster-stop.md +++ b/tiup/tiup-component-cluster-stop.md @@ -48,4 +48,4 @@ Default: []. If this option is not specified in the command, the command stops a ## Output -The output contains the stopping logs. +The log of stopping the service. From 37f29b6232d14386cca0644b38855406835e65d9 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 15 Apr 2021 15:22:36 +0800 Subject: [PATCH 11/20] Apply suggestions from code review Co-authored-by: JoyinQ <56883733+Joyinqin@users.noreply.github.com> --- tiup/tiup-component-cluster-start.md | 2 +- tiup/tiup-component-cluster-stop.md | 4 ++-- tiup/tiup-component-cluster.md | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index f5296473b804f..4e950b6f47c59 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -44,4 +44,4 @@ Default: []. If this option is not specified in the command, the command starts ## Output -The output contains the starting logs. +The log of starting the service. diff --git a/tiup/tiup-component-cluster-stop.md b/tiup/tiup-component-cluster-stop.md index e98bebca7afbe..02eed3e78804c 100644 --- a/tiup/tiup-component-cluster-stop.md +++ b/tiup/tiup-component-cluster-stop.md @@ -12,11 +12,11 @@ The `tiup cluster stop` command is used to stop all services or some services of ## Syntax -```sh +```shell tiup cluster stop [flags] ``` -``` 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). +`` 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 diff --git a/tiup/tiup-component-cluster.md b/tiup/tiup-component-cluster.md index f9e39dac25ef1..d324b9a02ba91 100644 --- a/tiup/tiup-component-cluster.md +++ b/tiup/tiup-component-cluster.md @@ -1,10 +1,10 @@ --- -title: TiUP cluster +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 tasks, including deploying, starting, shutting down, destroying, elastic scaling, upgrading TiDB clusters, and managing TiDB cluster parameters. +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 @@ -12,7 +12,7 @@ TiUP Cluster is a cluster management component of TiUP written in Golang. You ca tiup cluster [command] [flags] ``` -`[command]` is the command name as in the following command list: +`[command]` is the name of the command. For the list of supported commands, refer to the [command list](#command-list) below. ## Options @@ -57,9 +57,9 @@ tiup cluster [command] [flags] - 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 +## Command list -- [import](/tiup/tiup-component-cluster-import.md): import a cluster deployed by Ansible +- [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 @@ -80,4 +80,4 @@ tiup cluster [command] [flags] - [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 +- [help](/tiup/tiup-component-cluster-help.md): print the help information From de2ebe92222fc49ad7af9372fc87966c027d0bd6 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 15 Apr 2021 15:49:13 +0800 Subject: [PATCH 12/20] Update tiup/tiup-component-cluster-start.md Co-authored-by: JoyinQ <56883733+Joyinqin@users.noreply.github.com> --- tiup/tiup-component-cluster-start.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index 4e950b6f47c59..ff378ed7abe99 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -18,13 +18,13 @@ tiup cluster start [flags] ### -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. +- Specifies the nodes to be started. If not specified, all nodes are started. 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: `STRING` +- Default: `[]`. If this option is not specified in the command, all nodes are started. > **Note:** -> -> If `-R, --role` is also specified, only the services in the intersection of the specified nodes and roles will be started. +> +> If the `-R, --role` option is specified at the same time, then the services in their intersection are started. ### -R, --role strings From aa532b4a2e8f83a9516d1d9f35268502e0c857dc Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 15 Apr 2021 16:40:21 +0800 Subject: [PATCH 13/20] Update tiup/tiup-component-cluster-start.md Co-authored-by: JoyinQ <56883733+Joyinqin@users.noreply.github.com> --- tiup/tiup-component-cluster-start.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index ff378ed7abe99..03bcb69c98b92 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -26,15 +26,15 @@ tiup cluster start [flags] > > If the `-R, --role` option is specified at the same time, then the services in their intersection are started. -### -R, --role strings +### -R, --role -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. +- Specifies the roles to be started. If not specified, all roles are started. 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: `STRING` +- Default: `[]`. If this option is not specified in the command, all roles are started. > **Note:** -> -> If `-N, --node` is also specified, only the services in the intersection of the specified nodes and roles will be started. +> +> If the `-N, --node` option is specified at the same time, the services in their intersection are started. ### -h, --help From 7b3974a83aefd002a8237d3c527d6633e149c12a Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 15 Apr 2021 16:40:38 +0800 Subject: [PATCH 14/20] Apply suggestions from code review Co-authored-by: JoyinQ <56883733+Joyinqin@users.noreply.github.com> --- tiup/tiup-component-cluster.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tiup/tiup-component-cluster.md b/tiup/tiup-component-cluster.md index d324b9a02ba91..420201ec84393 100644 --- a/tiup/tiup-component-cluster.md +++ b/tiup/tiup-component-cluster.md @@ -26,7 +26,7 @@ tiup cluster [command] [flags] - `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. -- The option is enabled by default with `builtin` (the default value) passed in. +- If this option is not specified in the command, `builtin` is used as the default value. ### --ssh-timeout @@ -38,7 +38,7 @@ tiup cluster [command] [flags] - 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. +- If this option is not specified in the command, the maximum waiting time for each step is `120` seconds. ### -y, --yes From 2c0aef8f386a808388633a2392b9b2f931247727 Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Thu, 15 Apr 2021 16:40:46 +0800 Subject: [PATCH 15/20] Apply suggestions from code review Co-authored-by: JoyinQ <56883733+Joyinqin@users.noreply.github.com> --- tiup/tiup-component-cluster.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster.md b/tiup/tiup-component-cluster.md index 420201ec84393..70a0813b598f4 100644 --- a/tiup/tiup-component-cluster.md +++ b/tiup/tiup-component-cluster.md @@ -32,7 +32,7 @@ tiup cluster [command] [flags] - Specifies the SSH connection timeout in seconds. - Data type: `UINT` -- The option is enabled by default with `5` seconds (the default value) passed in. +- If this option is not specified in the command, the default timeout is `5` seconds. ### --wait-timeout From 9a180735d334da848373794a24f56df4b3505f66 Mon Sep 17 00:00:00 2001 From: qiancai Date: Thu, 15 Apr 2021 17:00:12 +0800 Subject: [PATCH 16/20] Apply review comments --- tiup/tiup-component-cluster-start.md | 10 +++++----- tiup/tiup-component-cluster-stop.md | 10 +++++----- tiup/tiup-component-cluster.md | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index 03bcb69c98b92..18b41d8078f41 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -12,29 +12,29 @@ The `tiup cluster start` command is used to start all services or some services tiup cluster start [flags] ``` -`` 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. +`` 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 started. If not specified, all nodes are started. 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. +- 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, all nodes are started. > **Note:** > -> If the `-R, --role` option is specified at the same time, then the services in their intersection are started. +> 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 -- Specifies the roles to be started. If not specified, all roles are started. 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. +- 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, all roles are started. > **Note:** > -> If the `-N, --node` option is specified at the same time, the services in their intersection are started. +> 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 diff --git a/tiup/tiup-component-cluster-stop.md b/tiup/tiup-component-cluster-stop.md index 02eed3e78804c..3500da30b88aa 100644 --- a/tiup/tiup-component-cluster-stop.md +++ b/tiup/tiup-component-cluster-stop.md @@ -22,23 +22,23 @@ tiup cluster stop [flags] ### -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. +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 `-R, --role` is also specified, only the services in the intersection of the specified nodes and roles are stopped. +> 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 strings +### -R, --role -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. +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 `-N, --node` is also specified, only the services in the intersection of the specified nodes and roles are stopped. +> 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 diff --git a/tiup/tiup-component-cluster.md b/tiup/tiup-component-cluster.md index 70a0813b598f4..b75e91920ae1b 100644 --- a/tiup/tiup-component-cluster.md +++ b/tiup/tiup-component-cluster.md @@ -12,7 +12,7 @@ TiUP Cluster is a cluster management component of TiUP written in Golang. You ca tiup cluster [command] [flags] ``` -`[command]` is the name of the command. For the list of supported commands, refer to the [command list](#command-list) below. +`[command]` is the name of the command. For the supported commands, refer to the [command list](#command-list) below. ## Options From e093a1b38d414905d41e016f1c6a4e8bd30a591f Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Fri, 16 Apr 2021 11:54:54 +0800 Subject: [PATCH 17/20] Update tiup/tiup-component-cluster.md Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- tiup/tiup-component-cluster.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tiup/tiup-component-cluster.md b/tiup/tiup-component-cluster.md index b75e91920ae1b..fc0732941eba1 100644 --- a/tiup/tiup-component-cluster.md +++ b/tiup/tiup-component-cluster.md @@ -22,9 +22,9 @@ tiup cluster [command] [flags] - 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. + - `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. - If this option is not specified in the command, `builtin` is used as the default value. From ff3167ce604e3ea5fdeae4f595f04033589fe969 Mon Sep 17 00:00:00 2001 From: qiancai Date: Fri, 16 Apr 2021 12:13:20 +0800 Subject: [PATCH 18/20] fixed the broken links --- tiup/tiup-component-cluster.md | 48 ++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/tiup/tiup-component-cluster.md b/tiup/tiup-component-cluster.md index fc0732941eba1..bd46f9aa8eed6 100644 --- a/tiup/tiup-component-cluster.md +++ b/tiup/tiup-component-cluster.md @@ -59,25 +59,29 @@ tiup cluster [command] [flags] ## 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 +- import: imports a cluster deployed by Ansible + +- check: checks a cluster before and after the deployment + +- [deploy](/tiup/tiup-component-cluster-deploy.md): deploys a cluster based on a specified topology +- [list](/tiup/tiup-component-cluster-list.md): queries the list of deployed clusters +- [display](/tiup/tiup-component-cluster-display.md): displays the status of a specified cluster +- [start](/tiup/tiup-component-cluster-start.md): starts a specified cluster +- [stop](/tiup/tiup-component-cluster-stop.md): stops a specified cluster +- restart: restarts a specified cluster + +- scale-in: scales in a specified cluster + +- [scale-out](/tiup/tiup-component-cluster-scale-out.md): scales out a specified cluster +- [upgrade](/tiup/tiup-component-cluster-upgrade.md): upgrades a specified cluster +- [prune](/tiup/tiup-component-cluster-prune.md): cleans up the instances in the Tombstone status for a specified cluster +- [edit-config](/tiup/tiup-component-cluster-edit-config.md): modifies the configuration of a specified cluster +- [reload](/tiup/tiup-component-cluster-reload.md): reloads the configuration of a specified cluster +- [patch](/tiup/tiup-component-cluster-patch.md): replaces a service in a deployed cluster + +- [clean](/tiup/tiup-component-cluster-clean.md): deletes data from the specified cluster +- [destroy](/tiup/tiup-component-cluster-destroy.md): destroys a specified cluster +- [audit](/tiup/tiup-component-cluster-audit.md): queries the operation audit log of a specified cluster +- [enable](/tiup/tiup-component-cluster-enable.md): enables a specified cluster or service to start on boot +- [disable](/tiup/tiup-component-cluster-disable.md): disables a specified cluster or service to start on boot +- [help](/tiup/tiup-component-cluster-help.md): prints the help information From 0b799c4e6f831a52392a7dc6bdeda4cbd78fa312 Mon Sep 17 00:00:00 2001 From: qiancai Date: Fri, 16 Apr 2021 12:18:35 +0800 Subject: [PATCH 19/20] fixed the lint issues --- tiup/tiup-component-cluster-stop.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tiup/tiup-component-cluster-stop.md b/tiup/tiup-component-cluster-stop.md index 3500da30b88aa..48689e708a2fb 100644 --- a/tiup/tiup-component-cluster-stop.md +++ b/tiup/tiup-component-cluster-stop.md @@ -22,9 +22,9 @@ tiup cluster stop [flags] ### -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. +- 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:** > @@ -32,9 +32,9 @@ Default: []. If this option is not specified in the command, the command stops a ### -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. +- Specifies 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:** > From 213c32fd0d954fe47dd982827066cfd7618c88ea Mon Sep 17 00:00:00 2001 From: Grace Cai Date: Fri, 16 Apr 2021 17:07:03 +0800 Subject: [PATCH 20/20] Apply suggestions from code review Co-authored-by: SIGSEGV --- tiup/tiup-component-cluster-start.md | 4 ++-- tiup/tiup-component-cluster-stop.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tiup/tiup-component-cluster-start.md b/tiup/tiup-component-cluster-start.md index 18b41d8078f41..de41844f773f9 100644 --- a/tiup/tiup-component-cluster-start.md +++ b/tiup/tiup-component-cluster-start.md @@ -18,7 +18,7 @@ tiup cluster start [flags] ### -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. +- 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. - Data type: `STRING` - Default: `[]`. If this option is not specified in the command, all nodes are started. @@ -28,7 +28,7 @@ tiup cluster start [flags] ### -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. +- 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. - Data type: `STRING` - Default: `[]`. If this option is not specified in the command, all roles are started. diff --git a/tiup/tiup-component-cluster-stop.md b/tiup/tiup-component-cluster-stop.md index 48689e708a2fb..a7bbe4510114a 100644 --- a/tiup/tiup-component-cluster-stop.md +++ b/tiup/tiup-component-cluster-stop.md @@ -22,7 +22,7 @@ tiup cluster stop [flags] ### -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. +- 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. - Data type: `STRING` - Default: []. If this option is not specified in the command, the command stops all the nodes. @@ -32,7 +32,7 @@ tiup cluster stop [flags] ### -R, --role -- Specifies 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. +- 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. - Data type: `STRING` - Default: []. If this option is not specified in the command, the command stops all the roles.