Stateless (Warewulf-style) provisioning: profiles, node pools, overlays, dnsmasq export, compute image
CI / agent (push) Successful in 3s
CI / site (push) Successful in 3s
CI / go (push) Failing after 36s

Profiles bind a RAM-booted root image to overlay templates; assigning a
machine allocates a node name and management IP, writes the per-MAC PXE
entry with a per-node token and exports static leases for dnsmasq. Nodes
pull rendered overlays (hosts, slurm.conf from inventory, gres.conf, SSH
host key, munge key) through rollcall-overlay.service; the runtime refresh
timer is the heartbeat. Adds the compute-debian13 image definition and a
generic live-build root image script, CLI and web UI for profiles/assign.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Fable 5.1 committed 2026-10-27 02:00:14 +01:00
1 parent 1430421a3f
commit 7fe7c26e22
38 files changed
+1543 -16

No files matched your search

+24
View File
@@ -4,6 +4,8 @@ import (
"encoding/json"
"fmt"
"os"
"path/filepath"
"strings"
)
// Config is /etc/rollcall/config.json.
@@ -18,6 +20,14 @@ type Config struct {
CommissionAppend string `json:"commission_append"` // kernel cmdline used in generated pxelinux files
IPMITool string `json:"ipmitool"` // path, default "ipmitool"
BMCHints []BMCHint `json:"bmc_hints"` // out-of-band BMC mapping for machines without in-band IPMI
// stateless provisioning
ServerURL string `json:"server_url"` // how nodes reach this server, e.g. http://10.213.77.1
ImagesDir string `json:"images_dir"` // <images_dir>/<image>/{vmlinuz,initrd.img,filesystem.squashfs}, served under /images/
OverlaysDir string `json:"overlays_dir"` // <overlays_dir>/<overlay>/{system,runtime}/... (Go templates with .tmpl suffix)
DnsmasqDir string `json:"dnsmasq_dir"` // hosts.dhcp + hosts written here for dnsmasq (dhcp-hostsfile / addn-hosts); "" disables
NodePools map[string]string `json:"node_pools"` // {"mgmt": "10.0.0.50-10.0.0.99", "ib": "10.1.0.10-10.1.0.250"}
ClusterVars map[string]any `json:"cluster_vars"` // available to overlay templates as .Vars (profile vars override)
}
// BMCHint maps a machine MAC to a known BMC (virtual lab nodes).
@@ -44,5 +54,19 @@ func loadConfig(path string) (*Config, error) {
return nil, fmt.Errorf("%s: %s is required", path, k.n)
}
}
if c.ServerURL == "" {
host, _, _ := strings.Cut(c.Listen, ":")
if host == "" || host == "0.0.0.0" {
return nil, fmt.Errorf("%s: server_url is required when listen is not a specific address", path)
}
c.ServerURL = "http://" + c.Listen
}
c.ServerURL = strings.TrimRight(c.ServerURL, "/")
if c.ImagesDir == "" {
c.ImagesDir = filepath.Join(filepath.Dir(c.ImageDir), "images")
}
if c.OverlaysDir == "" {
c.OverlaysDir = "/etc/rollcall/overlays"
}
return c, nil
}