Skip to content

feat(deploy): add PXE controller role for multi-node netboot#114

Merged
KerwinTsaiii merged 1 commit into
developfrom
feat/pxe-controller
Jun 1, 2026
Merged

feat(deploy): add PXE controller role for multi-node netboot#114
KerwinTsaiii merged 1 commit into
developfrom
feat/pxe-controller

Conversation

@KerwinTsaiii

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a pxe_controller Ansible role and pb-pxe-controller.yml playbook that turn one service machine into a PXE controller so diskless agents can netboot and auto-join a K3s cluster.
  • The role sets up dnsmasq (Proxy-DHCP + TFTP), a debootstrap NFS rootfs under /srv/nfs/rootfs, BIOS/UEFI boot menus in /srv/tftp, and an Apache /k3s/ endpoint for join credentials.
  • Netboot agents auto-join via a baked-in k3s-auto-join.service; local-disk persistence keeps the K3s node identity across reboots.

Design notes

  • Site-specific networking values (pxe_network_interface, pxe_subnet, pxe_dns_servers, pxe_controller_ip, pxe_k3s_server_ips) are empty by default and asserted at run time, so no site IPs ship in the repo.
  • The agent K3s version is pinned via pxe_k3s_version (defaults to v1.32.3+k3s1) to match the server.
  • No vendor NIC driver and no Cloudflare WARP bits are bundled; agents are expected to have an in-kernel NIC driver (add the module to pxe_initramfs_modules if needed).

Docs

Test plan

  • YAML parses; playbook/role structure validated.
  • Run pb-pxe-controller.yml against a real service machine and netboot at least one agent.

Made with Cursor

Add a pxe_controller Ansible role and pb-pxe-controller.yml playbook that
turn one service machine into a PXE controller (dnsmasq Proxy-DHCP + TFTP,
debootstrap NFS rootfs, BIOS/UEFI boot menus, Apache /k3s/ endpoint) so
diskless agents can netboot and auto-join a K3s cluster.

Site-specific networking values (interface, subnet, DNS, controller IP, k3s
server IPs) are empty by default and asserted at run time, and the agent k3s
version is pinned via pxe_k3s_version to match the server.

Co-authored-by: Cursor <cursoragent@cursor.com>
@KerwinTsaiii KerwinTsaiii requested a review from MioYuuIH May 31, 2026 08:04
@KerwinTsaiii KerwinTsaiii merged commit a8e41b2 into develop Jun 1, 2026
5 checks passed
@MioYuuIH MioYuuIH deleted the feat/pxe-controller branch June 8, 2026 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant