rancher / elemental-toolkit

:snowflake: The toolkit to build, ship and maintain cloud-init driven Linux derivatives based on container images
https://rancher.github.io/elemental-toolkit/docs/
Apache License 2.0
288 stars 49 forks source link

Fix stackable sources for build-iso #2061

Closed davidcassany closed 3 months ago

davidcassany commented 3 months ago

This PR fixes the use of --overlay-* flags in build-iso command. With the latest changes the were using the --delete option in rsync to dump the sources to be stacked on an already existing source. This PR distinguishes a couple of use cases the former DumpSource method equivalent is is MirrorRoot now, as this includes --delete option for rsync and the creation of essential root-tree mountpoint dirs such as /dev, /sys, /proc... I noted this as using the overlay-iso flag in an ISO lead to an image including empty /dev, /tmp, /proc, etc.

In addition this PR also removes the DeployImage that was not used anywhere in code, this was just a leftover.

frelon commented 3 months ago

We probably don't use the overlay- parameters also, if they are not used by harvester I would be fine with removing them entirely.

davidcassany commented 3 months ago

We probably don't use the overlay- parameters also, if they are not used by harvester I would be fine with removing them entirely.

Well I discovered it trying to set the ssh authorized public key for a password less remote login into the ISO. So using --overlay-iso I added a cloud-config file to the ISO. I think they are useful, even I agree they could be reimagined. Also the --overlay-uefi could be really useful if we don't want to include the grub images for live systems into the image itself. I'd keep them for now, but I see your point, they are weird indeed.