Skip to content

Design Notes

This section explains the architecture and implementation choices in Barn 0.9.0.

Start with the product model, then follow the boundaries outward:

  1. Why Barn has no projects — one inventory, one owner-scoped deployment, and no second source of truth.
  2. Why every node has two NICs — fixed identity for the lab, separate from management egress.
  3. Declarative does not mean destructive — per-node drift with explicit recreate and removal.
  4. A PID is not a virtual machine — QMP identity, process evidence, journals, and bounded recovery.
  5. repo.yaml is intent; catalog.json is evidence — a static image repository whose generated metadata is checked against the actual qcow2 bytes.

Use the documentation for commands and configuration, and Platforms and Limits to check whether Barn fits your host.

Design Notes
repo.yaml Is Intent; catalog.json Is Evidence ImagesSupply Chaincatalog
A PID Is Not a Virtual Machine QMPRecoverySafety
Declarative Does Not Mean Destructive LifecycleDriftSafety
Why Every Barn Node Has Two NICs NetworkingQEMUPigsty
Why Barn Has No Projects ArchitectureinventoryState
  • repo.yaml Is Intent; catalog.json Is Evidence

    In Design

    DesignImagesSupply Chaincatalog

    Featured Image for repo.yaml Is Intent; catalog.json Is Evidence

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. A static image repository sounds like a directory of qcow2 files plus a JSON index. The difficult part is …

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. A static image repository sounds like a directory of qcow2 files plus a JSON index. The difficult part is …

  • A PID Is Not a Virtual Machine

    In Design

    DesignQMPRecoverySafety

    Featured Image for A PID Is Not a Virtual Machine

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. A pidfile answers one question: which integer did a process have when the file was written? It does not prove …

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. A pidfile answers one question: which integer did a process have when the file was written? It does not prove …

  • Declarative Does Not Mean Destructive

    In Design

    DesignLifecycleDriftSafety

    Featured Image for Declarative Does Not Mean Destructive

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. “Declarative” is often shortened to “make reality equal the file.” That is a useful slogan until the file is …

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. “Declarative” is often shortened to “make reality equal the file.” That is a useful slogan until the file is …

  • Why Every Barn Node Has Two NICs

    In Design

    DesignNetworkingQEMUPigsty

    Featured Image for Why Every Barn Node Has Two NICs

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. A Pigsty inventory names machines by stable addresses. PostgreSQL replication, etcd membership, HAProxy …

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. A Pigsty inventory names machines by stable addresses. PostgreSQL replication, etcd membership, HAProxy …

  • Why Barn Has No Projects

    In Design

    DesignArchitectureinventoryState

    Featured Image for Why Barn Has No Projects

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. Barn began with a familiar VM-manager abstraction: a working directory was a project, a hidden marker gave it …

    This article describes Barn 0.9.0. The VM lifecycle and network design here apply to Linux guests; Mac machines are managed independently. Barn began with a familiar VM-manager abstraction: a working directory was a project, a hidden marker gave it …