Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tiup: add 4 docs dm-prune/start/stop/reload #5308

Merged
merged 15 commits into from
Apr 15, 2021
Merged
Show file tree
Hide file tree
Changes from 9 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
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 [scaling 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 cluster prune` command.
Copy link
Contributor

@CharLotteiu CharLotteiu Apr 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the tiup cluster prune here be tiup dm prune? Because this file introduces the tiup dm prune command...

The Chinese version might need to be edited as well. PTAL @lucklove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated


## 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.