There is always room to test different HA technologies in a simulated VM environment. At ICCLab we have created such a DRBD test environment for PostgreSQL databases. This environment is now available on Github.
The test environment installation uses Vagrant as tool to install VMs, Virtualbox as VM runtime environment and Puppet as VM configurator. It includes a Vagrant installation script (usually called a “Vagrantfile”) which sets up two virtual machines which run a clustered highly available PostgreSQL database.
In order to use the environment, you have to download it and then run the Vagrant installation script. The Vagrant installation script of the test environment essentially does the following things:
- It creates two virtual machines with 1 GB RAM, one 80 GB harddrive and an extra 5 GB harddrive (which is used as DRBD device).
- It creates an SSH tunnel between the two VM nodes which is used for DRBD synchronization.
- It installs, configures and runs the DRBD device on both machines.
- It installs, configures and runs Corosync and Pacemaker on both machines.
- It creates a distributed PostgreSQL database which runs on the DRBD device and which is managed by the Corosync/Pacemaker software.
This environment can easily be installed and then be used for testing of the DRBD technology. It can be downloaded from the following Github repository:
Installation instructions can be found here.