Add Patroni to Omnibus
This issue was raised before (e.g. see #4112 (closed)) and a solution was attempted in !3196 (closed). After reviewing !3196 (closed) in #5088 (closed) we came to the conclusion that this MR is a good place to start. It contains the core changes which can be reused and improved upon. However, there are considerations that makes it easier to start a new MR and port the changes.
In this new attempt we must:
- Hand pick and port the changes in !3196 (closed) to a new MR and review them against the latest changes, including the latest release of Patroni (1.6.3) and the latest GitLab.com infrastructure practices.
- Hand over the control of PostgreSQL configuration to Patroni.
- Test HA with PostgreSQL 11.
- Decide whether leave Patroni in charge of the configuration or take it back and use Omnibus to configure both.
In this new attempt we keep both repmgr and Patroni. However, switching from one to the other is not the focus of this issue. The key objective here is to implement a validated minimum solution for supporting Patroni. This implementation is subject to change as we get more evidence from further testing and verification.
/cc @ljlane
Edited by Gerard Hickey