Files
spinifex/scripts/images/eks-node-gpu/99-mulga-ebs-byid.rules
T
Josh Siviour 6879a3425a feat(gpu): Ubuntu NVIDIA GPU node images + GPU AMI selection (Epic A) (#502)
* feat(gpu): Ubuntu NVIDIA GPU node image + GPU AMI selection

Epic A of GPU passthrough to EKS pods / ECS task containers.

- Add gpu-vendor AMI tag constants + GPUVendorForType/IsGPUTypeName helpers
  (instance-family prefix -> vendor from knownGPUModels).
- EKS + ECS worker AMI resolution branches to a GPU-tagged node image for GPU
  instance types; no fallback to the driverless image (hard error instead).
- Exclude gpu-vendor-tagged AMIs from the plain (non-GPU) lookup so a newer GPU
  AMI cannot hijack ordinary nodes (managed-by tag is shared; filters have no
  negation, so exclude client-side).
- NodegroupRecord caches GPUEnabled/GPUVendor from InstanceTypes.
- Catalog entries spinifex-eks-node-gpu / spinifex-ecs-node-gpu (dual-tagged).
- New Ubuntu 26.04 GPU node images (eks-node-gpu, ecs-agent-gpu): reuse the
  proven DKMS -server driver recipe (drop Docker CE + dev payload), add
  nvidia-container-toolkit, OpenRC->systemd port of the worker/agent service
  subset, udev EBS by-id bridge, nvidia modules-load, first-boot CDI generation.
- build-system-image.sh: SYSTEM_TAG supports multiple space-separated tags.

* build: allow SYSTEM_IMAGE_BUILD_DIR override for image build dir

Ubuntu GPU images are 16G; a RAM-backed /tmp tmpfs is too small to hold the
qcow2 + expanded raw. Default stays /tmp; SYSTEM_IMAGE_BUILD_DIR redirects the
build onto a real disk.
2026-07-10 19:52:12 +10:00

15 lines
986 B
Plaintext

# Mint the EBS-style /dev/disk/by-id symlink the upstream aws-ebs-csi-driver
# node plugin resolves, for hot-attached Viperblock virtio-blk volumes (vd*,
# serial = volume-id). This is the udev equivalent of the Alpine mdev rule
# wired by scripts/images/eks-node/setup.sh into /etc/mdev.conf.
#
# The shared helper /usr/local/sbin/mulga-ebs-byid (reused verbatim from
# scripts/images/eks-node/mulga-ebs-byid.sh) reads the device name from
# $MDEV or, if unset, $1 — so passing the kernel name via %k as the sole
# argument works without any udev-specific shim. udev already sets ACTION to
# add/remove, matching the values the helper's case statement expects.
# Already-attached devices at boot are coldplugged separately by
# mulga-ebs-byid.service; this rule only covers hotplug events.
ACTION=="add", SUBSYSTEM=="block", KERNEL=="vd[a-z]", RUN+="/usr/local/sbin/mulga-ebs-byid %k"
ACTION=="remove", SUBSYSTEM=="block", KERNEL=="vd[a-z]", RUN+="/usr/local/sbin/mulga-ebs-byid %k"