This tutorial presents ansible in actions with PostgreSQL step-by-step
Author -- Robert Bernier. Original article "How to use Ansible to manage PostgreSQL"
Ansible, an open source automation tool, can make complex configuration and management tasks in Postgres simple.
Working with a database in a pressure-cooker production environment using an agile approach with tight deadlines can be a contradictory experience. As this article demonstrates, you can operationalize those many steps and prepare Postgres for any range of service. The key is Ansible, an open source automation engine for software provisioning, configuration management, and application deployment.
For the purposes of this article, we assume readers have some knowledge of both Ansible and PostgreSQL, not to mention Linux. I'm covering only the most basic features here; for a deeper dive, check out the references at the end of this article.
- How to administrate a cluster of database servers on a developer workstation
- Add repos: PostgreSQL Versions 9.4 and 9.6
- Install Postgres and packages 9.4
- Add public key on all database servers for Unix account Ansible
- Configure each host as a standalone service
- Configuring Postgres slaves
- Invoke failover
- Upgrade servers from 9.4 to 9.6
- Invoke failover
- Conclusion
Thanks to all people who have contributed to this tutorial:
If you have ideas on topics that would require a chapter, please open a PR.
I'm also open on pairing for writing chapters. Drop me a note if you're interested.