|
DOCFIX-146: opnsense-edge module + nano-image/config-ISO prep scripts
Implements the mechanism identified in today's OPNsense deployment research (cloud-init confirmed unreliable on FreeBSD; the real native mechanism is OPNsense's Configuration Importer, which scans an attached volume for /conf/config.xml and gained ISO9660 support specifically for VM/cloud automation). scripts/opnsense-prep-image.sh: downloads the nano image, decompresses, converts raw->qcow2, resizes -- work create.content.url almost certainly can't do itself (a plain fetch, no decompression). No hardcoded mirror URL; OPNSENSE_MIRROR_BASE is required explicitly. scripts/opnsense-build-config-iso.sh: builds the ISO9660 image containing /conf/config.xml that the Configuration Importer picks up. opentofu/modules/opnsense-edge: wires both together, mechanically identical to modules/cloudinit-vm's cdrom-attach shape but with no libvirt_cloudinit_disk resource (wrong format for this). Explicit lan_network_name/wan_network_name variables rather than an ordered list, since OPNsense's interface-1-is-LAN convention makes list-ordering a real place for a silent mistake to hide. No PXE boot-order attribute used -- this VM boots from its own disk, not the network, so node-vm's flagged-unverified boot field doesn't apply here. Both new scripts' harnesses (4/4, 3/3) exercise REAL missing-tool guards -- qemu-img/genisoimage/xorriso are all genuinely absent from this environment. Two things flagged, not presented as fact: whether the Importer's ISO9660 behavior holds on a real boot, and whether interface list-order reliably maps to LAN/WAN NIC enumeration for this guest. config_iso_path has no default -- real config.xml content per site is still undesigned. Not instantiated in root main.tf. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QrcJx8TUar7pYAvpGJw57A |
|---|
|
|
| docs/changelog-20260709-opnsense-edge-module.md 0 → 100644 |
|---|
| docs/dc-dc-deployment-workflow.md |
|---|
| docs/session-ledger.md |
|---|
| opentofu/README.md |
|---|
| opentofu/modules/opnsense-edge/main.tf 0 → 100644 |
|---|
| opentofu/modules/opnsense-edge/outputs.tf 0 → 100644 |
|---|
| opentofu/modules/opnsense-edge/variables.tf 0 → 100644 |
|---|
| scripts/opnsense-build-config-iso.sh 0 → 100644 |
|---|
| scripts/opnsense-prep-image.sh 0 → 100644 |
|---|
| tests/opnsense-build-config-iso/run-tests.sh 0 → 100644 |
|---|
| tests/opnsense-prep-image/run-tests.sh 0 → 100644 |
|---|