Database Clustering Tutorial 11 – ClusterControl Scripting With Developer Studio

We are finally to the cool part of the series!

ClusterControl allows us to do custom monitoring and automation through scripts that can be run regularly. These scripts are run through a tool called Developer Studio.

To begin looking at this, open your cluster and when you are in the cluster overview, hover over Manage and click Developer Studio.

From here you will see a ton of scripts that were already built into ClusterControl.

For example, s9s -> mysql -> schema -> schema_check_nopk.js.

Continue reading “Database Clustering Tutorial 11 – ClusterControl Scripting With Developer Studio”

Database Clustering Tutorial 10 – ProxySQL Load Balancer

In this article, I’m going to talk about load balancers and guide you through installing ProxySQL. Now, this is only a light introduction with just enough information to get you started.

The Purpose of a Load Balancer

A load balancer is like another addition to your database that adds a layer of magic.  The load balancer is a piece of software that will automatically balance how much each node is being hit to protect from overworking a particular node and slowing down the entire database cluster.

If you do not have a load balancer, and you were writing a software application, you would manually decide what nodes to read and write from.  This is not always good because you might not know ahead of time how well a particular node is going to keep up with your demands.

Continue reading “Database Clustering Tutorial 10 – ProxySQL Load Balancer”

Database Clustering Tutorial 9 – Setting up a Cluster in Clustercontrol

We’ve got most of the theory figured out, we managed to get a bunch of virtual machines up and running, and we even installed ClusterControl, but now it’s time for the fun part. We are going to create our first cluster!

Getting Started

If not open already, travel to the webpage you made your admin email and user name on in the last previous blog. The website will be:

localip/clustercontrol/

For example, mine is: 10.71.34.101/clustercontrol/

Once you get there, the “Welcome” page should show up. If not, open it by either clicking the “Get Started” button or the “Deploy” icon.

Continue reading “Database Clustering Tutorial 9 – Setting up a Cluster in Clustercontrol”

Database Clustering Tutorial 8 – Installing Clustercontrol

In this blog, we’re finally going to install ClusterControl! It’s taken us a long time to get to this point, but now we have a good foundation on which to work from.

Before we begin, open up your three virtual machines, and use the one we named “ClusterControl” to install ClusterControl onto.

Installation

One way to install ClusterControl is to follow the guide on their website.  That way you get the most up-to-date information. Alternatively, follow my simplified guide by reading this blog!

Continue reading “Database Clustering Tutorial 8 – Installing Clustercontrol”

Database Clustering Tutorial 7 – Passwordless SSH

In this blog, we will be setting up passwordless SSH in our virtual machines.

In order for ClusterControl to work, it must be able to communicate seamlessly with all of the nodes in a cluster. Passwordless SSH will allow this to happen.  This blog will guide you through the process, but there is also a video that might be easier to follow for this complex process. Whichever floats your boat!

Continue reading “Database Clustering Tutorial 7 – Passwordless SSH”

Database Clustering Tutorial 6 – Setting up Ubuntu Part 2

In the previous blog, we installed Ubuntu and made our first virtual machine. This first machine is going to act as our blueprint by which we will clone all our other virtual machines. So, lets get started!

Now that we have a virtual machine, we are going to run some commands.  So, open a terminal, and pin it to your launcher.

When you open the terminal for the first time, you will see at the top that it says:

Continue reading “Database Clustering Tutorial 6 – Setting up Ubuntu Part 2”

Database Clustering Tutorial 5 – Setting up Ubuntu Part 1

In our process of setting up a database cluster, we are going to need multiple machines each with a database instance installed. As a reminder, these instances are called nodes. To save time and resources, we are going to be using virtual machines for each one of our nodes.

To do this we are going to need to install VirtualBox.

Once we have VirtualBox installed, we need to download the operating system. Now, if you are learning this material to apply it to a production environment, you will want to make sure a particular clustering software is available on the right operating system. For example, the Oracle Galera cluster is currently not offered on odd versions of Ubuntu;it is only offered oneven versions.

Continue reading “Database Clustering Tutorial 5 – Setting up Ubuntu Part 1”

Database Clustering Tutorial 4 – Galera Clustering

This article is going to introduce you to Galera clustering.  Now, we are not actually going to be setting up a Galera cluster here, but that is something we will be doing through a database management system, ClusterControl. This article is going to talk about all of the fancy words and things to know when it comes to setting up a cluster.

Galera Topology

The very first thing to know about Galera is that it sets up your database instances in a master-master topology.  What that means is that the nodes of the cluster are on equal standing.  You can read and write to all of the nodes.  This is in contrast to a master-slave topology, which is often set up to where you only write to the master node and you can read from any of the nodes.

Continue reading “Database Clustering Tutorial 4 – Galera Clustering”

Database Clustering Tutorial 3 – Setting up a Database Cluster

How do you actually go about setting up a cluster? Well, unfortunately, it’s not the easiest process in the world. The good part, though, is that it is quite the learning experience, and it’s not really hard; it just takes some time.  

One of the reasons it can take so much time is because not everyone has a bunch of database servers laying around to setup a cluster.  But don’t worry.  I’m gonna teach you everything you need to know to set up a database cluster and start working with your data. I’ll also show you how to do it using virtual machines so you don’t have to set up a bunch of computers. To top it off, I’ll do it completely free of charge. Your welcome.

Infrastructure

Before we dive into setting up our database clusters, we first need to discuss our infrastructure. How are we going to set this up? Well, we are going to have one node per machine, and to make this of any use to use we will need at least two nodes. On top of this, we will need one machine to be the control panel (database management system is probably a better term), so that will mean having a third machine.

Continue reading “Database Clustering Tutorial 3 – Setting up a Database Cluster”

Database Clustering Tutorial 2 – Terminology

Have you ever been really excited working with some new software, but then got lost trying to figure out the terminology unique to it?  Well in this article, we’re going to define some terms when it comes to database clustering.

When I first started studying clustering, I was totally confused and lost.  Thankfully, some of the people at Severalnines, who made the ClusterControl software, saved the day.  But even with that help, I had to do some real digging to truly understand some terminology.

Now, when it comes to terminology, opinions vary.  People use different terms for different things.  So, I am going to give you what I think are the most widely accepted and accurate definitions.

We already discussed clusters in the previous article, but a cluster has many pieces.  You will likely hear the word node when discussing clustering. 

Continue reading “Database Clustering Tutorial 2 – Terminology”