utils.tests.swarm.write package¶
Submodules¶
utils.tests.swarm.write.extras module¶
Runtime-only extras YAML for the swarm-NFS test pipeline.
Companion to the static inventories/development/swarm.yml; both
are loaded by the deploy step. Generates an ed25519 keypair at
KEY_PATH if missing so the public half can land in
users.administrator.authorized_keys.
Inputs (env): NFS_IP, MGR_IP, MGR, OUT_PATH (default
/tmp/swarm-nfs-extras.yml), KEY_PATH (default
/tmp/swarm-nfs-admin.key). A second ed25519 keypair is generated at
INFINITO_SWARM_BACKUP_KEY (SPOT: default.env) and its public half lands
in users.backup.authorized_keys so the DR drill’s backup host can pull
over the user-backup ssh-wrapper. The applications block written into
the extras file carries the local-2-device mount/target/source device
paths, which is all the DR drill reads back from it. The deploy-facing
overrides, including remote-2-local.backup_providers (derived per round
from utils.tests.swarm.backup_repos), are baked by the matrix
orchestrator into the provisioner’s host_vars merge (INFINITO_VARS_PAYLOAD),
NOT into the extras file: extra-vars replace the whole inventory
applications dict and would strip every generated credential. users
carries the same hazard for the same reason, and its authorized_keys travel
the same merge channel. The deploy-facing twin <OUT_PATH stem>.deploy.yml
therefore carries everything except applications and users, plus
ansible_become_password.
- utils.tests.swarm.write.extras.backup_applications_overrides(providers: list[str]) dict¶
Application overrides for the backup-host roles the DR drill triggers.
- Parameters:
providers – node IPs svc-bkp-remote-2-local pulls from, as derived by
utils.tests.swarm.backup_repos.backup_provider_ips.- Returns:
dict with the
applicationssubtree for svc-bkp-remote-2-local (backup_providers) and svc-bkp-local-2-device (device paths).
- utils.tests.swarm.write.extras.device_applications_overrides() dict¶
Application overrides for svc-bkp-local-2-device.
- Returns:
dict with the
applicationssubtree the DR drill reads back from the extras file (mount/target) and the backup host deploys.
- utils.tests.swarm.write.extras.ensure_swarm_keypairs() dict[str, str]¶
Create the swarm-test keypairs if they are absent and return the public keys.
- Returns:
Public key per user name, for
administratorandbackup.
The matrix orchestrator needs these before it provisions, so that the authorized_keys reach host_vars through the merging
--varschannel rather than through the replacing extra-vars file.
- utils.tests.swarm.write.extras.main() int¶
utils.tests.swarm.write.hosts_entries module¶
Print <ip> <domain> lines for every canonical domain
(plus www. redirects and the primary itself) owned by APP_ID
or its transitive deps.
Inputs (env): APP_ID, INFINITO_DOMAIN (the SPOT for the
deployment domain; defined in default.env and exported by
scripts/meta/env/load.sh; the development inventory reads the
same env var for the play’s DOMAIN_PRIMARY),
HOSTS_ENTRY_IP (optional; address the domains map to,
default 127.0.0.1).
- utils.tests.swarm.write.hosts_entries.main() int¶