githedgehog / fabricator

Hedgehog Open Network Fabric Installer
https://docs.githedgehog.com/
Apache License 2.0
3 stars 2 forks source link

Research building custom Flatcar ISO with embedded Fabric installer #115

Closed Frostman closed 3 months ago

mrbojangles3 commented 4 months ago

Unified USB

This can be thought of in two parts - the payload and the delivery system. The CI will make the devlivery system hhfab will make the payload.

The Delivery System:

A live usb image that can be written to any usb stick. This will contain a small partition, and a large partition. The small partition has all the things we need to boot a system, the dependencies of flatcar-install, and flatcar install. The large partion has a bunch of empty space to hold the payload.

The Payload:

hhfab will grab a stable flatcar release - using the steps mentioned here. We might need to use some tools to resize the partitions in the image so we can fit all of the things we want on there. hhfab will be responsible for modification of the flatcar image hhfab will take the payload binary and write it to the second partition of the delivery system hhfab will unmount the payload hhfab will either create the usb for the user, or emit the correct cli instructions to do that. More user friendly to just write the iso for them.

existing user experience hhfab workflow:

  1. assuming the wiring yaml exists
  2. hhfab init --preset lab --dev --wiring file1.yaml --wiring file2.yaml
  3. hhfab build
  4. user downloads flatcar
  5. user writes it to a usb image
  6. user boots physical hardware via sneakernet usb or virtual media
  7. user via console or iKVM will scp control-install.tgz from hhfab machine to control node
  8. user via console or iKVM will decompress, change into the dir, and sudo ./hhfab-recipe run
  9. user via console or iKVM waits for success messge 01:35:15 INF Done took=3m39.586394608s

proposed user experience hhfab workflow:

  1. assuming the wiring yaml exists
  2. hhfab build --preset lab --dev --wiring file1.yaml -> emits control_node.iso
  3. hhfab prints instructions on how do dd the disk image to a usb
  4. user does something along the lines of dd if= ./hh_control_node.iso of=/dev/sdc bs=4k status=progress
  5. user boots physical hardware via sneakernet usb or virtual media
  6. user watches the boot and install output, but does not have to interact with the system
  7. system will reboot and come up configured with hh packages
mrbojangles3 commented 3 months ago

I have commented on https://github.com/flatcar/Flatcar/issues/945#issuecomment-2263256288 The next steps:

mrbojangles3 commented 3 months ago

The last item in the check list will be taken care of at a later date. The oem ignition config can do a few things, that being one of them.

A script that covers the creation of live-images is copied to the internal docs - https://github.com/githedgehog/docs-int/blob/master/src/image-build/howto.md