Page MenuHomePhabricator

Create cache proxy on integration VPS via Tofu
Closed, ResolvedPublic

Description

Follow-up to T437005: Test out the https://github.com/git-pkgs/proxy/ for CI. The proxy now runs in the integration project, rather than on borrowed quota in mediawiki-quickstart.

What is running

  • integration-cache-proxy, 2 vCPU / 4GB 8 vCPU / 32GB (g4.cores8.ram32.disk20), Debian 13, with a 40GB 320GB 4x-iops Cinder volume mounted at /mnt/data. We can pretty easily expand the volume size later if we get a storage quota bump. Resized after the disk quota bump (T438516) and the vCPU bump (T438940). The artifact cache, the sqlite database and the access log all live on it.
  • git-pkgs/proxy 0.7.0 0.8.1, installed from its release tarball with the checksum verified, supervised by systemd as an unprivileged user. Newer releases are installed in place with upgrade-proxy.sh.
  • No public hostname and no change to the shared security group. It is reachable only from other instances in integration, at http://integration-cache-proxy.integration.eqiad1.wikimedia.cloud:8080 plus the ecosystem path, so /npm, /composer, and so on.

All of it is OpenTofu managed, so it can be destroyed and rebuilt: https://gitlab.wikimedia.org/mhurd/integration-cache-proxy

Worth knowing before anyone rebuilds it

  • Instances created on VLAN/legacy never get a DHCP lease, so they never reach the metadata service, cloud-init falls back to DataSourceNone and no user data runs at all. Three instances failed this way before we spotted it. Use VXLAN/IPv6-dualstack, which is where the CI agents, castor and the puppetserver already are.
  • Each new instance needs its Puppet certificate signed by hand, because the project has not set profile::puppet::agent::puppetserver_ca_cert in Hiera. The repo README has the steps. Setting that Hiera key would remove the need (see T429413: Eliminate sudo rm -rf /var/lib/puppet/ssl step in new deployment-prep WMCS project (and others)).
  • Traffic is plain http, so Composer needs secure-http: false, pip needs a --trusted-host, and Docker needs an insecure-registries entry. npm needs nothing.

Dashboard

There is no public URL by design. Forward the port over ssh (tunnel) and open it locally; the command and an explanation are under Viewing the web UI in the README.

Dashboard via SSH tunnel:

Screenshot 2026-09-17 at 6.20.52 PM.png (1,786×1,944 px, 629 KB)

Event Timeline

Updates:

  • Upgraded the proxy to 0.8.1 in place with a new upgrade-proxy.sh. The web UI footer now shows the running version, which is nice
  • Moved the proxy config into tofu/proxy.config.yaml, pushed with a new update-proxy-config.sh
  • The requested quota bump landed T438516 so I expanded the storage volume from 40GB to 320GB and raised max_size to 290GB
  • A running instance doesn't see a resized volume until it's hard-rebooted. The steps are in the tofu README, with a new grow-volume.sh for the rest

Proxy seems healthy on 0.8.1.

CPU/RAM now equivalent to Castor's:

ssh integration-cache-proxy.integration.eqiad1.wikimedia.cloud 'echo "CPUs: $(nproc)"; echo "RAM:  $(free -h | awk "/^Mem:/{print \$2}")"; echo "Proxy: $(systemctl is-active proxy)"; echo "Health: $(curl -s localhost:8080/health)"'
CPUs: 8
RAM:  31Gi
Proxy: active
Health: {"status":"ok","checks":{"database":{"status":"ok"},"storage":{"status":"ok"}}}