Add experimental Void guest workflow and vsock agent
Make iterating on a Firecracker-friendly Void guest practical without replacing the Debian default image path. Add local Void rootfs build/register/verify plumbing, a language-agnostic dev package baseline, and guest SSH/work-disk hardening so new images use the runtime bundle key, keep a normal root bash environment, and repair stale nested /root layouts on restart. Replace the guest PING/PONG responder with an HTTP /healthz agent over vsock, rename the runtime bundle and config surface from ping helper to agent while still accepting the legacy keys, and route the post-SSH reminder through the new vm.health path. Validated with GOCACHE=/tmp/banger-gocache go test ./..., make build, bash -n customize.sh make-rootfs-void.sh, and git diff --check.
This commit is contained in:
parent
c8d9a122f9
commit
3ed78fdcfc
42 changed files with 2222 additions and 388 deletions
30
Makefile
30
Makefile
|
|
@ -12,17 +12,19 @@ RUNTIME_MANIFEST ?= runtime-bundle.toml
|
|||
RUNTIME_SOURCE_DIR ?= runtime
|
||||
RUNTIME_ARCHIVE ?= dist/banger-runtime.tar.gz
|
||||
BINARIES := banger bangerd
|
||||
RUNTIME_HELPERS := $(RUNTIME_SOURCE_DIR)/banger-vsock-pingd
|
||||
RUNTIME_HELPERS := $(RUNTIME_SOURCE_DIR)/banger-vsock-agent
|
||||
GO_SOURCES := $(shell find cmd internal -type f -name '*.go' | sort)
|
||||
RUNTIME_EXECUTABLES := firecracker customize.sh packages.sh namegen banger-vsock-pingd
|
||||
RUNTIME_EXECUTABLES := firecracker customize.sh packages.sh namegen banger-vsock-agent
|
||||
RUNTIME_DATA_FILES := packages.apt id_ed25519 rootfs-docker.ext4
|
||||
RUNTIME_OPTIONAL_DATA_FILES := rootfs.ext4 rootfs-docker.work-seed.ext4 bundle.json
|
||||
RUNTIME_BOOT_FILES := wtf/root/boot/vmlinux-6.8.0-94-generic wtf/root/boot/initrd.img-6.8.0-94-generic
|
||||
RUNTIME_MODULES_DIR := wtf/root/lib/modules/6.8.0-94-generic
|
||||
VOID_IMAGE_NAME ?= void-exp
|
||||
VOID_VM_NAME ?= void-dev
|
||||
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
.PHONY: help build banger bangerd test fmt tidy clean rootfs install runtime-bundle runtime-package check-runtime bench-create
|
||||
.PHONY: help build banger bangerd test fmt tidy clean rootfs rootfs-void void-register void-vm verify-void install runtime-bundle runtime-package check-runtime bench-create
|
||||
|
||||
help:
|
||||
@printf '%s\n' \
|
||||
|
|
@ -36,7 +38,11 @@ help:
|
|||
' make fmt Format Go sources under cmd/ and internal/' \
|
||||
' make tidy Run go mod tidy' \
|
||||
' make clean Remove built Go binaries' \
|
||||
' make rootfs Rebuild the source-checkout default rootfs image in ./runtime'
|
||||
' make rootfs Rebuild the source-checkout default Debian rootfs image in ./runtime' \
|
||||
' make rootfs-void Build an experimental Void Linux rootfs and work-seed in ./runtime' \
|
||||
' make void-register Register or update the experimental Void image as $(VOID_IMAGE_NAME)' \
|
||||
' make void-vm Register the experimental Void image and create a VM named $(VOID_VM_NAME)' \
|
||||
' make verify-void Register the experimental Void image and run verify.sh against it'
|
||||
|
||||
build: $(BINARIES) $(RUNTIME_HELPERS)
|
||||
|
||||
|
|
@ -46,9 +52,9 @@ banger: $(GO_SOURCES) go.mod go.sum
|
|||
bangerd: $(GO_SOURCES) go.mod go.sum
|
||||
$(GO) build -o ./bangerd ./cmd/bangerd
|
||||
|
||||
$(RUNTIME_SOURCE_DIR)/banger-vsock-pingd: $(GO_SOURCES) go.mod go.sum
|
||||
$(RUNTIME_SOURCE_DIR)/banger-vsock-agent: $(GO_SOURCES) go.mod go.sum
|
||||
mkdir -p "$(RUNTIME_SOURCE_DIR)"
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -o "$(RUNTIME_SOURCE_DIR)/banger-vsock-pingd" ./cmd/banger-vsock-pingd
|
||||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -o "$(RUNTIME_SOURCE_DIR)/banger-vsock-agent" ./cmd/banger-vsock-agent
|
||||
|
||||
test:
|
||||
$(GO) test ./...
|
||||
|
|
@ -100,3 +106,15 @@ install: build check-runtime
|
|||
|
||||
rootfs:
|
||||
BANGER_RUNTIME_DIR="$(abspath $(RUNTIME_SOURCE_DIR))" ./make-rootfs.sh
|
||||
|
||||
rootfs-void:
|
||||
BANGER_RUNTIME_DIR="$(abspath $(RUNTIME_SOURCE_DIR))" ./make-rootfs-void.sh
|
||||
|
||||
void-register: build
|
||||
./banger image register --name "$(VOID_IMAGE_NAME)" --rootfs "$(abspath $(RUNTIME_SOURCE_DIR))/rootfs-void.ext4" --work-seed "$(abspath $(RUNTIME_SOURCE_DIR))/rootfs-void.work-seed.ext4" --packages "$(abspath packages.void)"
|
||||
|
||||
void-vm: void-register
|
||||
./banger vm create --image "$(VOID_IMAGE_NAME)" --name "$(VOID_VM_NAME)"
|
||||
|
||||
verify-void: void-register
|
||||
./verify.sh --image "$(VOID_IMAGE_NAME)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue