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
|
|
@ -1,6 +1,10 @@
|
|||
package api
|
||||
|
||||
import "banger/internal/model"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"banger/internal/model"
|
||||
)
|
||||
|
||||
type Empty struct{}
|
||||
|
||||
|
|
@ -24,6 +28,32 @@ type VMCreateParams struct {
|
|||
NoStart bool `json:"no_start,omitempty"`
|
||||
}
|
||||
|
||||
type VMCreateStatusParams struct {
|
||||
ID string `json:"id"`
|
||||
}
|
||||
|
||||
type VMCreateOperation struct {
|
||||
ID string `json:"id"`
|
||||
VMID string `json:"vm_id,omitempty"`
|
||||
VMName string `json:"vm_name,omitempty"`
|
||||
Stage string `json:"stage,omitempty"`
|
||||
Detail string `json:"detail,omitempty"`
|
||||
StartedAt time.Time `json:"started_at,omitempty"`
|
||||
UpdatedAt time.Time `json:"updated_at,omitempty"`
|
||||
Done bool `json:"done"`
|
||||
Success bool `json:"success"`
|
||||
Error string `json:"error,omitempty"`
|
||||
VM *model.VMRecord `json:"vm,omitempty"`
|
||||
}
|
||||
|
||||
type VMCreateBeginResult struct {
|
||||
Operation VMCreateOperation `json:"operation"`
|
||||
}
|
||||
|
||||
type VMCreateStatusResult struct {
|
||||
Operation VMCreateOperation `json:"operation"`
|
||||
}
|
||||
|
||||
type VMRefParams struct {
|
||||
IDOrName string `json:"id_or_name"`
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue