Add mail edge and vpn hosts to the DMZ VPCs #2
Reference in New Issue
Block a user
Delete Branch "benvin/mail-gateways"
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?
Each region (syd, mel) needs a postfix edge gateway that reaches the lab without carrying WireGuard, so each DMZ VPC also gets a vpn host peering OSPF with prodnxsr0020 over its own wg link.
router_linksfor the prodnxsr0020 Puppet configbinarylane_server.gateway) — nolifecycleblock, and in this provider auser_dataorimagediff is an in-place rebuild/reimage (server_resource.go Update: rebuild onuser_data/ssh_keys, resize+ChangeImage onimage), which wipes the disk. Editingallowed_ips, the template, or thealma-9slug rebuilds both MTAs → addlifecycle { ignore_changes = [user_data, image] }, plusprevent_destroy = true(replace is the other path:regionis RequiresReplace and would change the public IP/PTR/IP reputation).systemctl enable --now wg-quick@wg0succeeds without a handshake, then/etc/resolv.confis pointed solely at 198.18.200.7 (tunnel-only) and Puppet is installed/configured. The hub peer lands in a separate PR, so on first boot the tunnel is down, thednf installof the puppet release rpm fails on DNS, the laterpuppet config set/enablelines fail, and runcmd never retries → gateway never bootstraps. Add a bounded wait for a handshake afterenable --now(e.g. loop onwg show wg0 latest-handshakesnon-zero, ~5 min timeout, fail loudly) before touching resolv.conf, or keep the DHCP resolvers until the handshake is confirmed.wg_private_keyis inuser_data, readable via the BinaryLane API (provider itself reads it back) and persisted in/var/lib/cloud/instance/user-data.txt; withignore_changesabove it will never rotate. Acceptable only because the API token already grants console/root reset; if kept, have Puppet re-key wg0 post-bootstrap and treat the Vault key as bootstrap-only..terraform.lock.hclinenvironments/global/andmodules/binarylane/→ keep one (terragrunt copies the one besideterragrunt.hclinto the cache).printf ... > /etc/resolv.confwrites through the EL9 NM symlink (/etc/resolv.conf->/run/NetworkManager/resolv.conf); withdns=noneNM never repopulates the tmpfs target, so after any reboot resolv.conf is empty/dangling and puppet/artifactapi lookups fail →rm -f /etc/resolv.confbefore the printf so it is a persistent regular file.systemctl reload NetworkManageris async, so the resolv.conf write can race the reload → usenmcli general reload(synchronous).dnf installfails, wg-bootstrap still switches DNS and then loops forever onenable --now puppet(unit missing), with no re-install since runcmd is first-boot only → addrpm -q openvox-agent(orsystemctl cat puppet) as the first line of wg-bootstrap, before the DNS switch.Add DMZ mail gateways mta1/mta2to Add mail edge and vpn hosts to the DMZ VPCs