1. Home
  2. Docs
  3. ClusterControl
  4. User Guide (CLI)

User Guide (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:

  • Deploy and import database clusters:
    • MySQL/MariaDB
    • PostgreSQL
    • MongoDB (Replica Set)
  • Deploy database load balancers:
    • HAProxy
    • ProxySQL
  • Basic monitoring features:
    • Status of nodes and clusters.
    • Cluster properties.
    • Graph plotting for monitoring data.
  • Management features:
    • Add existing clusters.
    • Stop or start clusters.
    • Add or remove nodes.
    • Restart nodes in the cluster.
    • Create database users (CREATE USER, GRANT privileges to a user).
    • Create and restore backups.
    • Maintenance mode.
    • Configuration changes of database 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 the port 9501 to be opened on the controller and the client host.


Was this article helpful to you? Yes No