This configuration based on PostgreSQL streaming replication.
- Fabricio 0.4.2 or greater
- Vagrant
- One from the list of Vagrant supported providers (this example was tested with VirtualBox)
- 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
Run vagrant up
and wait until VMs will be created.
fab --list
--parallel
option is mandatory for deploy
command. Without this option Fabricio can not automatically detect master node.
fab --parallel db
This case will be used at first time.
To initiate new master promotion you may destroy VM with current master and run deploy again:
vagrant destroy <name_of_the_VM_with_current_master>
fab --parallel db
This will lead to a new master promotion.
Add new VM definition to Vagrantfile
and then run deploy again:
fab --parallel db