Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #35269 - Enable boot image download of installation media #9318

Conversation

bastian-src
Copy link
Contributor

@bastian-src bastian-src commented Jul 25, 2022

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

Related PRs:

@theforeman-bot
Copy link
Member

Issues: #35269

@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch from a532746 to 1411ebf Compare July 25, 2022 10:29
@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch 4 times, most recently from bb0d0fc to a64f5af Compare August 20, 2022 09:48
@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch from a64f5af to 321cf0f Compare August 29, 2022 07:11
@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch 2 times, most recently from 7deb15a to 31764aa Compare September 9, 2022 06:51
@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch from 1ca17a4 to d0d16af Compare November 14, 2022 12:45
@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch from d0d16af to 6d95afd Compare November 14, 2022 13:02
@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch from 6d95afd to 52b0803 Compare November 28, 2022 11:00
@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch from 52b0803 to 95525b1 Compare December 1, 2022 11:04
@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch from 95525b1 to ae5fe61 Compare December 2, 2022 09:59
@bastian-src bastian-src force-pushed the fix_35269_automate_iso_download branch from ae5fe61 to 6004445 Compare December 2, 2022 14:15
@theforeman-bot
Copy link
Member

@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

* Include proxy.fetch_system_image
* Add system_image_path variable for template reference
* Adapt PXELinux template
* Add tftp_http_port setting
* Add tftp.setTFTPBootFiles test scenarios
@github-actions
Copy link

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.

@bastian-src
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants