From 5a877eacd29c342ab69128f02f9583a64e617629 Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Thu, 15 Apr 2021 16:43:55 +0800 Subject: [PATCH] cherry pick #5221 to release-5.0 Signed-off-by: ti-srebot --- 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 552edcefba0c5..d81e7542bc74c 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..cebbb93cb3b2d --- /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], 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 + +```shell +tiup cluster prune [flags] +``` + +## Option + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +The log of the cleanup process. diff --git a/tiup/tiup-component-cluster-upgrade.md b/tiup/tiup-component-cluster-upgrade.md new file mode 100644 index 0000000000000..2108f62be22a4 --- /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 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, 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 service unavailability. Unstarted 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. To skip this check, you can use the `--ignore-config-check` option. +- Data type: `BOOLEAN` +- Default: false + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +The log of the upgrading progress.