We want to move Gitlab behind the CDN to streamline our services after we have done the same with Gerrit (compare T411895)
Plan update (June 2026):
- SSH moves to a dedicated hostname gitlab-ssh.wikimedia.org.
- HTTPS will be served by text-lb instead of dedicated IPs. So the 14 gitlab-lb IPs can be returned. Backend config is being discussed with Traffic in T428903: gitlab behind CDN: serve gitlab.wm.o via text-lb instead of dedicated IPs?.
high-level steps:
- assign new public IPs
- create new discovery names
- prepare geoDNS (unused, superseded by text-lb)
- split SSH onto a dedicated hostname gitlab-ssh.wikimedia.org
- add gitlab to ATS as a backend (operations/puppet/+/1290731)
- T430655: Update gitlab cookbooks and processes patches ready and dry-run tested, merged after the switch by decision
- switch public DNS name to text-lb first attempt 2026-08-19, reverted the same day, retry below
- Post switch tasks
Current state (2026-08-31)
Replicas have been behind the CDN since 2026-08-12/13 and behave as intended. The primary switch of 2026-08-19 was reverted the same day after two distinct breakages, both since root-caused, neither of them a requestctl rule: T435290: GitLab fails to download artifacts between jobs, where gitlab-runner sends no User-Agent on its artifact direct-download path and is refused by the robot policy (T400119: Block traffic from user-agents not honoring our policy), fixed in gitlab-cloud-runner!627 and detailed in T425441#12247447; and T435292: The airflow-gitsync pods are adversely affected by gitlab being put behind the CDN, where the dse-k8s egress allowlist did not hold the text-lb VIPs so the pods' packets were dropped on the node, detailed in T425441#12270742.
Merge order
- operations/puppet/+/1332731 Revert^2 "gitlab: discard firewall throttling on the primary". Before the DNS change: the legacy nftables throttling causes envoy timeouts behind the edge.
- operations/dns/+/1332733 Revert^2 "gitlab: point gitlab.wikimedia.org at the CDN". The switch itself, off-peak, with arnaudb/debug-ci as a canary. TTL 180s.
More detailed steps copied from previous Gerrit task:
- Assign new public IPs: a v4 and a v6 in each of the DC-specific public service address ranges in (netbox)
- create DNS records g-lb.$DC.wikimedia.org (should be done by Netbox semi-automatically)
- Prepare for geodns with the new public IP
- Add a gitlab-addrs resource to operations/dns // geo-resources (https://gerrit.wikimedia.org/r/c/operations/dns/+/1282436)
- Update dns.admin cookbook to reflect gitlab-addrs (https://gerrit.wikimedia.org/r/c/operations/cookbooks/+/1290676)
- Update geodns schema in conftool-data/geodns/services.yaml to add gitlab-addrs for admin_state (https://gerrit.wikimedia.org/r/c/operations/puppet/+/1290677)
- Add a gitlab-addrs resource to operations/dns // geo-resources (https://gerrit.wikimedia.org/r/c/operations/dns/+/1282436)
Prepare tcpproxy VMs for accepting traffic on the new public IPssuperseded: SSH now uses a dedicated hostname, no tcpproxyCreate a new conftool service for tcp-proxyAdd gitlab-ssh support to the tcpproxy haproxy configCreate two new service catalog entries sharing those public IPs, LVS class high-traffic1- add LVS profiles to tcpproxy puppet role https://gerrit.wikimedia.org/r/c/operations/puppet/+/1215240
- Add gitlab to ATS cache_text as a backend (https://gerrit.wikimedia.org/r/c/operations/puppet/+/1290731). (T428903: gitlab behind CDN: serve gitlab.wm.o via text-lb instead of dedicated IPs?)
- Add an Envoy TLS-terminating sidecar on gitlab serving an internal cert on port 8443 (https://gerrit.wikimedia.org/r/c/operations/puppet/+/1293722), so ATS can validate the upstream chain. Same pattern as gerrit production.
- Same backend + Varnish entries for gitlab-replica-{a,b}.wikimedia.org (covered by https://gerrit.wikimedia.org/r/c/operations/puppet/+/1290731 via caching: 'pass')
- Ensure Varnish VCL includes gitlab.wm.o (covered by https://gerrit.wikimedia.org/r/c/operations/puppet/+/1290731 via caching: 'pass')
- Merge add a map for gitlab instances as a backend
Prepare cache_text servers as profile::lvs::realservers for gitlab-https
Acceptance criteria before continuing:
- on a cache_text host, curl -v https://gitlab.wikimedia.org --connect-to ::localhost
- this MUST show a HTTP 302 to Location: https://gitlab.wikimedia.org/explore
- must NOT serve a 5xx error, or show the default Mediawiki page served (HTTP 200 with resp hdr < server: mw-web.xxxx...)
- on a cache_text host, curl -s https://gitlab.wikimedia.org/explore --connect-to ::localhost | grep 'Explore projects'
- this MUST complete successfully, with a match on the <meta content= ...> tag
on a cache_text host, ip a show lo includes the public IPs for gitlab-lb.$DC
- SSH hostname migration (new dedicated gitlab-ssh.wikimedia.org)
- DNS for gitlab-ssh + gitlab-ssh-replica-{a,b} (https://gerrit.wikimedia.org/r/c/operations/dns/+/1298744)
- Share the SSH host key under the new name via ssh_extra_host_aliases (https://gerrit.wikimedia.org/r/c/operations/puppet/+/1298771)
- Advertise the new SSH hostname in the UI clone URLs on the replicas (https://gerrit.wikimedia.org/r/c/operations/puppet/+/1298781)
- Canary: clone + pull verified via both old and new hostname on both replicas
- Advertise on the primary (https://gerrit.wikimedia.org/r/c/operations/puppet/+/1300763), triggers gitlab-ctl reconfigure on gitlab1004
- Ship the new hostname in wmf-laptop ssh-client-config (https://gerrit.wikimedia.org/r/c/operations/debs/wmf-laptop/+/1300101)
- Document the SSH migration on wikitech (https://wikitech.wikimedia.org/wiki/GitLab/Migration)
- wikitech-l announce + GitLab banner
- Migrate the public gitlab replicas DNS record to text-lb
- Migrate the public gitlab.wikimedia.org DNS record to text-lb (https://gerrit.wikimedia.org/r/c/operations/dns/+/1324281) merged 2026-08-19, reverted by 1327066, retry is 1332733
- test and document emergency access when the CDN is down
- tunneling using tunnelencabulator documented here (https://wikitech.wikimedia.org/w/index.php?title=GitLab&diff=2447582&oldid=2420681)
- merge https://gerrit.wikimedia.org/r/c/operations/debs/wmf-laptop/+/1325854 + wmf-laptop rebuild and rollout
Post switch tasks
- merge the T430655: Update gitlab cookbooks and processes cookbooks once the switch is stable (https://gerrit.wikimedia.org/r/c/operations/cookbooks/+/1320977 and https://gerrit.wikimedia.org/r/c/operations/cookbooks/+/1320978)
[ ] per @taavi, determine whether or not we want to also include the new GitLab IPs on the Cloud VPS egress NAT exemption list- Return the 14 unused gitlab-lb IPs to netbox (helps T310265: Reduce usage of public IPv4 addresses on GitLab hosts, tracked in T430113: Remove unnecessary public IPs from Gitlab)
- Edit documented network topology
- update firewall config throttling part is 1332731 above
