Skip to content

Latest commit

 

History

History
 
 

master_slave

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Fabricio: PostgreSQL master-slave deployment configuration

This configuration based on PostgreSQL streaming replication.

Requirements

Virtual Machines creation

Run vagrant up and wait until VMs will be created.

Files

  • fabfile.py, Fabricio configuration
  • pg_hba.conf, PostgreSQL client authentication config
  • postgresql.conf, PostgreSQL main config
  • README.md, this file
  • recovery.conf, PostgreSQL recovery config
  • Vagrantfile, Vagrant config

List of available commands

fab --list

Deploy

From scratch

fab --parallel db

At first, this will initiate process of creation of three Virtual Machines (if not created yet) using Vagrant configuration: docker1, docker2 and docker3. After that 'from scratch' case will automatically start.

Master fail

To initiate new master promotion you may destroy VM with current master and run deploy again:

  1. vagrant destroy <name_of_the_VM_with_current_master>
  2. fab --parallel db

This will lead to a new master promotion.

Adding new slave

Add new VM definition to Vagrantfile and then run deploy again:

fab --parallel db

Issues

  • If you see warnings in Vagrant logs about Guest Extensions version is not match VirtualBox version try to install vagrant-vbguest plugin that automatically installs Guest Extensions of version which corresponds to your version of VirtualBox: vagrant plugin install vagrant-vbguest