This configuration based on PostgreSQL streaming replication.
- Fabricio 0.3.21 or greater
- Vagrant
- One from the list of Vagrant supported providers (this example was tested with VirtualBox)
Run vagrant up
and wait until VMs will be created.
- 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
fab --list
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.
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
- If you see warnings in
Vagrant
logs about Guest Extensions version is not match VirtualBox version try to installvagrant-vbguest
plugin that automatically installs Guest Extensions of version which corresponds to your version of VirtualBox:vagrant plugin install vagrant-vbguest