MySQL configuration management remains a hot topic, as I’ve noticed on numerous occasions during my conversations with customers.
I thought it might be a good idea to start a blog series that goes deeper in detail into some of the different options, and what modules potentially might be used for managing your MySQL database infrastructure.
Configuration management has been around since way before the beginning of my professional career. I, myself, originally began working on integrating an infrastructure with my colleagues using Puppet.
The most popular open source solutions are Puppet, Chef, Ansible, and CFengine (among others). In this series, we will go deeper in the first three of them.
Let’s first start by giving you a quick, high-level introduction.
Puppet is a language used to describe the desired state of an environment. The Puppet client reads the catalog of the expected state from the server and enforces these changes on the client. The system works based on a client/server principle.
Puppet has as default four essential components:
How can you integrate puppet in your MySQL infrastructure?
This will allow you and your team to create users, databases, install and configure MySQL
Probably my old “code from hell” module is still somewhere out there.
Chef also consists of a declarative language (like Puppet) based on Ruby which will allow you to write cookbooks for potential integrable technologies. Chef is also based on a server/client solution. The client being chef nodes, the server managing the cookbooks, catalogs and recipes.
In short, Chef consists of:
How can you integrate Chef in your MySQL infrastructure:
Ansible originated with something different in mind. System engineers typically chose to use their own management scripts. This can be troublesome and hard to maintain. Why wouldn’t you use something easy and automated and standardized? Ansible fills in these gaps, and simplifies management of Ansible targets.
Ansible works by connecting to your nodes (by SSH default) and pushes out Ansible modules to them. These modules represent the desired state of the node, and will be used to execute commands to attain the desired state.
This procedure is different to Puppet and Chef, which are essentially preferably client/server solutions.
Some pre-made modules for MySQL are:
Choose your poison (or magical medicine, you pick the wording), every solution has its perks.
Keep in mind that in some situations running a complicated Puppet or Chef infrastructure could be overkill. At this moment, a solution like Ansible might be a quick and easily integrable answer for you.
The next blog post will go over the Puppet Forge MySQL module, so stay tuned!