I've documented on the Makefile some steps I used to make a working postgres replication master/slave on my local machine.
This is something that will help anyone working with GitLab Geo in the future: https://gitlab.com/gitlab-org/gitlab-ee/issues/76
This still not perfect, so I would like some help from anyone who can automate it better then I do.
Current Caveats:
- I got it working correctly only with a clean postgres install
How to use it:
rm -rf postgresql
make postgresql
make postgresql-replication/cluster
foreman start postgresql
make postgresql-replication/role
make postgresql-replication/backup
-
add replication user data to pg_hba on(automated)postgresql/data/pg_hba.conf
- stop foreman and start it normally with
foreman start
and then bootstrap gitlab database as always
pg_hba data:
host replication gitlab_replication 127.0.0.1/32 trust
host replication gitlab_replication ::1/128 trust