Download instructions

Choose your preferred installation method:

Want to see additional installation methods? Go here!

Script Installation Instructions for ClusterControl

Welcome to ClusterControl! Before you get started, make sure you have the proper environment, such as a supported OS and a ssh keys setup. The full list of requirements can be found here.

1)

Run the following Scripts

To Pull ClusterControl images, simply:

$ wget -O install-cc https://severalnines.com/scripts/install-cc?,
$ chmod +x install-cc
Note:
Please change S9S_CMON_PASSWORD or S9S_ROOT_PASSWORD values or remove the environment variables to interactively set to your own passwords.
$ S9S_CMON_PASSWORD=gx6wdGzI S9S_ROOT_PASSWORD=aPWYQMBt ./install-cc  
# as root or sudo user

If you have multiple network interface cards, assign one IP address for HOST variable as per example below:

$ S9S_CMON_PASSWORD=gx6wdGzI S9S_ROOT_PASSWORD=aPWYQMBt HOST=192.168.1.10 ./install-cc # as root or sudo user
Note:
ClusterControl relies on a MySQL server as a data repository for the clusters it manages and an Apache server for the User Interface. The installation script will always install an Apache server on the host. An existing MySQL server can be used or a new MySQL server install is configured for minimum system requirements. If you have a larger server please make the necessary changes to the my.cnf file and restart the MySQL server after the installation.
2)

Open your web browser to http://[ClusterControl_host]/clustercontrol and create the default Admin user by entering a valid email address and password.

3)

Setup passwordless SSH to all target nodes (ClusterControl and all database nodes). Run following commands on ClusterControl:

$ ssh -keygen -t rsa # press enter on all prompts
$ ssh-copy-id -i ~/.ssh/id_rsa [ClusterControl IP address]
$ ssh-copy-id -i ~/.ssh/id_rsa [Database nodes IP address]# repeat this to all target database nodes
Note:
For cloud infrastructure, you may skip this step since all nodes should have been configured with a keypair. Ensure the keypair exists in the ClusterControl node and you are good for the next step.
Attention
If you use a non-root user, then it must be in sudoers on all nodes. Read here for details.

Docker Image Installation Instructions for ClusterControl

The Docker Image comes with ClusterControl installed and configured with all of its components, so you can immediately use it to manage and monitor your existing databases. The Docker Image for ClusterControl is a convenient way to quickly get up and running and it’s 100% reproducible. All you need to do is pull the image from the Docker Hub and then launch the software.

Image Description

To Pull ClusterControl images, simply

$ docker run -d severalnines/clustercontrol

The image is based on CentOS 7 with Apache 2.4, which consists of ClusterControl packages and prerequisite componentsD

  • ClusterControl controller, UI, cloud, notification and web ssh packages installed via Severalnines repository.
  • MySQL, CMON database, cmon user grant and dcps database for ClusterControl UI.
  • Apache, file and directory permission for ClusterControl UI with SSL installed.
  • SSH key for ClusterControl usage.

Run Container

To run a ClusterControl container, the simplest command would be:

$ docker run -d severalnines/clustercontrol

However, for production use, users are advised to run with sticky IP address/hostname and persistent volumes to survive across restarts, upgrades and rescheduling, as shown below:

# Create a Docker network
$ docker network create --subnet=192.168.10.0/24 db-cluster
 
# Start the container
$ docker run -d --name clustercontrol \
--network db-cluster \
--ip 192.168.10.10 \
-h clustercontrol \
-p 5000:80 \
-p 5001:443 \
-v /storage/clustercontrol/cmon.d:/etc/cmon.d \
-v /storage/clustercontrol/datadir:/var/lib/mysql \
-v /storage/clustercontrol/sshkey:/root/ssh \
-v /storage/clustercontrol/cmonlib:/var/lib/cmon \
-v /storage/clustercontrol/backups:/root/backups \
severalnines/clustercontrol

The recommended persistent volumes are


/etc/cmon.d – ClusterControl configuration files.

/var/lib/mysql – MySQL datadir to host cmon and dcps database.

/root/.ssh – SSH private and public keys.

/var/lib/cmon ClusterControl internal files.

/root/backups – Default backup directory only if ClusterControl is the backup destination


After a moment, you should able to access the ClusterControl Web UI at {host’s IP address}:{host’s port}, for example:


HTTP: http://192.168.10.100:5000/clustercontrol

HTTPS: https://192.168.10.100:5001/clustercontrol


We have built a complement image called centos ssh to simplify database deployment with ClusterControl. It supports automatic deployment (Galera Cluster) or it can also be used as a base image for database containers (all cluster types are supported). Details at here

Environment Variables

  • CMON_PASSWORD={string}
    • MySQL password for user `cmon`. Default to `cmon`. Use docker secret is recommended.
    • Example: CMON_PASSWORD=cmonP4s5
  • MYSQL_ROOT_PASSWORD={string}
    • MySQL root password for the ClusterControl container.
      Default to `password`. Use docker secret is recommended.
    • Example: MYSQL_ROOT_PASSWORD=MyPassW0rd

Github Instructions

Service Management

Starting from version 1.4.2, ClusterControl requires a number of processes to be runningD

  • sshd – SSH daemon. The main communication channel.
  • mysqld – MySQL backend runs on Percona Server 5.6.
  • httpd – Web server running on Apache 2.4.
  • cmon – ClusterControl backend daemon. The brain of ClusterControl. It depends on mysqld and sshd.
  • cmon-ssh – ClusterControl web-based SSH daemon, which depends on cmon and httpd.
  • cmon-events – ClusterControl notifications daemon, which depends on cmon and httpd.
  • cmon-cloud – ClusterControl cloud integration daemon, which depends on cmon and httpd.
  • cc-auto-deployment – ClusterControl automatic deployment script, running as a background process, which depends on cmon

These processes are being controlled by Supervisord, a process control system. To manage a process, one would use supervisorctl client as shown in the following example:

[[email protected]]$ docker exec it clustercontrol /bin/bash
[[email protected] /]# supervisorctl
cc-auto-deployment RUNNING pid 570, uptime 2 days, 19:11:54
cmon RUNNING pid 573, uptime 2 days, 19:11:54
cmon-events RUNNING pid 576, uptime 2 days, 19:11:54
cmon-ssh RUNNING pid 575, uptime 2 days, 19:11:54
httpd RUNNING pid 571, uptime 2 days, 19:11:54
mysqld RUNNING pid 577, uptime 2 days, 19:11:54
sshd RUNNING pid 572, uptime 2 days, 19:11:54
supervisor> restart cmon
cmon: stopped
cmon: started
supervisor> status cmon
cmon RUNNING pid 2838, uptime 0:11:12
supervisor>

Examples

  • Standalone Docker
  • Kubernetes

Development

Please report bugs, improvements or suggestions via our support channel:

https://support.severalnines.com


If you have any questions, you are welcome to get in touch via our contact us page or email us at

[email protected].

Need Additional Help? Contact Our Support Team