application.yaml
An application spec names a cluster and declares groups of instances, optionally with volumes, services and one load balancer.
api_version: genesis/v1
application:
name: shop # DNS-safe; instances are <name>-<group>-<n>
cluster: lab # a cluster registered in this ledger
groups: [...]
load_balancers: [...] # optional, at most one
groups
| Field | Default | Rules |
|---|---|---|
name | (required) | Unique. Instance keys are <name>-0, <name>-1, … |
count | (required) | 0 or more |
image | (required) | Any image the cluster can resolve: ubuntu:24.04, images:debian/12, or an alias you published |
type | container | container or vm |
target | (required) | Exactly count entries, keyed <name>-0 to <name>-(count-1), each naming a cluster member |
size.cpu | (required) | Positive integer. Becomes limits.cpu |
size.memory | (required) | NMiB or NGiB. Becomes limits.memory |
size.root_disk | NMiB or NGiB. Root disk size | |
env | Environment variable name to string value | |
refs | Environment variable name to an instance key or load balancer name. Keys can't overlap with env | |
expose | List of port: N/tcp, unique per group. Published on the member's tailnet address | |
health | Command argv run inside each instance; exit 0 means healthy. Required for container groups | |
volumes | See below | |
services | See below. At most one |
Exposed ports can't collide on a member, and never use the SSH or LXD control ports.
refs is checked (the target must exist) and, when it points at a service group, opens that path in the guard. In 0.1.0-dev it is not set inside the instance, and the general instance-to-instance traffic policy is undecided.
volumes
| Field | Default | Rules |
|---|---|---|
name | (required) | Unique across the application |
pool | (required) | A storage pool on the member, usually default |
size | (required) | NMiB or NGiB. Volumes grow; they never shrink |
content_type | filesystem | filesystem or block. Never changes after creation. Block volumes attach only to VM groups |
attach | (required) | Instance keys from this group |
mount | (required) | Absolute path, not / |
security.shared | false | Required when attach lists more than one instance. All of them must be on one member, and you approve the share with --force-volume-share |
services
A group with a service must be type: vm, count: 1, with image ubuntu:22.04 or ubuntu:24.04.
| Field | Default | Rules |
|---|---|---|
kind | (required) | postgres or clickhouse |
version | (required) | Never latest. PostgreSQL: a major ("17", newest release frozen at plan time) or an exact package version. ClickHouse: an exact numeric release like "24.8.4.13" |
admin_password_env | (required) | Name of the variable holding the admin password. plan and deploy refuse if unset or empty |
admin_user_env | Name of a variable holding the admin user. Otherwise postgres or default | |
name | the kind | Unique; used by upgrade --service and in plan rows (services.<name>) |
port | 5432 / 9000 | 1 to 65535 |
data_volume | the only block volume | Required unless exactly one block volume is attached |
data_path | Data directory inside the volume | |
mount_device | A /dev/disk/by-id/… path | |
health | generated | Must match the generated health command if given |
tuning | PostgreSQL: max_connections (positive integer), shared_buffers (size). ClickHouse: max_memory_usage (size) |
load_balancers
At most one.
| Field | Default | Rules |
|---|---|---|
name | (required) | Must not collide with a group name or instance key |
kind | (required) | haproxy |
balances | (required) | The group or groups whose instances become backends |
target | (required) | Exactly one replica: {<name>-0: <member>} |
listen | (required) | N/tcp, published on the member's tailnet address. Can't clash with a balanced group's exposure |
check.type | tcp | tcp or http |
check.path | For http checks | |
check.expect_status | For http checks |
The load balancer's check is separate from the group's health command.
Registration rules
- A name is bound to one spec path and one cluster the first time you
initit.init,plan,deploy,rollbackanddestroyrefuse if either changes:
application "<name>" is registered at <path> on cluster "<c>", not <path> on "<c>"
targetmembers must belong to the registered cluster. Change the cluster spec and the application refuses withsg:application-cluster-mismatchuntil placements match.