Manifest Syntax
Manifest files in Mesh Hypervisor tell the system how to set up files on remote nodes. They live in /host0/machines/ or /host0/groups/ on the central orchestration node, alongside source files they reference, and get compiled into APKOVLs during mesh system configure. This section explains the syntax—actions, fields, and rules—so you can tweak nodes even if you just know ssh and cat. For usage, see Manifest Files.
Overview
A manifest is a text file named manifest inside a folder like /host0/machines/my-server/. It lists actions—one per line—like copying a file or making a link. Each line starts with a letter (the action) and has fields (like permissions or paths). That same folder holds the files it calls (e.g., hostname next to manifest). When you run mesh system configure, Mesh Hypervisor reads these lines, applies them in order, and builds the node’s filesystem. If a machine folder uses groups (e.g., baseline), their manifests run first, then the machine’s overrides.
Think of it like a recipe: “Copy hostname to /etc/hostname,” “Make /mnt/data.” The compile-apkovl script checks every line—miss a file or botch the syntax, and the whole mesh system configure stops with an error. That’s on purpose: no silent failures allowed. You fix it, then rerun.
Syntax
Each line starts with an action letter, followed by space-separated fields (FIELD=value). Paths must be full (e.g., /host0/machines/my-server/hostname) since relative paths aren’t supported yet.
Actions
O(Overwrite):- Purpose: Copies a file from the folder (e.g.,
/host0/machines/my-server/) to the remote node, replacing what’s there. - Fields:
MODE=<user:group:perms>(Required): Sets ownership and permissions (e.g.,root:root:0644—read-write for owner, read for others).SRC=<full-path>(Required): Source file in the folder (e.g.,/host0/machines/my-server/hostname).TGT=<full-path>(Required): Target on the remote node (e.g.,/etc/hostname).
- Example:
O MODE=root:root:0644 SRC=/host0/machines/my-server/hostname TGT=/etc/hostname- Copies
hostnamefrommy-server/to/etc/hostnamewithrw-r--r--.
- Copies
- Purpose: Copies a file from the folder (e.g.,
A(Append):- Purpose: Adds a file’s contents from the folder to the end of a target file (creates it if missing).
- Fields: Same as
O—MODE,SRC,TGT. - Example:
A MODE=root:root:0644 SRC=/host0/machines/my-server/packages TGT=/etc/apk/world- Appends
packagesto/etc/apk/world, setsrw-r--r--.
- Appends
D(Directory):- Purpose: Makes a directory on the remote node.
- Fields:
MODE=<user:group:perms>(Required): Sets ownership and permissions (e.g.,root:root:0755—read-write-execute for owner, read-execute for others).TGT=<full-path>(Required): Directory path (e.g.,/mnt/data).
- Example:
D MODE=root:root:0755 TGT=/mnt/data- Creates
/mnt/datawithrwxr-xr-x.
- Creates
L(Soft Link):- Purpose: Creates a symbolic link on the remote node.
- Fields:
SRC=<full-path>(Required): What to link to (e.g.,/usr/share/zoneinfo/EST).TGT=<full-path>(Required): Link location (e.g.,/etc/localtime).
- Example:
L SRC=/usr/share/zoneinfo/EST TGT=/etc/localtime- Links
/etc/localtimeto/usr/share/zoneinfo/EST—perms come from the target.
- Links
R(Remove):- Purpose: Deletes a file or directory on the remote node.
- Fields:
TGT=<full-path>(Required): Path to remove (e.g.,/etc/init.d/hostname).
- Example:
R TGT=/etc/init.d/hostname- Removes
/etc/init.d/hostname.
- Removes
Fields Explained
MODE=<user:group:perms>:- Format:
user:group:octal(e.g.,root:root:0644). - Purpose: Sets who owns the file and what they can do—
0644is owner read-write, others read;0755adds execute. - Used In:
O,A,D—notL(links use target perms) orR(no perms to set). - Must Have: Yes for
O,A,D—skip it, and the script errors out.
- Format:
SRC=<full-path>:- Format: Complete path on the central node (e.g.,
/host0/machines/my-server/hostname). - Purpose: Points to a file in the same folder as
manifest—must exist whenmesh system configureruns. - Used In:
O,A,L—notD(no source) orR(nothing to copy). - Must Have: Yes for
O,A,L—missing file stops the build.
- Format: Complete path on the central node (e.g.,
TGT=<full-path>:- Format: Complete path on the remote node (e.g.,
/etc/hostname). - Purpose: Where the action happens—parent dirs are auto-created.
- Used In: All actions (
O,A,D,L,R). - Must Have: Yes—every action needs a target.
- Format: Complete path on the remote node (e.g.,
Example Manifest
/host0/machines/my-server/manifest:
# Set a custom hostname from this folder
O MODE=root:root:0644 SRC=/host0/machines/my-server/hostname TGT=/etc/hostname
# Add packages from this folder
A MODE=root:root:0644 SRC=/host0/machines/my-server/packages TGT=/etc/apk/world
# Make a mount point
D MODE=root:root:0755 TGT=/mnt/data
# Remove default hostname service
R TGT=/etc/init.d/hostname
- Source files
hostnameandpackageslive in/host0/machines/my-server/withmanifest.
How It Works
When you run mesh system configure, the compile-apkovl script processes every manifest:
- Compilation: Reads group manifests (from
groups) first, then the machine’s—later lines override earlier ones.- Example:
baselinesets/etc/motd,my-serveroverwrites it,my-serverwins.
- Example:
- Actions: For each line:
O: CopiesSRCtoTGT, setsMODE.A: AppendsSRCtoTGT(creates if missing), setsMODE, adds a newline if needed.D: MakesTGTdir, setsMODE.L: LinksTGTtoSRC.R: DeletesTGT(recursive for dirs).
- Validation: Checks
SRCexists (forO,A),MODEis valid, and paths are full—any error (e.g., missinghostname) stops the entire build.- Fix it, rerun
mesh system configure, or no APKOVLs get made.
- Fix it, rerun
The result lands in /srv/pxen/http/, and nodes grab it on boot.
Notes
Source files sit in the same folder as manifest (e.g., /host0/machines/my-server/hostname)—keep them together. Paths must be full (e.g., /host0/...)—relative paths like hostname won’t work until a future update. A is safer than O for files like /etc/apk/world—it adds, doesn’t wipe. For examples, see Configuring Nodes; for network configs, see Network Config.
This concludes the Configuration Reference.