feat(base-images): add managed base image bundles with cache retention, hosted manifests, and opt-in integration boot testing
This commit is contained in:
@@ -5,6 +5,9 @@
|
||||
- Uses `@push.rocks/smartrequest` with URL format `http://unix:<socket>:<path>` for socket communication
|
||||
- Uses `@push.rocks/smartshell` `execStreaming()` to manage Firecracker child processes
|
||||
- Uses `@push.rocks/smartexit` for cleanup on process exit
|
||||
- `BaseImageManager` downloads Firecracker CI demo artifacts or hosted project manifests into `/tmp/.smartvm/base-images` by default
|
||||
- Base image cache keeps 2 bundles by default and warns before evicting older bundles
|
||||
- Hosted manifest examples live in `assets/base-images/`
|
||||
|
||||
## Key API Patterns
|
||||
- SmartRequest: `SmartRequest.create().url(...).json(body).put()` — response has `.status`, `.ok`, `.json()`
|
||||
@@ -16,3 +19,9 @@
|
||||
- Start: PUT /actions { action_type: "InstanceStart" }
|
||||
- Pause/Resume: PATCH /vm { state: "Paused" | "Resumed" }
|
||||
- Stop: PUT /actions { action_type: "SendCtrlAltDel" }
|
||||
|
||||
## Integration Testing
|
||||
- Default `pnpm test` skips real Firecracker boot testing
|
||||
- Set `SMARTVM_RUN_INTEGRATION=true` to run the opt-in boot test
|
||||
- `SMARTVM_BASE_IMAGE_PRESET` supports `latest` and `lts`; default is `latest`
|
||||
- Hosted/project-owned bundles use `baseImageManifestUrl`, `baseImageManifestPath`, `manifestUrl`, or `manifestPath`
|
||||
|
||||
Reference in New Issue
Block a user