Configuring Nodes

In Mesh Hypervisor, remote nodes are configured to run bare-metal tasks directly on their Alpine OS using machine folders and group folders in /host0/. Machine folders target specific nodes with custom settings, while group folders provide reusable configurations across multiple nodes. These are combined into node-specific APKOVLs by the compile-apkovl script, applied during PXE boot. This section walks through simple setup steps, run from the central orchestration node’s CLI. For KVM workloads, see Configuring Workloads.

Prerequisites

Before starting, ensure:

  • Remote nodes are online (check with mesh node info).
  • Central node is running (mesh system start executed).

All actions occur on the central node’s console.

Understanding Node Configuration

Node configurations are stored in /host0/ subdirectories. Here’s the basics:

  • Machine Folders: In /host0/machines/ with user-chosen names (e.g., my-server, default). Each ties to a node via a uuid file.
  • Group Folders: In /host0/groups/ (e.g., timezone-est, baseline). These are shared setups applied to machines.
  • Compilation: The mesh system configure command merges group and machine settings into an APKOVL, stored in /srv/pxen/http/ for nodes to fetch.

Files in Machine and Group Folders

Both folder types can include:

  • manifest (Required): Defines files to install or modify on the node.
  • packages (Optional): Lists Alpine packages (e.g., chrony) to add to the node’s /etc/apk/world.

Machine folders also use:

  • uuid (Required): Holds the node’s 8-character UUID (e.g., 10eff964) or default for new nodes.
  • groups (Optional): Lists group folders (e.g., baseline, timezone-est) to apply, in order—only these groups are included.
  • SKIP (Optional): An empty file; if present, skips APKOVL compilation for that machine.

Special Machine Folders

Two special cases exist:

  • default: UUID is default. Configures new nodes until a matching UUID folder is set.
  • initramfs: Builds the initramfs APKOVL, used system-wide during boot.

Configuring a Group

Set up a reusable group to set the EST timezone on multiple nodes:

  1. Create the folder /host0/groups/timezone-est/.
  2. Add /host0/groups/timezone-est/manifest:
    L SRC=/usr/share/zoneinfo/EST TGT=/etc/localtime
    
    This creates a soft link to set the node’s timezone to EST.

Configuring a Machine

Configure a node with UUID 10eff964 to use a manual hostname and the EST timezone:

  1. Create the folder /host0/machines/my-server/ (name is arbitrary).
  2. Add /host0/machines/my-server/uuid:
    10eff964
    
    This links the folder to the node’s UUID (discovered via mesh node info).
  3. Add /host0/machines/my-server/groups:
    baseline
    timezone-est
    
    This applies baseline (for essential setup) and timezone-est. Only listed groups are included.
  4. Add /host0/machines/my-server/manifest:
    O MODE=root:root:0644 SRC=/host0/machines/my-server/hostname TGT=/etc/hostname
    
    This sets a manual hostname (e.g., node1).
  5. Add /host0/machines/my-server/hostname:
    node1
    
    This is the source file for the hostname.

Applying the Configuration

Apply the setup to the node:

  1. Compile the APKOVLs:
    mesh system configure
    
    This builds an APKOVL for each machine folder in /host0/machines/.
  2. Reboot the node:
    mesh node ctl -n 10eff964 "reboot"
    
    The node fetches its APKOVL and applies the settings.

Running Tasks

Verify the setup:

mesh node ctl -n 10eff964 "cat /etc/hostname"

This should output node1.

Notes

  • Groups do not nest—only machine folders use a groups file to reference top-level /host0/groups/ folders, and only those listed are applied (e.g., baseline must be explicit).
  • The groups file order sets manifest application, with the machine’s manifest overriding last.
  • If packages are added, run mesh system download first to update the mirror.
  • For manifest syntax, see Manifest Files; for node control, see Managing Nodes.

Next, explore Network Configuration.