Use consul for host inventory and DNS instead of chef
This issue is specifically for replacing the way we currently manage host inventory with consul.
Currently we use chef role lookups to discover hosts:
- prometheus
- gitlab-exporter
- deployer / patcher
Open questions
- We currently have multiple consul clusters, production, staging, dr, etc. For host discovery do we use these and if so how can we ensure that we can resolve both staging and production hosts from the runners in ops? Federation of the consul clusters?
- Do we need DNS caching? https://www.consul.io/docs/guides/dns-cache.html
- We use chef roles currently for lookups, as we transition to consul how will this translate to tags? do we use
stage
,tier
,type
andenvironment
? Will those be sufficient?
Related issues
- Investigate using consul for service discovery https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5894#note_132168836
- Blueprint for productizing consul https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/6132
- Improve consul logging https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5844
- Dynamically populate HAProxy backends using consul https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5301
- Create DNS entries for vms outside of the ops project https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/4800
- Create consul server for runners https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/1639
- Internal DNS service using consul (was never implemented) https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/1723
Edited by John Jarvis