TritonDataCenter / sdc-headnode

Responsible for building and setting up the Triton (formerly SmartDataCenter) headnode.
Mozilla Public License 2.0
18 stars 21 forks source link

TRITON-2218 Headnode should support unattended install based on equinix metal metadata #47

Closed bahamat closed 3 years ago

bahamat commented 3 years ago

We've got some custom ipxe scripts for Equinix Metal (née packet.com) that will drop their metadata as a boot module. If a server is booted with the triton installer ipxe script for packet, we'll get the metadata file. If the metadata file exists, we'll generate an answers.json file.

For values needed by answers.json that don't exist in some form in the packet metadata, users can also provide values in the customdata field with the same name. E.g., customdata.root_password. Wherever possible, a suitable default will be used.

This should allow for unattended install.

bahamat commented 3 years ago

@danmcd You make a good point about the boot module stuff. It's not well documented. There's @jlevon's blog for loader and @wesolows' blog for grub, and there's a very little bit in smartos-docs, but boot modules with PXE is very under-documented (which is putting it mildly), and there are some severe limitations with iPXE (OS-3770, which we fixed, but upstream doesn't want to take because it would render some other operating systems unbootable. Speaking of which, our best workaround for that would be to chainload our own ipxe binary after Packet's).

bahamat commented 3 years ago

I've now got this fully working. Some notes: