Script it! Make professional DBA tools out of nothing
DBA work is repetitive and thus boring. When you need to repeat the same task many times, you lose patience and the job loses its initial appeal. Worse yet, you need to do repetitive tasks when you are in a hurry, or near a deadline, or under stress because you need to fix something urgent, and you feel an unpleasant breath on the back of your neck.
If all the above sounds unpleasant, it's now the moment to start automating your tasks with professional tools. And the person that is best qualified for making this tools is you, as you know what has to be done and how.
There is no need for fancy programming languages that you won;t find available in your new servers. You can leverage what Unix systems give you out of the box, and build beautiful tools with shell scripting and standard commands such as grep, cat, awk, sed.
It is not really out of "nothing", but it feels this way, as you can create these tools with bash shell scripts that is available almost everywhere and the commands that have been with Unix for decades.
This workshop will guide you through the step-by-step process of creating a set of tools that deploy, monitors, and tests a MySQL replication system. During the talk, you will see how to build simple scripts that cover two cases:
* New replication system:
** install the database servers
** set up the master
** create the slaves
** starts replication
* Existing server:
** set up the master
** install slave servers
** provision the slaves from the master
** start replication
In both cases, you will also see how to create simple scripts that show the status of replication, others that test the replication health, and eventually add and remove slaves.
The workshop will then show how the scripts can work with different sets of servers.
In the second part of the session, we will show how to enhance the scripts to include more features. A case in point will set semi-synchronous replication, with a monitoring system that shows if it is working according to expectations.
Finally, the scripts will be applied to MySQL 5.6, showing what implementation changes (or design choices) you need to apply in order to make your scripts work with different versions.