Skip to content

Metal Component Specification ​

Root specification · Behavior: Metal codebase guide

Purpose ​

Metal manages virtual machines on a host with metald. It does not own the proxy or WG Mesh.

For Go code, follow the repository Go anti-pattern rules.

Layout ​

text
cmd/metald/     metald executable
internal/       packages, each with a SPEC.md
scripts/        host bootstrap scripts
test/           integration test data
Makefile        builds metald into dist/

The module path is github.com/frappe/atlas/metal. Run Go commands from metal/.

Packages ​

PackageOwns
vmVM manager, records, and host service interfaces.
vm/migrationLive migration and its transport.
firecrackerFirecracker runtime and warm starts.
apiThin HTTP handlers.
hostHost synchronization and capacity.
consoleVM serial consoles over PTYs.
reconcilerVM and image loops.
storageZFS pool, disks, images, and snapshots.
networkVM networks and WireGuard peers.
platformHost files, commands, systemd.
telemetryMetrics push to Datum and the host collector.

Package imports ​

PackageImports
cmd/metaldapi, host, reconciler, firecracker, storage, network, vm/migration, network/traffic, telemetry
apivm, host, console, vm/migration
hostvm, network, storage, vm/migration
reconcilervm, storage, vm/migration
firecrackervm, storage, platform, console, Firecracker API
storagevm, platform
networkvm, platform, network/traffic
vm/migrationvm, storage, platform
network/trafficcilium eBPF
api, vm, vm/migration, reconciler, storage, firecrackertelemetry
telemetry/systemtelemetry, platform

vm must not import vm/migration. It reads migration locks through an injected guard.

Validation ​

See Metal development. The host layout lists each host file and dataset.

AGPL-3.0