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

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

Virtual Machines creation

Run vagrant up and wait until VMs will be created.

List of available commands

fab --list

Deploy

--parallel option is mandatory for deploy command. Without this option Fabricio can not automatically detect master node.

From scratch

fab --parallel db

This case will be used at first time.

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