diff --git a/tiup/tiup-component-cluster-disable.md b/tiup/tiup-component-cluster-disable.md new file mode 100644 index 0000000000000..3e8a9426c6862 --- /dev/null +++ b/tiup/tiup-component-cluster-disable.md @@ -0,0 +1,47 @@ +--- +title: tiup cluster disable +--- + +# tiup cluster disable + +The `tiup cluster disable` command is used to disable the auto-enabling after restarting the machine where the cluster service is located. This command executes the `systemctl disable ` on the specified node to disable the auto-enabling of the service. + +## Syntax + +```shell +tiup cluster disable [flags] +``` + +``: the cluster whose auto-enabling service is to be disabled. + +## Options + +### -N, --node + +- Data type: `strings` +- Default: `[]`, which means no node is selected. +- Specifies the nodes whose auto-enabling service is to be disabled. 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-cluster-display.md) table. + +> **Note:** +> +> If the `-R, --role` option is specified at the same time, the auto-enabling of services in their intersection is disabled. + +### -R, --role strings + +- Data type: `strings` +- Default: `[]`, which means no role is selected. +- Specifies the roles whose auto-enabling service is to be disabled. 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-cluster-display.md) table. + +> **Note:** +> +> If the `-N, --node` option is specified at the same time, the auto-enabling of services in their intersection is disabled. + +### -h, --help + +- Outputs the help information. +- Data type: `BOOLEAN` +- Default: false + +## Output + +The execution log of the tiup-cluster. diff --git a/tiup/tiup-component-cluster-display.md b/tiup/tiup-component-cluster-display.md new file mode 100644 index 0000000000000..824627ae9459b --- /dev/null +++ b/tiup/tiup-component-cluster-display.md @@ -0,0 +1,65 @@ +--- +title: tiup cluster display +--- + +# tiup cluster display + +If you want to see the operation status of each component in the cluster, it is obviously inefficient to log in to each machine one by one. Therefore, tiup-cluster provides the `tiup cluster display` command to efficiently complete this task. + +## Syntax + +```shell +tiup cluster display [flags] +``` + +``: 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-cluster-list.md) command. + +## Options + +### --dashboard + +- By default, all node information of the entire cluster is displayed. With the `--dashboard` option, only dashboard information is displayed. +- Data type: `BOOLEAN` +- Default: false + +### -N, --node + +- Data type: `strings` +- Default: `[]`, which means all nodes. +- Specifies the node to query. If not specified, all nodes are queried. 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-cluster-display.md) table. + +> **Note:** +> +> If the `-R, --role` option is specified at the same time, then the service status in their intersection is queried. + +### -R, --role strings + +- Data type: `strings` +- Default: `[]`, which means all roles. +- Specifies the role to query. If not specified, all roles are queried. 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-cluster-display.md) table. + +> **Note:** +> +> If the `-N, --node` option is specified at the same time, then the service status in their intersection is queried. + +### -h, --help + +- Prints the help information. +- Data type: `BOOLEAN` +- Default: false + +## Outputs + +- The cluster name +- The cluster version +- SSH Client Type +- Dashboard address +- The table with the following fields: + - ID: the node ID, composed of `IP:PORT` + - Role: the service role deployed on this node (such as TiDB, TiKV) + - Host: the IP of the machine corresponding to the node + - Ports: the port number occupied by the service + - OS/Arch: the operating system and the machine architecture of this node + - Status: the current status of the node service + - Data Dir: the data directory of the service. `-` means no data directory. + - Deploy Dir: the deployment directory of the service diff --git a/tiup/tiup-component-cluster-list.md b/tiup/tiup-component-cluster-list.md new file mode 100644 index 0000000000000..755855845367c --- /dev/null +++ b/tiup/tiup-component-cluster-list.md @@ -0,0 +1,35 @@ +--- +title: tiup cluster list +--- + +# tiup cluster list + +tiup-cluster supports deploying multiple clusters using the same control machine. The `tiup cluster list` command outputs all clusters deployed by the currently logged-in user using this control machine. + +> **Note:** +> +> The deployed cluster data is stored in the `~/.tiup/storage/cluster/clusters/` directory by default, so on the same control machine, the currently logged-in user cannot view the clusters deployed by other users. + +## Syntax + +```shell +tiup cluster list [flags] +``` + +## Options + +### -h, --help + +- Prints help information. +- Data type: `BOOLEAN` +- Default: false + +## Outputs + +Outputs the table with the following fields: + +- Name: the cluster name +- User: the deployment user +- Version: the cluster version +- Path: the path of the cluster deployment data on the control machine +- PrivateKey: the path of the private key that is used to connect the cluster