1. Home
  2. Docs
  3. ClusterControl
  4. Components
  5. ClusterControl CLI

ClusterControl CLI

Also known as s9s-tools, this optional package is introduced in ClusterControl version 1.4.1, which contains a binary called s9s. It is a command-line tool to interact, control, and manage database clusters using the ClusterControl Database Platform. Starting from version 1.4.1, the installer script will automatically install this package on the ClusterControl node. You can also install it on another computer or workstation to manage the database cluster remotely. Communication between this client and the CMON controller is encrypted and secure through TLS. This command-line project is open source and publicly available at GitHub.

ClusterControl CLI opens a new door for cluster automation where you can easily integrate it with existing deployment automation tools like Ansible, Puppet, Chef, or Salt. The following list shows the supported features at the moment:

Field Description
Deploy and manage database clusters
  • MySQL
  • PostgreSQL
  • MongoDB (Replica Set)
Basic monitoring features
  • Status of nodes and clusters.
  • Cluster properties can be extracted.
  • Gives detailed enough information about your clusters.
Management features
  • Create clusters.
  • Add existing clusters.
  • Stop or start clusters.
  • Add or remove nodes.
  • Restart nodes in the cluster.
  • Create database users (CREATE USER, GRANT privileges to the user).
  • Create load balancers (HAProxy and ProxySQL are supported)
  • Create and restore backups.
  • Maintenance mode.
  • Configuration changes of DB nodes.

The command-line tool is invoked by executing a binary called s9s. The commands are basically JSON messages being sent over to the ClusterControl Controller (CMON) RPC interface. Communication between the s9s (the command-line tool) and the cmon process (ClusterControl Controller) is encrypted using TLS and requires port 9501 to be opened on the controller and the client host.

For full usage on every s9s command, see ClusterControl User Guide (CLI).


Was this article helpful to you? Yes No