foreman icon indicating copy to clipboard operation
foreman copied to clipboard

Fixes #35269 - Enable boot image download of installation media

Open bastian-src opened this issue 2 years ago • 1 comments

The Ubuntu Autoinstall deployment mechanism requires not only the extracted boot files (vmlinuz, initrd), but also the ISO image itself. At the moment, Foreman requires a path to the extracted boot files as Installation Media and does not handle ISO images. Accordingly, the following manual steps are necessary at the moment:

  • download the ISO image
  • extract it to a specific path
  • also provide the ISO image itself in a specific folder.

This PR automates these steps. It allows the user to pass the path to an ISO image as Installation Media. Foreman detects this during the deployment process. It triggers the ISO download on the Smart Proxy - the Smart Proxy stores the image to a specific path, extracts it, and detects the boot files from the image. The default path for the Smart Proxy to download and extract the ISO image is /var/www/html/pub/installation_media. The user has the option to pass a custom path as host parameter.

Necessary changes:

  • Since the ISO download takes some time, a larger timeout is needed for that specific call (resource.rb)
  • Allow function operatingsystem.bootimage_path for safe rendering of PXELinux template
  • Integrate Smart Proxy fetch_boot_image call

Refers to this Smart Proxy PR.

ToDo: Add tests.

bastian-src avatar Jul 25 '22 09:07 bastian-src

Issues: #35269

theforeman-bot avatar Jul 25 '22 09:07 theforeman-bot

ok to test

bastian-src avatar Dec 08 '22 12:12 bastian-src

IMHO, the failing ComputeResourcesVmsControllerTest is unrelated. I've run tests on develop locally and it occurs there as well.

bastian-src avatar Dec 08 '22 13:12 bastian-src

ok to test

bastian-src avatar Dec 12 '22 13:12 bastian-src

@bastian-src, this pull request is currently not mergeable. Please rebase against the develop branch and push again.

If you have a remote called 'upstream' that points to this repository, you can do this by running:

    $ git pull --rebase upstream develop

This message was auto-generated by Foreman's prprocessor

theforeman-bot avatar Jun 20 '23 08:06 theforeman-bot

Thank you for your contribution! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process.

github-actions[bot] avatar Sep 27 '23 01:09 github-actions[bot]

@ekohl I just updated the branch - can you reopen the PR, please?

bastian-src avatar Oct 17 '23 08:10 bastian-src