feat: multi-distro support and tagged golden snapshots

Add Alpine, Debian, and Ubuntu rootfs support to `init [distro]`.
Golden snapshots are now namespaced under `golden/<tag>/` so multiple
baselines can coexist. `spawn [tag] [N]` selects which snapshot to
clone from. Systemd-based distros (Debian, Ubuntu) get a fc-net-init
systemd unit; Alpine keeps its inittab-based init.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-14 20:48:43 +00:00
parent bfc1f47287
commit fb1db7c9ea
10 changed files with 576 additions and 102 deletions

21
test_mmds.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
sock="/tmp/fctest.sock"
rm -f "$sock"
firecracker --api-sock "$sock" &
FCPID=$!
sleep 1
# Configure MMDS backend
curl --unix-socket "$sock" -i -X PUT "http://localhost/mmds/config" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-d '{"version": "V1", "network_interfaces": ["1"], "ipv4_address": "169.254.169.254"}'
# Put data
curl --unix-socket "$sock" -i -X PUT "http://localhost/mmds" \
-H "Accept: application/json" -H "Content-Type: application/json" \
-d '{"ip": "10.0.0.2", "gw": "10.0.0.1", "dns": "1.1.1.1"}'
# Read data
curl --unix-socket "$sock" -i -X GET "http://localhost/mmds"
kill $FCPID