Skip to content

Commit

Permalink
tiup: add 4 docs dm-prune/start/stop/reload (#5308) (#5343)
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-srebot committed Apr 15, 2021
1 parent da51785 commit 16491e8
Show file tree
Hide file tree
Showing 4 changed files with 184 additions and 0 deletions.
25 changes: 25 additions & 0 deletions tiup/tiup-component-dm-prune.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: tiup dm prune
---

# tiup dm prune

When you scale in the cluster(/tiup/tiup-component-dm-scale-in.md), a small amount of metadata in etcd is not cleaned up, which usually causes no problem. If you need to clean up the metadata, you can manually execute the `tiup dm prune` command.

## Syntax

```shell
tiup dm prune <cluster-name> [flags]
```

## Option

### -h, --help

- Prints the help information.
- Data type: `BOOLEAN`
- Default: false

## Output

The log of the cleanup process.
61 changes: 61 additions & 0 deletions tiup/tiup-component-dm-reload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: tiup dm reload
---

# tiup dm reload

After [modifying the cluster configuration]<!-- (/tiup/tiup-component-dm-edit-config.md) -->, the cluster needs to be reloaded using the `tiup dm reload` command for the configuration to take effect. This command publishes the configuration of the control machine to the remote machine where the service is running and restarts the service in order according to the upgrade process. The cluster remains available during the restart process.

## Syntax

```shell
tiup dm reload <cluster-name> [flags]
```

`<cluster-name>`: the name of the cluster to operate on.

## Options

### -N, --node

- Specifies the nodes to be restarted. If not specified, all nodes are restarted. 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-dm-display.md) -->table.
- Data type: `strings`
- Default: `[]`, which means all nodes are selected.

> **Note:**
>
> + If the `-R, --role` option is specified at the same time, then the service status in their intersection is restarted.
> + If the `--skip-restart` option is specified, the `-N, --node` option is invalid.
### -R, --role

- Specifies the roles to be restarted. If not specified, all roles are restarted. 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-dm-display.md) -->table.
- Data type: `strings`
- Default: `[]`, which means all roles are selected.

> **Note:**
>
> + If the `-N, --node` option is specified at the same time, the services in their intersection is restarted.
> + If the `--skip-restart` option is specified, the `-R, --role` option is invalid.
### --skip-restart

The `tiup dm reload` command performs two operations:

- Refreshes all node configurations
- Restarts the specified node

After you specify the `--skip-restart` option, it only refreshes the configuration without restarting any nodes, so that the refreshed configuration is not applied and does not take effect until the next restart of the corresponding service.

- Data type: `BOOLEAN`
- Default: false

### -h, --help

- Prints the help information.
- Data type: `BOOLEAN`
- Default: false

## Output

The execution log of the tiup-dm.
47 changes: 47 additions & 0 deletions tiup/tiup-component-dm-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: tiup dm start
---

# tiup dm start

The `tiup dm start` command is used to start all or part of the services of the specified cluster.

## Syntax

```shell
tiup dm start <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 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-dm-display.md) -->table.
- Data type: `strings`
- 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.
### -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-dm-display.md) --> table.
- Data type: `strings`
- 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.
### -h, --help

- Prints the help information.
- Data type: `BOOLEAN`
- Default: false

## Output

The log of starting the service.
51 changes: 51 additions & 0 deletions tiup/tiup-component-dm-stop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: tiup dm stop
---

# tiup dm stop

The `tiup dm stop` command is used to stop all or part of the services of the specified cluster.

> **Note:**
>
> The cluster cannot provide services after the core service is stopped.
## Syntax

```shell
tiup dm stop <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 stopped. If not specified, all nodes are stopped. 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-dm-display.md) --> table.
- Data type: `strings`
- Default: `[]`, which means all nodes are selected.

> **Note:**
>
> If the `-R, --role` option is specified at the same time, then the service status in their intersection is stopped.
### -R, --role

- Specifies the roles to be stopped. If not specified, all roles are stopped. 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-dm-display.md) --> table.
- Data type: `strings`
- Default: `[]`, which means all roles are selected.

> **Note:**
>
> If the `-N, --node` option is specified at the same time, the services in their intersection is stopped.
### -h, --help

- Prints the help information.
- Data type: `BOOLEAN`
- Default: false

## Output

The log of stopping the service.

0 comments on commit 16491e8

Please sign in to comment.