From a760c5fe4c68dc250249864fd5de787b31d4a205 Mon Sep 17 00:00:00 2001 From: Joyinqin Date: Tue, 6 Apr 2021 18:20:55 +0800 Subject: [PATCH 1/7] add 3 docs --- tiup/tiup-component-cluster-deploy.md | 2 +- tiup/tiup-component-cluster-help.md | 25 ++++++++++++ tiup/tiup-component-cluster-prune.md | 25 ++++++++++++ tiup/tiup-component-cluster-upgrade.md | 54 ++++++++++++++++++++++++++ 4 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 tiup/tiup-component-cluster-help.md create mode 100644 tiup/tiup-component-cluster-prune.md create mode 100644 tiup/tiup-component-cluster-upgrade.md diff --git a/tiup/tiup-component-cluster-deploy.md b/tiup/tiup-component-cluster-deploy.md index 9b2ee76bc8c71..c9324f63b905e 100644 --- a/tiup/tiup-component-cluster-deploy.md +++ b/tiup/tiup-component-cluster-deploy.md @@ -50,7 +50,7 @@ tiup cluster deploy [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` diff --git a/tiup/tiup-component-cluster-help.md b/tiup/tiup-component-cluster-help.md new file mode 100644 index 0000000000000..1b11b35b01b47 --- /dev/null +++ b/tiup/tiup-component-cluster-help.md @@ -0,0 +1,25 @@ +--- +title: tiup cluster help +--- + +# tiup cluster help + +tiup-cluster provides a wealth of help information for users in the command line interface. You can obtain it via the `help` command or the `--help` option. `tiup cluster help ` is basically equivalent to `tiup cluster --help`. + +## Syntax + +```shell +tiup cluster help [command] [flags] +``` + +`[command]` is used to specify the help information of which command that users need to view. If it is not specified, the help information of tiup-cluster is viewed. + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +The help information of the `[command]` or tiup-cluster. \ No newline at end of file diff --git a/tiup/tiup-component-cluster-prune.md b/tiup/tiup-component-cluster-prune.md new file mode 100644 index 0000000000000..7ce872e219c49 --- /dev/null +++ b/tiup/tiup-component-cluster-prune.md @@ -0,0 +1,25 @@ +--- +title: tiup cluster prune +--- + +# tiup cluster prune + +When [scaling in the cluster](/tiup/tiup-component-cluster-scale-in.md), for some components, the service is not immediately stopped and the data is deleted, but you need to wait for the data scheduling to complete and then manually execute the `tiup cluster prune` command to clean up. + +## Syntax + +```shell +tiup cluster prune [flags] +``` + +## Option + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +The log of the cleanup process. \ No newline at end of file diff --git a/tiup/tiup-component-cluster-upgrade.md b/tiup/tiup-component-cluster-upgrade.md new file mode 100644 index 0000000000000..3b2510ce8f7b2 --- /dev/null +++ b/tiup/tiup-component-cluster-upgrade.md @@ -0,0 +1,54 @@ +--- +title: tiup cluster upgrade +--- + +# tiup cluster upgrade + +The `tiup cluster upgrade` command is used to upgrade the specified cluster to a specific version. + +## Syntax + +```shell +tiup cluster upgrade [flags] +``` + +- ``: the cluster name to operate. If you forget the cluster name, you can check it through [cluster list](/tiup/tiup-component-cluster-list.md). +- ``: the target version to upgrade to. Currently, it is only allowed to upgrade to a version higher than the current cluster, and is not allowed to upgrade to a version lower than the current cluster, that is, no downgrade is allowed. It is also not allowed to upgrade to the nightly version. + +## Options + +### --force + +- To upgrade the cluster, you need to ensure that the cluster is currently started. In some cases, you might want to upgrade when the cluster is not started. At this time, you can use `--force` to ignore the error during the upgrade, forcibly replace the binary file and start the cluster. +- Data type: `BOOLEAN` +- Default: false + +> **Note:** +> +> Forcing an upgrade of the cluster that is providing services might result in unavailability of cluster services. Clusters are started automatically after a successful upgrade. + +### --transfer-timeout + +- When upgrading PD or TiKV, the leader of the upgraded node is migrated to other nodes first. The migration process takes some time, and you can set the maximum wait time (in seconds) by the `-transfer-timeout` option. After the timeout, the wait is skipped and the service is upgraded directly. +- Data type: `uint` +- Default: 300 + +> **Note:** +> +> If the wait is skipped and the service is upgraded directly, the service performance might jitter. + +### --ignore-config-check + +- After the binary is updated, a configuration check is performed on the TiDB, TiKV and PD components using ` --config-check `. `` is the path to the newly deployed binary and `` is the configuration file generated based on the user configuration. You can use this option if you want to skip this check. +- Data type: `BOOLEAN` +- Default: false + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +The log of the upgrade service. From 54fd085f4f1172d793d4667d81e8718ee1edefcb Mon Sep 17 00:00:00 2001 From: Joyinqin Date: Tue, 6 Apr 2021 18:24:19 +0800 Subject: [PATCH 2/7] Update tiup-component-cluster-upgrade.md --- tiup/tiup-component-cluster-upgrade.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-upgrade.md b/tiup/tiup-component-cluster-upgrade.md index 3b2510ce8f7b2..c4e1b1bdf0638 100644 --- a/tiup/tiup-component-cluster-upgrade.md +++ b/tiup/tiup-component-cluster-upgrade.md @@ -39,7 +39,7 @@ tiup cluster upgrade [flags] ### --ignore-config-check -- After the binary is updated, a configuration check is performed on the TiDB, TiKV and PD components using ` --config-check `. `` is the path to the newly deployed binary and `` is the configuration file generated based on the user configuration. You can use this option if you want to skip this check. +- After the binary is updated, a configuration check is performed on the TiDB, TiKV and PD components using ` --config-check `. `` is the path to the newly deployed binary and `` is the configuration file generated based on the user configuration. To skip this check, you can use the `--ignore-config-check` option. - Data type: `BOOLEAN` - Default: false From 7e8bc88a605306cba13a62d01160800e95620c3e Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Wed, 7 Apr 2021 11:35:58 +0800 Subject: [PATCH 3/7] Apply suggestions from code review Co-authored-by: Ran --- tiup/tiup-component-cluster-prune.md | 4 ++-- tiup/tiup-component-cluster-upgrade.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tiup/tiup-component-cluster-prune.md b/tiup/tiup-component-cluster-prune.md index 7ce872e219c49..de2b81008becb 100644 --- a/tiup/tiup-component-cluster-prune.md +++ b/tiup/tiup-component-cluster-prune.md @@ -4,7 +4,7 @@ title: tiup cluster prune # tiup cluster prune -When [scaling in the cluster](/tiup/tiup-component-cluster-scale-in.md), for some components, the service is not immediately stopped and the data is deleted, but you need to wait for the data scheduling to complete and then manually execute the `tiup cluster prune` command to clean up. +When [scaling in the cluster](/tiup/tiup-component-cluster-scale-in.md), for some components, TiUP does not immediately stop their services or delete their data. You need to wait for the data scheduling to complete and then manually execute the `tiup cluster prune` command to clean up. ## Syntax @@ -22,4 +22,4 @@ tiup cluster prune [flags] ## Output -The log of the cleanup process. \ No newline at end of file +The log of the cleanup process. diff --git a/tiup/tiup-component-cluster-upgrade.md b/tiup/tiup-component-cluster-upgrade.md index c4e1b1bdf0638..6fa9f2df99679 100644 --- a/tiup/tiup-component-cluster-upgrade.md +++ b/tiup/tiup-component-cluster-upgrade.md @@ -12,7 +12,7 @@ The `tiup cluster upgrade` command is used to upgrade the specified cluster to a tiup cluster upgrade [flags] ``` -- ``: the cluster name to operate. If you forget the cluster name, you can check it through [cluster list](/tiup/tiup-component-cluster-list.md). +- ``: the cluster name to operate on. If you forget the cluster name, you can check it in the [cluster list](/tiup/tiup-component-cluster-list.md). - ``: the target version to upgrade to. Currently, it is only allowed to upgrade to a version higher than the current cluster, and is not allowed to upgrade to a version lower than the current cluster, that is, no downgrade is allowed. It is also not allowed to upgrade to the nightly version. ## Options @@ -25,7 +25,7 @@ tiup cluster upgrade [flags] > **Note:** > -> Forcing an upgrade of the cluster that is providing services might result in unavailability of cluster services. Clusters are started automatically after a successful upgrade. +> Forcing an upgrade of the cluster that is providing services might result in service unavailability. Unstarted clusters are started automatically after a successful upgrade. ### --transfer-timeout @@ -39,7 +39,7 @@ tiup cluster upgrade [flags] ### --ignore-config-check -- After the binary is updated, a configuration check is performed on the TiDB, TiKV and PD components using ` --config-check `. `` is the path to the newly deployed binary and `` is the configuration file generated based on the user configuration. To skip this check, you can use the `--ignore-config-check` option. +- After the binary is updated, a configuration check is performed on the TiDB, TiKV and PD components using ` --config-check `. `` is the path to the newly deployed binary and `` is the configuration file generated based on the user configuration. To skip this check, you can use the `--ignore-config-check` option. - Data type: `BOOLEAN` - Default: false From fa4c3a08b625b94467161d5d55cefc4d43416339 Mon Sep 17 00:00:00 2001 From: Joyinqin Date: Fri, 9 Apr 2021 10:47:57 +0800 Subject: [PATCH 4/7] Update tiup-component-cluster-upgrade.md --- tiup/tiup-component-cluster-upgrade.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-upgrade.md b/tiup/tiup-component-cluster-upgrade.md index 6fa9f2df99679..d2e628696e9ab 100644 --- a/tiup/tiup-component-cluster-upgrade.md +++ b/tiup/tiup-component-cluster-upgrade.md @@ -12,7 +12,7 @@ The `tiup cluster upgrade` command is used to upgrade the specified cluster to a tiup cluster upgrade [flags] ``` -- ``: the cluster name to operate on. If you forget the cluster name, you can check it in the [cluster list](/tiup/tiup-component-cluster-list.md). +- ``: the cluster name to operate on. If you forget the cluster name, you can check it with the [cluster list](/tiup/tiup-component-cluster-list.md) command. - ``: the target version to upgrade to. Currently, it is only allowed to upgrade to a version higher than the current cluster, and is not allowed to upgrade to a version lower than the current cluster, that is, no downgrade is allowed. It is also not allowed to upgrade to the nightly version. ## Options From 8541fc245cb64952173f16c1fc8ce0eecced8124 Mon Sep 17 00:00:00 2001 From: Joyinqin Date: Thu, 15 Apr 2021 14:01:00 +0800 Subject: [PATCH 5/7] hide the link --- tiup/tiup-component-cluster-prune.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-prune.md b/tiup/tiup-component-cluster-prune.md index de2b81008becb..cebbb93cb3b2d 100644 --- a/tiup/tiup-component-cluster-prune.md +++ b/tiup/tiup-component-cluster-prune.md @@ -4,7 +4,7 @@ title: tiup cluster prune # tiup cluster prune -When [scaling in the cluster](/tiup/tiup-component-cluster-scale-in.md), for some components, TiUP does not immediately stop their services or delete their data. You need to wait for the data scheduling to complete and then manually execute the `tiup cluster prune` command to clean up. +When [scaling in the cluster], for some components, TiUP does not immediately stop their services or delete their data. You need to wait for the data scheduling to complete and then manually execute the `tiup cluster prune` command to clean up. ## Syntax From 1887da8e35ebadd182cbcba0b4e24adefe4a9803 Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Thu, 15 Apr 2021 15:21:37 +0800 Subject: [PATCH 6/7] Apply suggestions from code review Co-authored-by: SIGSEGV --- tiup/tiup-component-cluster-upgrade.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-upgrade.md b/tiup/tiup-component-cluster-upgrade.md index d2e628696e9ab..8464b71dfca2a 100644 --- a/tiup/tiup-component-cluster-upgrade.md +++ b/tiup/tiup-component-cluster-upgrade.md @@ -13,7 +13,7 @@ tiup cluster upgrade [flags] ``` - ``: the cluster name to operate on. If you forget the cluster name, you can check it with the [cluster list](/tiup/tiup-component-cluster-list.md) command. -- ``: the target version to upgrade to. Currently, it is only allowed to upgrade to a version higher than the current cluster, and is not allowed to upgrade to a version lower than the current cluster, that is, no downgrade is allowed. It is also not allowed to upgrade to the nightly version. +- ``: the target version to upgrade to. Currently, it is only allowed to upgrade to a version higher than the current cluster, that is, no downgrade is allowed. It is also not allowed to upgrade to the nightly version. ## Options From c5d1d7f9c06508d3614a811694d5c1afe21f862f Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Thu, 15 Apr 2021 15:30:55 +0800 Subject: [PATCH 7/7] Apply suggestions from code review Co-authored-by: SIGSEGV --- tiup/tiup-component-cluster-upgrade.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiup/tiup-component-cluster-upgrade.md b/tiup/tiup-component-cluster-upgrade.md index 8464b71dfca2a..2108f62be22a4 100644 --- a/tiup/tiup-component-cluster-upgrade.md +++ b/tiup/tiup-component-cluster-upgrade.md @@ -51,4 +51,4 @@ tiup cluster upgrade [flags] ## Output -The log of the upgrade service. +The log of the upgrading progress.