diff --git a/tiup/tiup-command-help.md b/tiup/tiup-command-help.md index c67b9332eab9b..ea59b6bdd4733 100644 --- a/tiup/tiup-command-help.md +++ b/tiup/tiup-command-help.md @@ -8,7 +8,7 @@ The TiUP command-line interface provides users with a wealth of help information ## Syntax -```sh +```shell tiup help [command] ``` diff --git a/tiup/tiup-component-cluster-deploy.md b/tiup/tiup-component-cluster-deploy.md index 9b2ee76bc8c71..72ebbd0c1431b 100644 --- a/tiup/tiup-component-cluster-deploy.md +++ b/tiup/tiup-component-cluster-deploy.md @@ -28,11 +28,11 @@ tiup cluster deploy [flags] - Specifies the key file used to connect to the target machine. - Data type: `STRING` -- Default: `~/.ssh/id_rsa` +- If this option is not specified in the command, the `~/.ssh/id_rsa` file is used to connect to the target machine by default. ### -p, --password -- Specifies the password used to connect to the target machine. Do not use it with `-i/--identity_file` at the same time. +- Specifies the password used to connect to the target machine. Do not use this option with `-i/--identity_file` at the same time. - Data type: `BOOLEAN` - Default: false diff --git a/tiup/tiup-component-cluster-destroy.md b/tiup/tiup-component-cluster-destroy.md index fa6402bb00086..03d2883aa3d6c 100644 --- a/tiup/tiup-component-cluster-destroy.md +++ b/tiup/tiup-component-cluster-destroy.md @@ -12,7 +12,7 @@ After an application goes offline, if you want to release the machines occupied ## Syntax -```sh +```shell tiup cluster destroy [flags] ``` diff --git a/tiup/tiup-component-cluster-edit-config.md b/tiup/tiup-component-cluster-edit-config.md index 541130cc61ed6..ad7891d16f88e 100644 --- a/tiup/tiup-component-cluster-edit-config.md +++ b/tiup/tiup-component-cluster-edit-config.md @@ -13,7 +13,7 @@ If you need to modify the cluster configuration after the cluster is deployed, y ## Syntax -```sh +```shell tiup cluster edit-config [flags] ``` diff --git a/tiup/tiup-component-dm-edit-config.md b/tiup/tiup-component-dm-edit-config.md new file mode 100644 index 0000000000000..a125478902a2e --- /dev/null +++ b/tiup/tiup-component-dm-edit-config.md @@ -0,0 +1,33 @@ +--- +title: tiup dm edit-config +--- + +# tiup dm edit-config + +If you need to modify the cluster service configuration after the cluster is deployed, you can use the `tiup dm edit-config` command that starts an editor for you to modify the [topology file]. of the specified cluster. This editor is specified in the `$EDITOR` environment variable by default. If the `$EDITOR` environment variable does not exist, the `vi` editor is used. + +> **Note:** +> +> + When you modify the configuration, you cannot add or delete machines. For how to add machines, see [Scale out a cluster](/tiup/tiup-component-dm-scale-out.md). For how to delete machines, see [Scale in a cluster](/tiup/tiup-component-dm-scale-in.md). +> + After you execute the `tiup dm edit-config` command, the configuration is modified only on the control machine. Then you need to execute the `tiup dm relaod` command to reload the configuration. + +## Syntax + +```shell +tiup dm edit-config [flags] +``` + +``: the cluster to operate on. + +## Option + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +- Normally, no output. +- If you have mistakenly modified the fields that cannot be modified, when you save the file, an error is reported, reminding you to edit the file again. For the fields that cannot be modified, see [the topology file]. diff --git a/tiup/tiup-component-dm-help.md b/tiup/tiup-component-dm-help.md new file mode 100644 index 0000000000000..da4867e0a40df --- /dev/null +++ b/tiup/tiup-component-dm-help.md @@ -0,0 +1,25 @@ +--- +title: tiup dm help +--- + +# tiup dm help + +tiup-dm command-line interface provides users with a wealth of help information. You can view it via the `help` command or the `--help` option. Basically, `tiup dm help ` is equivalent to `tiup dm --help`. + +## Syntax + +```shell +tiup dm 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-dm` is viewed. + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +The help information of `[command]` or `tiup-dm`. \ No newline at end of file diff --git a/tiup/tiup-component-dm-scale-in.md b/tiup/tiup-component-dm-scale-in.md new file mode 100644 index 0000000000000..b52614b80fcb9 --- /dev/null +++ b/tiup/tiup-component-dm-scale-in.md @@ -0,0 +1,39 @@ +--- +title: tiup dm scale-in +--- + +# tiup dm scale-in + +The `tiup dm scale-in` command is used to scale in the cluster. Scaling in the cluster means taking the service offline, which eventually removes the specified node from the cluster and deletes the remaining related files. + +## Syntax + +```shell +tiup dm scale-in [flags] +``` + +``: the name of the cluster to operate on. If you forget the cluster name, you can check it with the [cluster list] command. + +## Options + +### -N, --node + +- Specifies the nodes to be scaled in. If you need to scale in multiple nodes, split them by commas. +- Data type: `Strings` +- Default: no. This option is mandatory and the value must be not null. + +### --force + +- In some cases, some scale-in nodes in the cluster have been down, making it impossible to connect to the node through SSH for operation. At this time, you can use the `--force` option to remove these nodes from the cluster. +- Data type: `BOOLEAN` +- Default: false. If this option is not specified in the command, the specified nodes are not forcibly removed. + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +The log of scaling in. \ No newline at end of file diff --git a/tiup/tiup-component-dm-scale-out.md b/tiup/tiup-component-dm-scale-out.md new file mode 100644 index 0000000000000..64daca0e5d257 --- /dev/null +++ b/tiup/tiup-component-dm-scale-out.md @@ -0,0 +1,47 @@ +--- +title: tiup dm scale-out +--- + +# tiup dm scale-out + +The `tiup dm scale-out` command is used for scaling out the cluster. The internal logic of scaling out the cluster is similar to the cluster deployment. The `tiup-dm` components first establish an SSH connection to the new node, create the necessary directories on the target node, then perform the deployment and start the service. + +## Syntax + +```shell +tiup dm scale-out [flags] +``` + +``: the name of the cluster to operate on. If you forget the cluster name, you can check it with the [cluster list]. + +``: the prepared [topology file]. This topology file should only contain the new nodes that are to be added to the current cluster. + +## Options + +### -u, --user + +- Specifies the user name used to connect to the target machine. This user must have the secret-free sudo root permission on the target machine. +- Data type: `STRING` +- Default: the current user who executes the command. + +### -i, --identity_file + +- Specifies the key file used to connect to the target machine. +- Data type: `STRING` +- If this option is not specified in the command, the `~/.ssh/id_rsa` file is used to connect to the target machine by default. + +### -p, --password + +- Specifies the password used to connect to the target machine. Do not use this option and `-i/--identity_file` at the same time. +- Data type: `BOOLEAN` +- Default: false + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +The log of scaling out.