Implement full snapshot lifecycle: pause (snapshot + free resources), resume (UFFD-based lazy restore), and named snapshot templates that can spawn new sandboxes from frozen VM state. Key changes: - Snapshot header system with generational diff mapping (inspired by e2b) - UFFD server for lazy page fault handling during snapshot restore - Stable rootfs symlink path (/tmp/fc-vm/) for snapshot compatibility - Templates DB table and CRUD API endpoints (POST/GET/DELETE /v1/snapshots) - CreateSnapshot/DeleteSnapshot RPCs in hostagent proto - Reconciler excludes paused sandboxes (expected absent from host agent) - Snapshot templates lock vcpus/memory to baked-in values - Proper cleanup of uffd sockets and pause snapshot files on destroy
26 lines
704 B
Plaintext
26 lines
704 B
Plaintext
# Database
|
|
DATABASE_URL=postgres://wrenn:wrenn@localhost:5432/wrenn?sslmode=disable
|
|
|
|
# Control Plane
|
|
CP_LISTEN_ADDR=:8000
|
|
CP_HOST_AGENT_ADDR=localhost:50051
|
|
|
|
# Host Agent
|
|
AGENT_LISTEN_ADDR=:50051
|
|
AGENT_KERNEL_PATH=/var/lib/wrenn/kernels/vmlinux
|
|
AGENT_IMAGES_PATH=/var/lib/wrenn/images
|
|
AGENT_SANDBOXES_PATH=/var/lib/wrenn/sandboxes
|
|
AGENT_SNAPSHOTS_PATH=/var/lib/wrenn/snapshots
|
|
AGENT_HOST_INTERFACE=eth0
|
|
|
|
# Lago (billing — external service)
|
|
LAGO_API_URL=http://localhost:3000
|
|
LAGO_API_KEY=
|
|
|
|
# Object Storage (hibernate snapshots — Hetzner Object Storage, S3-compatible)
|
|
S3_BUCKET=wrenn-snapshots
|
|
S3_REGION=fsn1
|
|
S3_ENDPOINT=https://fsn1.your-objectstorage.com
|
|
AWS_ACCESS_KEY_ID=
|
|
AWS_SECRET_ACCESS_KEY=
|