ci: fetch vault from artifactapi instead of dnf install #99
Reference in New Issue
Block a user
Delete Branch "benvin/ci-vault-install-speedup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
CI installs vault by shelling out to
dnf install vault -y. That readsmetadata for every enabled repo (appstream/baseos/crb/epel/ha) and downloads
the 169MB vendored vault RPM from the
unkinrepo on every plan/apply run(~39s per job measured in
almalinux9-opentofu:20260606).Change
dnf install vault -ywith a pinnedcurlof the upstream vault zipfrom the artifactapi
hashicorp-releasesremote proxy, extracted with theimage's
python3(python3 -m zipfile) to/usr/local/bin/vault.VAULT_VERSIONenv var (1.20.0); bump the var toupgrade.
Speedup
Measured in
git.unkin.net/unkin/almalinux9-opentofu:20260606:dnf install vault -y(current)dnf --disablerepo='*' --enablerepo=unkin(still pulls 169MB RPM)~32s saved per plan/apply job. The zip is cached by artifactapi after first
fetch (warm ~3s).
Caveats
almalinux9-opentofuimage shipscurl+python3(bothpresent in
:20260606).hashicorp-releasesgeneric remote whosepatterns already allow
vault/.*vault_.*_linux_amd64.zip.