Manage image artifacts and show VM create progress
Stop relying on ad hoc rootfs handling by adding image promotion, managed work-seed fingerprint metadata, and lazy self-healing for older managed images after the first create. Rebuild guest images with baked SSH access, a guest NIC bootstrap, and default opencode services, and add the staged Void kernel/initramfs/modules workflow so void-exp uses a matching Void boot stack. Replace the opaque blocking vm.create RPC with a begin/status flow that prints live stages in the CLI while still waiting for vsock health and opencode on guest port 4096. Validate with GOCACHE=/tmp/banger-gocache go test ./... and live void-exp create/delete smoke runs.
This commit is contained in:
parent
9f09b0d25c
commit
30f0c0b54a
37 changed files with 2334 additions and 99 deletions
28
customize.sh
28
customize.sh
|
|
@ -418,6 +418,12 @@ DEBIAN_FRONTEND=noninteractive apt-get -y upgrade
|
|||
DEBIAN_FRONTEND=noninteractive apt-get -y install ${APT_PACKAGES_ESCAPED}
|
||||
curl -fsSL https://mise.run | MISE_INSTALL_PATH=\"$MISE_INSTALL_PATH\" MISE_VERSION=\"$MISE_VERSION\" sh
|
||||
\"$MISE_INSTALL_PATH\" use -g github:anomalyco/opencode
|
||||
\"$MISE_INSTALL_PATH\" reshim
|
||||
if [[ ! -e /root/.local/share/mise/shims/opencode ]]; then
|
||||
echo 'opencode shim not found after mise install' >&2
|
||||
exit 1
|
||||
fi
|
||||
ln -snf /root/.local/share/mise/shims/opencode /usr/local/bin/opencode
|
||||
mkdir -p /etc/profile.d
|
||||
cat > /etc/profile.d/mise.sh <<'MISEPROFILE'
|
||||
if [ -n \"\${BASH_VERSION:-}\" ] && [ -x \"$MISE_INSTALL_PATH\" ]; then
|
||||
|
|
@ -441,6 +447,28 @@ fi
|
|||
rm -f /root/get-docker /root/get-docker.sh /tmp/get-docker /tmp/get-docker.sh
|
||||
chmod 0755 /usr/local/bin/banger-vsock-agent
|
||||
mkdir -p /etc/modules-load.d /etc/systemd/system
|
||||
cat > /etc/systemd/system/banger-opencode.service <<'EOF'
|
||||
[Unit]
|
||||
Description=Banger opencode server
|
||||
After=network.target
|
||||
RequiresMountsFor=/root
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
Environment=HOME=/root
|
||||
WorkingDirectory=/root
|
||||
ExecStart=/usr/local/bin/opencode serve --hostname 0.0.0.0 --port 4096
|
||||
Restart=on-failure
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
chmod 0644 /etc/systemd/system/banger-opencode.service
|
||||
if command -v systemctl >/dev/null 2>&1; then
|
||||
systemctl daemon-reload || true
|
||||
systemctl enable --now banger-opencode.service || true
|
||||
fi
|
||||
cat > /etc/modules-load.d/banger-vsock.conf <<'EOF'
|
||||
vsock
|
||||
vmw_vsock_virtio_transport
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue