Set up database service discovery in staging
GitLab 11.0 will include service discovery. We should set this up in staging, and later in production. To do so, we need to do the following:
- Every database secondary should run a service called something along the lines of
postgresql-secondary
. This service should be enabled/disabled automatically, based on who our secondaries are - We need to configure GitLab according to the steps outlined in https://docs.gitlab.com/ee/administration/database_load_balancing.html#service-discovery. This will require a hard restart of the Unicorn master, otherwise the changes in https://docs.gitlab.com/ee/administration/database_load_balancing.html#forking won't be applied (unless I'm mistaken)
For step 1 I'm not sure what the best approach is. We can do this via Chef, but then we need to manually update this data every time we fail over, or add more secondaries.
Edited by Yorick Peterse