Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion tiup/tiup-command-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The TiUP command-line interface provides users with a wealth of help information

## Syntax

```sh
```shell
tiup help [command]
```

Expand Down
4 changes: 2 additions & 2 deletions tiup/tiup-component-cluster-deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ tiup cluster deploy <cluster-name> <version> <topology.yaml> [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

Expand Down
33 changes: 33 additions & 0 deletions tiup/tiup-component-dm-edit-config.md
Original file line number Diff line number Diff line change
@@ -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]<!-- (/tiup/tiup-dm-topology-reference.md) -->. 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 <cluster-name> [flags]
```

`<cluster-name>`: 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]<!-- (/tiup/tiup-dm-topology-reference.md)-->.
25 changes: 25 additions & 0 deletions tiup/tiup-component-dm-help.md
Original file line number Diff line number Diff line change
@@ -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 <command>` is equivalent to `tiup dm <command> --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`.
39 changes: 39 additions & 0 deletions tiup/tiup-component-dm-scale-in.md
Original file line number Diff line number Diff line change
@@ -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 <cluster-name> [flags]
```

`<cluster-name>`: the name of the cluster to operate on. If you forget the cluster name, you can check it with the [cluster list]<!--(/tiup/tiup-component-dm-list.md) --> 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.
47 changes: 47 additions & 0 deletions tiup/tiup-component-dm-scale-out.md
Original file line number Diff line number Diff line change
@@ -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 <cluster-name> <topology.yaml> [flags]
```

`<cluster-name>`: the name of the cluster to operate on. If you forget the cluster name, you can check it with the [cluster list]<!--(/tiup/tiup-component-dm-list.md) command-->.

`<topology.yaml>`: the prepared [topology file]<!--(/tiup/tiup-dm-topology-reference.md)-->. 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.