RouterOS 002: Bootstrap netinstall script (boot config v1) #64
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/iac#64
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Part of #43
Refs: lab/iac#44, lab/iac#45
Migrated from router-as-code tracker 002 (docs/routeros/tracker in this repo history). Research notes: docs/routeros/notes/.
The bench netinstall Configure script, the only text artifact of the whole
system. ~30 lines, hand-written once, never grows. Everything after it is
Terraform. See note §1 (120 s timeout, reset-rerun semantics) and README
decision 3 (REST rides www-ssl).
Contents
/system identity, timezone, note off.friends must keep resolving — iac#45 comment 10628).
adminpassword +terraformAPI-only user (restricted group; the userTerraform authenticates as), SSH keys for the humans.
pki-net-caosh, rolerouteros) for this router's cert and key (<router>.net.caosh.int.animeteamspeak.moeplus its mgmt IP SAN) and embeds them:/certificate importboth, then/ip service set www-ssl certificate=<name> disabled=no. That makes the device reachable by the provider, which verifies it against the lab root. Binaryapiandapi-sslstay disabled. No cert-sign wait on the box any more..rscnow holds a private key: never in git, shredded after netinstall.vault_pki_secret_backend_cert->routeros_system_certificateimport ->www-sslbinding), so the cert objects and thewww-sslcertificate binding leave the protected set. The bootstrap still enableswww-ssl; #74's rollback timer covers a bad rotation.Rules baked in
reset-configuration(verified behaviour) and survives upgrades.
www-ssl, users, SSH keys, identity. No firewall, no VLANs beyond mgmt.
Done when
importinto factory CHR,#001) boots a device that answers REST at https:///rest with the
terraform user.
Bootstrap v2 delivered in PR #112 (branch routeros-bootstrap-64): host-driven REST first-contact + netinstall-cli driver, sim-proven on CHR 7.25.1, audited. Notable: per-user service= is a no-op relic on 7.25.1; group policy api+write is the real REST gate. Bench items (netinstall e2e, RB5009 factory-config) listed in BENCH-RUNBOOK.md; netinstall defaults to wipe. Awaiting review before merge.
Bench outcome 2026-11-16 (closed by #112; follow-ups #113-#115):
-r -sinstalls the bootstrap on all three devices: rb5009-a HMK0BE3QXBH, rb5009-b HMK0BD2DJXG, crs309 HD608FYE951. check-suite all pass against the production root (OpenBao pki-net-caosh certs). Builds after 2026-09-04 loop on BOOTP;-salone keeps the old config;-ewith-sis refused.advanced+routerboard=yes(power cycle confirms), thenboot-device=try-ethernet-once-then-nandand reboot.openbaostore (#115, clusters#1702).