How to create a new Percona XtraDB Cluster with ClusterControl

We recently announced Percona ClusterControl supplied in partnership with Severalnines. This enterprise-grade cluster management and monitoring software is available with a Percona Support contract covering Percona XtraDB Cluster, MySQL Cluster, or MySQL Galera. In this blog post I am going to show you how to use Percona ClusterControl to to create a new 3-node cluster with Percona XtraDB Cluster.

Percona ClusterControl architecture

The software has three main parts:

  • Percona ClusterControl UI: This is the web interface from where we can create new clusters and monitor and manage existing ones.

In this example hostname cc and IP

  • Controller (or cmon): We need one controller for each Percona XtraDB Cluster. The controller is placed between ClusterControl UI and the cluster itself. It connects to the cluster to gather information or run commands and send back info to the ClusterControl UI.

In this example hostname cmon and IP

  • Percona XtraDB Cluster: This is the cluster itself. We can create a new one or manage an existing one.

In this example hostnames xtradb1, xtradb2, xtradb3 and IPs

Installation of Percona ClusterControl UI

First we need to install the Percona ClusterControl UI. We provide a link to the installation script in Percona’s customer portal. We just need to download the script and run it as root in the server designed for Percona ClusterControl UI.

The installer will do everything for us. It will download Percona ClusterControl UI and all the dependencies needed from distribution’s repositories. It will also install MySQL, PHP5 and Apache. When the installation process finishes it will show this message:

Now we can access the Percona ClusterControl UI from the web interface and continue the installation process there. The installer will check if the server meets all the pre-requisites and it will ask some extra details to finish the installation:

ClusterControl pre-requisites

  • MySQL username and password: This is the MySQL server the installed for us and where the Percona ClusterControl UI will store its own information.
  • Your name, logging e-mail and password: This is important, because this is the admin account for the Percona ClusterControl UI. The e-mail is also very important, because it is where we will receive new customised package installations created by the tool as we will see later on.

If everything is correct click on “Install” and it will show us the following notice:

Percona ClusterControl installed

After accepting the notice, Percona ClusterControl will show us the login screen.

ClusterControl Login

This is the main page still with no clusters monitored.

ClusterControl Installed

Creating our first Percona XtraDB Cluster

The next step is to install our cluster. It can be done from the web interface. We just need to click on “Create Database Cluster” button. The cluster creation wizard will start. First we need to choose which kind of configuration we want to deploy. We will choose “Galera Cluster for MySQL“:

ClusterControl Creation

The next step in the wizard is to provide the info about the kind of Galera Cluster we want and the network info about the nodes.

ClusterControl Form

It is divided in two different sections:

  • Settings: Here we have to make several decisions and provide info about our cluster nodes. By default Percona XtraDB Cluster will be deployed. We will need to provide extra info like the IPs, Linux distribution, hardware information and cluster configuration parameters.
  • Cluster Control Node: Here we need to configure the controller or cmon for this cluster. The controller node is the one that will connect to all our cluster nodes, install software and monitor them. Therefore, this control node needs to have access with SSH to all other nodes. That’s the reason we can upload an SSH private key. It is recommended that all 5 servers can connect to each other with passwordless authentication (root user) using an SSH key.

Now we have two options. Just deploy the cluster from the web interface or generate an installation package. We are going to use the second option so we can see what it does under the hood. When we click the “Generate Package” it will send us a tar.gz to our e-mail address.

Control Node and Cluster deployment:

We need to upload the package to the control node and run the installation script. It will check the connectivity, firewall ports and the SSH keys:

Then it will connect to the three cluster nodes and start the installation process using apt-get or yum. Packages like xtrabackup, Percona XtraDB Cluster or netcat will be installed to ensure normal cluster operations.

All the Percona XtraDB Cluster process is automatic. When the installation of nodes is finished it will start to install the Control Node package and its dependencies (apache, PHP and MySQL). After that, the process has finished:

We need to open the URL and insert the API token there:

ClusterControl API

After that we need to “connect” the Control Node with the Percona ClusterControl UI:

Register the new CMON

And that’s all. We have Percona ClusterControl installed and a new Percona XtraDB Cluster in our infrastructure that we can monitor and manage from a web interface.

ClusterControl nodes


Percona ClusterControl is a really useful and user-friendly tool to manage and monitor our clusters. We can use it to create new clusters as we have seen here or to manage already existing clusters. I will write a second blog post explaining how to put our already in production Percona XtraDB Cluster under Percona ClusterControl management.

Share this post

Comments (2)

  • mesothelioma legal settlements Reply

    Wow that was odd. I just wrotee an very long comment but after I clicked submit my comment didn’t show up.

    Grrrr… well I’m not writing all that over again. Anyways,
    just wanted to say superb blog!

    March 15, 2014 at 12:55 pm
  • Norine Reply

    I’m excited to uncover this weeb site. I wanted
    to thank you for yopur time due to this fantastic read!!
    I definitely loved egery little bit of itt and
    I have you saved to fav to check oout new stuff in your web site.

    April 4, 2014 at 11:50 am

Leave a Reply