Skip to main content
This topic describes how to deploy and manage clusters with StarGo. StarGo is a command line tool for multiple clusters management. You can easily deploy, check, upgrade, downgrade, start, and stop multiple clusters through StarGo.

Install StarGo

Download the following files to your central control node:
  • sr-ctl: The binary file of StarGo. You do not need to install it after downloading it.
  • sr-c1.yaml: The template for the deployment configuration file.
  • repo.yaml: The configuration file for the download path of the database installer.
Note You can access http://cdn-thirdparty.starrocks.com to get the corresponding installation index files and installers.
Grant sr-ctl access.

Deploy cluster

You can deploy a cluster with StarGo.

Prerequisites

  • The cluster to be deployed must have at least one central control node and three deployment nodes. All nodes can be deployed on one machine.
  • You need to deploy StarGo on the central control node.
  • You need to build mutual SSH authentication between the central control node and three deployment nodes.
The following example builds mutual authentication between central control node sr-dev@r0 and three deployment nodes starrocks@r1, starrocks@r2, and starrocks@r3.
text

Create configuration file

Create the database deployment topology file based on the following YAML template. See Configuration for detailed information.

Create deployment directory (Optional)

If the paths under which the database to be deployed does not exist, and you have the privilege to create such paths, you do not have create these paths, and StarGo will create them for you based on the configuration file. If the the paths already exist, make sure you have the write access to them. You can also create necessary deployment directories on each node by running the following commands.
  • Create meta directory on FE nodes.
  • Create storage directory on BE nodes.
Caution Make sure the above paths are identical with the configuration items meta_dir and storage_dir in the configuration file.

Deploy the database

Deploy cluster by running the following command.
If the deployment is successful, the cluster will be started automatically. When beStatus and feStatus are true, the cluster is started successfully. Example:
text
You can test the cluster by viewing cluster information. You can also test it by connecting the cluster with MySQL client.

View cluster information

You can view the information of the cluster that StarGo manages.

View the information of all clusters

View the information of all clusters by running the following command.
Example:

View the information of a specific cluster

View the information of a specific cluster by running the following command.
Example:
text

Start cluster

You can start clusters via StarGo.

Start all nodes in a cluster

Start all nodes in a cluster by running the following command.
Example:
text

Start nodes of a specific role

  • Start all FE nodes in a cluster.
  • Start all BE nodes in a cluster.
Example:
text

Start a specific node

Start a specific node in the cluster. Currently, only BE nodes are supported.
You can check the ID of a specific node by viewing the information of a specific cluster. Example:
text

Stop cluster

You can stop clusters via StarGo.

Stop all nodes in a cluster

Stop all nodes in a cluster by running the following command.
Example:
text

Stop nodes of a specific role

  • Stop all FE nodes in a cluster.
  • Stop all BE nodes in a cluster.
Example:
text

Stop a specific node

Stop a specific node in the cluster.
You can check the ID of a specific node by viewing the information of a specific cluster. Example:
text

Scale cluster out

You can scale a cluster out via StarGo.

Create configuration file

Create the scale-out task topology file based on the following template. You can specify the file to add FE and/or BE nodes based on your demand. See Configuration for detailed information.

Build SSH mutual authentication

If you are adding a new node to the cluster, you must build mutual authentication between the new node and the central control node. See Prerequisites for detailed instruction.

Create deployment directory (Optional)

If the path under which the new node to be deployed does not exist, and you have the privilege to create such path, you do not have create these path, and StarGo will create them for you based on the configuration file. If the the paths already exist, make sure you have the write access to them. You can also create necessary deployment directories on each node by running the following commands.
  • Create meta directory on FE nodes.
  • Create storage directory on BE nodes.
Caution Make sure the above paths are identical with the configuration items meta_dir and storage_dir in the configuration file.

Scale the cluster out

Scale the cluster out by running the following command.
Example:
text

Scale cluster in

Remove a node in the cluster by running the following command.
You can check the ID of a specific node by viewing the information of a specific cluster. Example:
text

Upgrade or downgrade the cluster

You can upgrade or downgrade a cluster via StarGo.
  • Upgrade a cluster.
  • Downgrade a cluster.
Example:
text

Relevant commands