Files
ilker 29bd39c135 Warewulf HPC test cluster: provisioning, identity, docs and overlay UI
A complete, verified HPC lab on Proxmox (hv01) with its own isolated subnet,
central identity and a web console for overlay management.

Infrastructure
- vmbr6: L2-only cluster fabric, deliberately without an address on the
  hypervisor so Warewulf owns DHCP/TFTP/PXE for the whole subnet.
- head01 (VM 300): Warewulf 4.7.0, dnsmasq-free DHCP/TFTP/iPXE chain,
  Slurm controller, MUNGE, NAT gateway, /opt exported read-only.
- wwnode1-4 (VM 301-304): diskless, PXE-booted, rootfs unpacked into RAM.
- idm1 (VM 305): FreeIPA (LDAP/Kerberos/Dogtag CA/DNS) plus the NFS home
  server. Dual-homed on purpose: idm1.hpc.local resolves to the cluster
  fabric so Kerberos and NFS never traverse head01's masquerade.

Stack
Rocky Linux 9.8, OpenHPC 3, Slurm 25.11.4, OpenMPI 5.0.7, FreeIPA 4.13.1.

Stateless domain join
Nodes are rebuilt in RAM every boot, so ipa-client-install cannot be used.
Enrolment happens once and is distributed through Warewulf overlays: shared
config as templates rendered per node via {{.Id}}, and a separate keytab per
node so wwnode1 cannot impersonate wwnode2.

Overlay web UI (webui/)
A Go service on the head node serving a browser interface over the Warewulf
REST API. It exists as a server rather than a static page because the API is
root-equivalent and bound to loopback; the service holds the credentials and
proxies same-origin, so the browser never sees one. Published behind Caddy
with bcrypt logins, server-side sessions and per-user/per-IP lockout.

Documentation
README plus docs/01-10 covering architecture, installation, Warewulf,
identity, storage, Slurm/MPI, operations, troubleshooting and reference,
with a 22-page PDF edition. Section 08 records twelve concrete failures hit
during the build, including a wwctl flag that fails silently.

No credentials are stored here. Every secret lives on the servers; the
documentation refers only to its path.
2026-08-29 09:07:51 +02:00

60 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
# Warewulf head node - base system preparation (Rocky Linux 9)
# Run as root on head01.
set -euo pipefail
CLUSTER_IF=eth1
UPLINK_IF=eth0
CLUSTER_NET=10.10.10.0/24
echo "==> hostname / hosts"
hostnamectl set-hostname head01
cat > /etc/hosts <<EOF
127.0.0.1 localhost localhost.localdomain
10.0.0.30 head01.mgmt
10.10.10.1 head01 head01.cluster
10.10.10.11 wwnode1
10.10.10.12 wwnode2
10.10.10.13 wwnode3
10.10.10.14 wwnode4
::1 localhost localhost.localdomain
EOF
echo "==> repositories + packages"
dnf install -y -q epel-release
dnf install -y -q dnf-plugins-core
dnf config-manager --set-enabled crb
dnf install -y -q \
vim git wget curl rsync jq tar bash-completion \
tcpdump bind-utils iproute nmap-ncat \
firewalld chrony ipmitool
echo "==> SELinux -> permissive (test lab; simplifies PXE/NFS/overlay debugging)"
setenforce 0 || true
sed -i 's/^SELINUX=.*/SELINUX=permissive/' /etc/selinux/config
echo "==> time synchronisation"
systemctl enable --now chronyd
echo "==> firewalld: eth1 (cluster) trusted, eth0 (mgmt) public + masquerade"
systemctl enable --now firewalld
nmcli connection modify "$(nmcli -g GENERAL.CONNECTION device show ${CLUSTER_IF})" connection.zone trusted 2>/dev/null || \
firewall-cmd --permanent --zone=trusted --change-interface=${CLUSTER_IF}
firewall-cmd --permanent --zone=trusted --add-interface=${CLUSTER_IF}
firewall-cmd --permanent --zone=public --add-masquerade
firewall-cmd --permanent --zone=trusted --add-masquerade
firewall-cmd --reload
echo "==> IP forwarding"
cat > /etc/sysctl.d/99-warewulf.conf <<EOF
net.ipv4.ip_forward = 1
EOF
sysctl -p /etc/sysctl.d/99-warewulf.conf
echo "==> verification"
ip -br a show ${CLUSTER_IF}
firewall-cmd --get-active-zones
getenforce
echo "BASE OK"