blueclaw

Deployment

A deployment is the daemon, Postgres, the setuid helper and, optionally, a capability service and chatd beside it.

The simplest shape is cmd/blueclaw as an ordinary process. A stronger shape runs it inside a virtual machine guest under cmd/blueclaw-supervisor, which boots the guest under Cloud Hypervisor or vfkit, mounts the workspace, proxies host and guest HTTP over vsock, and restores the workspace image. Cloud Hypervisor disks are attached as image_type=raw with PCI left on, and the delivery directory is served over virtio-fs.

BinaryPurpose
cmd/blueclawthe daemon
cmd/blueclaw-posix-helpersetuid identity switch, POSIX state sync, filesystem operations
cmd/blueclaw-cliterminal client and enrollment
cmd/blueclaw-supervisorboots and watches the guest
cmd/blueclaw-guest-healthd, cmd/blueclaw-vsock-http-proxyguest health and host-to-guest transport
cmd/blueclaw-backup, cmd/blueclaw-restoreworkspace and database snapshot bundles
cmd/blueclaw-labdevelopment VM lifecycle and scenario runner

Which revision is running

blueclaw --version prints it and GET /admin/api/harness carries it. The value comes from -ldflags, because blueclaw is often built as a submodule whose .git points outside the tree:

go build -ldflags "-X github.com/yeomyeonggeori/blueclaw/internal/buildrevision.injected=$(git rev-parse HEAD)" ./cmd/blueclaw

A build without it reports unknown, and a deploy check should refuse that.

Restarting safely

A running process keeps the configuration it started with. Before replacing the binary, call POST /admin/api/runtime/prepare-shutdown so runs in flight are interrupted and resumed once afterwards, or POST /admin/api/quiesce to stop taking new work. /admin/api/backup/prepare and /complete bracket a snapshot.

On this page