From f0bb3e6061034107702ddbe06e472d8724fcf2f3 Mon Sep 17 00:00:00 2001 From: JoyinQ <56883733+Joyinqin@users.noreply.github.com> Date: Thu, 15 Apr 2021 17:49:53 +0800 Subject: [PATCH] tiup: add 4 docs dm-prune/start/stop/reload (#5308) --- tiup/tiup-component-dm-prune.md | 25 +++++++++++++ tiup/tiup-component-dm-reload.md | 61 ++++++++++++++++++++++++++++++++ tiup/tiup-component-dm-start.md | 47 ++++++++++++++++++++++++ tiup/tiup-component-dm-stop.md | 51 ++++++++++++++++++++++++++ 4 files changed, 184 insertions(+) create mode 100644 tiup/tiup-component-dm-prune.md create mode 100644 tiup/tiup-component-dm-reload.md create mode 100644 tiup/tiup-component-dm-start.md create mode 100644 tiup/tiup-component-dm-stop.md diff --git a/tiup/tiup-component-dm-prune.md b/tiup/tiup-component-dm-prune.md new file mode 100644 index 0000000000000..12097c4a0079c --- /dev/null +++ b/tiup/tiup-component-dm-prune.md @@ -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 [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-dm-reload.md b/tiup/tiup-component-dm-reload.md new file mode 100644 index 0000000000000..f0a24d8520ee6 --- /dev/null +++ b/tiup/tiup-component-dm-reload.md @@ -0,0 +1,61 @@ +--- +title: tiup dm reload +--- + +# tiup dm reload + +After [modifying the cluster configuration], 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 [flags] +``` + +``: 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]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]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. \ No newline at end of file diff --git a/tiup/tiup-component-dm-start.md b/tiup/tiup-component-dm-start.md new file mode 100644 index 0000000000000..551f61777a66d --- /dev/null +++ b/tiup/tiup-component-dm-start.md @@ -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 [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 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]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] 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. \ No newline at end of file diff --git a/tiup/tiup-component-dm-stop.md b/tiup/tiup-component-dm-stop.md new file mode 100644 index 0000000000000..c8a73a788301f --- /dev/null +++ b/tiup/tiup-component-dm-stop.md @@ -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 [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 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] 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] 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. \ No newline at end of file