Files
computer-playbook/compose/swarm/registry_cache.yml
kevinveenbirkenbachandClaude Opus 5 7dc2e62dda perf(swarm-test): pull node images through the host registry cache
The DinD nodes fetched every image straight from upstream while the warm
host cache sat unused beside them; only the DiD container was wired to
it. CA and proxy drop-in are now placed during bootstrap, before the
deploy installs docker, so the daemon picks them up on its first start.
NO_PROXY carries the node names because the in-cluster registry is
addressed by hostname and the proxy intercepts pulls only. Without a
local cache stack, as in CI, the CA is never mounted and the block is
skipped entirely.

Cut the prometheus swarm step from a 5h45 timeout to 4h03 green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 16:15:57 +02:00

24 lines
700 B
YAML

---
- name: install the registry-cache CA into the node trust store
command: /usr/local/bin/registry-cache-ca.sh
timeout: 60
changed_when: true
- name: ensure the docker drop-in directory exists
file:
path: /etc/systemd/system/docker.service.d
state: directory
mode: "0755"
timeout: 30
- name: route the node docker daemon through the registry cache
copy:
dest: /etc/systemd/system/docker.service.d/registry-cache-proxy.conf
mode: "0644"
content: |
[Service]
Environment="HTTP_PROXY=http://infinito-registry-cache:3128"
Environment="HTTPS_PROXY=http://infinito-registry-cache:3128"
Environment="NO_PROXY={{ lab_no_proxy }}"
timeout: 30