Reference:
- Customize user-class in ipxe: https://github.com/RackHD/on-imagebuilder/blob/a5cf04d918244693b98d76fa48e34163fdb51a41/roles/ipxe/files/default.ipxe
- Two steps DHCP request, firstly get 'monorail-undionly.ipxe', then the ipxe will be boot and the
/profiles API request
https://github.com/RackHD/on-dhcp-proxy/blob/master/lib/message-handler.js#L176 - The entry point of
/profiles
API: https://github.com/RackHD/on-http/blob/master/lib/api/2.0/profiles.js#L34- First it will call
/profiles
without mac address, RackHD will send redirect.ipxe. - Secondaly, it will call
/profiles
with macAddress, the returned profiles is defined in bootstrap microkernel task: https://github.com/RackHD/on-tasks/blob/master/lib/task-data/tasks/bootstrap-ubuntu.js#L18
- First it will call
- The microkernel stuff are specified in linux.ipxe: https://github.com/RackHD/on-http/blob/master/data/profiles/linux.ipxe
- The microkernel will run bootstrap.js automatically: https://github.com/RackHD/on-imagebuilder/blob/a5cf04d918244693b98d76fa48e34163fdb51a41/common/files/rc.local#L46
- all discoveries task are defined in: https://github.com/RackHD/on-taskgraph/blob/master/lib/graphs/discovery-sku-graph.js
- Run sku specified graph: https://github.com/RackHD/on-taskgraph/blob/master/lib/graphs/discovery-sku-graph.js#L174