Deploy a DRBD/Pacemaker Cluster using Ansible

We get asked the question, “do you have a sandbox cluster we can play around in?”, by admins and potential clients looking to get a feel for managing a DRBD/Pacemaker cluster fairly often. Instead of spinning up some cloud instances and doling out access, we decided it would be better for our potential clients to be able to see how it all works in their actual environment. Ansible seemed like the best way to create a “one size fits all” solution for deploying such clusters into an unknown environment, and after a few days hacking together a playbook, it proved to be a good choice.

The end result was an Ansible playbook that can deploy a few different cluster configurations onto a pair of nodes in any environment. The playbook prompts the user for some inputs that will specify which type of cluster to deploy, which LINBIT contract to register the target nodes with, and which credentials to use for said registration; all of which could be set in your inventory file or passed via extra arguments on the command line to avoid prompting. After the playbook runs, you’re left with an initialized DRBD device and Pacemaker cluster at the very least, or a full blown HA cluster serving out either iSCSI or NFS (expect more later) that you can test with until your heart’s content.

You can find directions and my Ansible playbook’s repo on GitHub.

Matt Kereczman on Linkedin
Matt Kereczman
Matt is a Linux Cluster Engineer at LINBIT with a long history of Linux System Administration and Linux System Engineering. Matt is a cornerstone in LINBIT’s support team, and plays an important role in making LINBIT’s support great. Matt was President of the GNU/Linux Club at Northampton Area Community College prior to graduating with Honors from Pennsylvania College of Technology with a BS in Information Security. Open Source Software and Hardware are at the core of most of Matt’s hobbies

 

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *