This week we were at the dotScale conference in Paris. dotScale is a major European event with a focus on Scalability, DevOps and Distributed Systems.

During the show, we did a live demo entitled “Deploying postgresql with high availability in seconds”. The goal of this demo is to deploy on Exoscale a postgresql in a master - slave replicated setup, including continuous wal (postgresql transaction logs) archiving in our SOS S3 compatible object storage. All in less than 2 minutes using only a single command line !

For this purpose we’re relying only on an Ansibleplaybook. Ansible is a configuration management / automation system. It’s agentless, powerful but simple enough for non veteran sysadmin / devops.

Our demo playbook is going to:

Upload your public ssh key into our platform in order to get deployed on the instances.

Create a dedicated security group to ensure that only incoming SSH (port 22) from internet and Postgresql replication port (port 5432) between the instances is allowed. Any other traffic will be dropped, this keeps our deployment isolated and secure from the outside world.

Deploy 2 Ubuntu 14.04 instances with host anti-affinity rule to ensure that these machines will never get hosted on the same physical hypervisor and storage.