5. Build
Goal: Run maand build after workspace changes and inspect the catalog before deploy.
Prerequisites: Chapter 4 — Project files.
Step 1 — Change something small
Open workspace/jobs/hello/manifest.json and bump the version:
"version": "1.0.1"
Save the file. No deploy yet — only build.
Step 2 — Run build
maand build
Build syncs workers and jobs into data/maand.db, refreshes allocations, validates resources, and may generate TLS if your manifest declares certs (not needed for hello).
Step 3 — Inspect the catalog
maand info
maand cat workers
maand cat jobs
maand cat allocations
maand cat jobs shows new_version from your manifest. Allocations pick up the target version at build time.
Step 4 — Understand build vs deploy
| build | deploy | |
|---|---|---|
| Reads | workspace/ |
maand.db |
| Writes | Local catalog | Worker filesystem + lifecycle |
| SSH to workers | No | Yes |
Typical loop: edit workspace → build (validate) → deploy (push).
Common build failures
| Symptom | Likely cause |
|---|---|
| Missing Makefile | Job folder incomplete |
| Worker too small | Job memory/CPU exceeds worker capacity in workers.json |
| Duplicate host | Two entries with same host in workers.json |
Details: Reference: build.
What you learned
maand buildupdates the local catalog from workspace- Use
maand catto inspect workers, jobs, and allocations after build - Build fails fast on validation errors — workers are untouched
Next
Chapter 6 — Deploy and changes: push version 1.0.1 to the worker.