OS images for deployment · refreshed nightly by rollcall os sync
+
Tags · auto rules are re-evaluated at commissioning; cloud-config fragments apply at deployment; overlays to stateless nodes
+
+
Add / update profile
@@ -97,6 +107,11 @@
+ Tags:
+
+
+
+
diff --git a/cmd/rollcall/web/style.css b/cmd/rollcall/web/style.css
index 18ab061..6e708c8 100644
--- a/cmd/rollcall/web/style.css
+++ b/cmd/rollcall/web/style.css
@@ -35,6 +35,9 @@ tbody tr { cursor: pointer; } tbody tr:hover { background: var(--hover); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--pill); font-size: 12px; }
.pill.ready, .pill.booted, .pill.deployed { color: var(--ok); } .pill.recommission, .pill.new, .pill.stateless, .pill.deploying, .pill.releasing { color: var(--warn); }
.pill.deploy-failed, .pill.release-failed { color: var(--danger); }
+.pill.tag { background: var(--hover); border: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
+.pill.tag.auto { border-style: dashed; color: var(--muted); }
+.pill.tag a { color: var(--danger); text-decoration: none; }
.bar { position: relative; height: 10px; background: var(--pill); border-radius: 999px; overflow: hidden; margin: 6px 0; }
.bar > span { position: absolute; inset: 0 auto 0 0; background: var(--accent); transition: width .5s; }
.actions select, .actions input[type=text] { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--fg); font: inherit; }
diff --git a/deploy/tags/README.md b/deploy/tags/README.md
new file mode 100644
index 0000000..e6d2ca0
--- /dev/null
+++ b/deploy/tags/README.md
@@ -0,0 +1,25 @@
+# Tag fragments
+
+Each file here is a cloud-init fragment that a tag can carry. When a machine
+with that tag is deployed, the fragment is added to the generated user-data as
+a separate MIME part (cloud-config parts merge with `list(append)`, so
+`packages`, `runcmd` and `write_files` accumulate; a part starting with `#!`
+runs as a script).
+
+| File | Tag | Use |
+|---|---|---|
+| `gpu-nvidia.yaml` | `gpu` (auto: `{{ gt .Node.GPUs 0 }}`) | NVIDIA driver from the distro's preferred source, reboot when done |
+
+Register: `rollcall tags add gpu -match '{{ gt .Node.GPUs 0 }}' -cloud-config deploy/tags/gpu-nvidia.yaml -comment "NVIDIA GPUs"`.
+
+Match templates see `.Node`: `GPUs`, `IBGUIDs`, `CPUs`, `Sockets`, `MemMB`,
+`Disks`, `NVMe`, `PCIVendors` (e.g. `10de` NVIDIA, `15b3` Mellanox), `Manufacturer`,
+`Product`, `MACs`, `Tags`, `OS`. Helpers: `has`, `contains`, `hasPrefix`, `matches`,
+`gte`, plus Go's `eq/gt/lt/and/or/not`. Examples:
+
+```
+{{ gt .Node.GPUs 0 }}
+{{ has .Node.PCIVendors "15b3" }}
+{{ and (gte .Node.MemMB 500000) (gt .Node.Sockets 1) }}
+{{ matches "(?i)PowerEdge R7" .Node.Product }}
+```
diff --git a/deploy/tags/gpu-nvidia.yaml b/deploy/tags/gpu-nvidia.yaml
new file mode 100644
index 0000000..ac9d121
--- /dev/null
+++ b/deploy/tags/gpu-nvidia.yaml
@@ -0,0 +1,48 @@
+#cloud-config
+# Rollcall tag fragment: NVIDIA driver + container toolkit on GPU nodes.
+# Register with: rollcall tags add gpu -match '{{ gt .Node.GPUs 0 }}' -cloud-config deploy/tags/gpu-nvidia.yaml
+# Merged into the deployment user-data of every machine tagged "gpu"; distro is detected at runtime.
+packages:
+ - pciutils
+ - curl
+ - gnupg
+write_files:
+ - path: /usr/local/sbin/rollcall-nvidia-install.sh
+ permissions: "0755"
+ content: |
+ #!/bin/sh
+ # Installs the NVIDIA driver from the distribution's preferred source. Logs to /var/log/rollcall-nvidia.log
+ set -eu
+ exec >>/var/log/rollcall-nvidia.log 2>&1
+ . /etc/os-release
+ echo "== $(date -Is) nvidia install on $PRETTY_NAME"
+ lspci -nn | grep -i 10de || { echo "no NVIDIA device"; exit 0; }
+ case "$ID" in
+ debian)
+ # contrib + non-free for nvidia-driver (kernel headers for DKMS)
+ sed -i 's/^\(deb .* main\)$/\1 contrib non-free non-free-firmware/' /etc/apt/sources.list 2>/dev/null || true
+ if [ -f /etc/apt/sources.list.d/debian.sources ]; then sed -i 's/^Components: main$/Components: main contrib non-free non-free-firmware/' /etc/apt/sources.list.d/debian.sources; fi
+ apt-get update
+ DEBIAN_FRONTEND=noninteractive apt-get install -y "linux-headers-$(uname -r)" nvidia-driver nvidia-smi firmware-misc-nonfree
+ ;;
+ ubuntu)
+ apt-get update
+ DEBIAN_FRONTEND=noninteractive apt-get install -y ubuntu-drivers-common
+ ubuntu-drivers install --gpgpu || ubuntu-drivers autoinstall
+ ;;
+ rocky|almalinux|centos|rhel)
+ rel=$(echo "$VERSION_ID" | cut -d. -f1)
+ dnf -y install epel-release || dnf -y install "https://dl.fedoraproject.org/pub/epel/epel-release-latest-$rel.noarch.rpm"
+ dnf config-manager --add-repo "https://developer.download.nvidia.com/compute/cuda/repos/rhel$rel/x86_64/cuda-rhel$rel.repo"
+ dnf -y install kernel-devel-"$(uname -r)" kernel-headers-"$(uname -r)" dkms
+ dnf -y module install nvidia-driver:latest-dkms || dnf -y install nvidia-driver nvidia-driver-cuda
+ ;;
+ *) echo "unsupported distro $ID"; exit 1 ;;
+ esac
+ echo "== done; nvidia-smi after reboot"
+runcmd:
+ - [ /usr/local/sbin/rollcall-nvidia-install.sh ]
+power_state:
+ mode: reboot
+ condition: test -e /var/log/rollcall-nvidia.log && grep -q "== done" /var/log/rollcall-nvidia.log
+ message: "rollcall: rebooting to load the NVIDIA driver"