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

Add support for user-data and meta-data via HTTP #23

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mschmitt
Copy link

@mschmitt mschmitt commented Dec 6, 2021

Thanks for your script which got us kickstarted on Ubuntu autoinstalls quite nicely. Coming from debian-installer it was a bit of a shock, but I've come to appreciate the leanness of the user-data file.

Since after the initial lab work on autoinstalling, work has shifted to modifications on the user-data file, I thought it might be a good idea to let the ISO remain static and let it retrieve the configuration by HTTP. We're currently installing in two ways: PXE install with vmlinuz/initrd/iso/meta-/user-data over the network, and customized ISO image. Using this patch, both methods can use the same meta-data/user-data files from an http server.

@covertsh
Copy link
Owner

Hi, thanks so much for your contribution. What are your thoughts on using the -u argument and detecting whether it is a URL, rather than introducing a new argument and the logic to handle a conflict between them?

@mschmitt
Copy link
Author

The issue with auto-detecting an URL in -u is that -u stands for --user-data but the URL is a base path where both files will be located. After detection of -u as a URL, an additional -m will still have to be handled, so auto-detection in -u will be a trade-off between:

  • One less option -b and improved clarity without the "alternative to -u and -m" clause and
  • -u suddenly being used to specify the location of both user-data and meta-data.

I see today that I ruined README.md by copying the output from --help with expanded variables from my system, so the PR isn't ready to merge as it is anyway. Let me know what you prefer and I'll implement it accordingly.

@mschmitt
Copy link
Author

mschmitt commented Jan 14, 2022

Still here (back from vacation), and updated --user-data with URL detection, as suggested. :-)

@covertsh
Copy link
Owner

Hope you enjoyed your vacation. Thanks for making another commit - apologies for not responding sooner, I was also taking time off. To be honest I don't have any problem with the original implementation; it makes sense when you explain it. Which do you prefer?

@mschmitt
Copy link
Author

Let's go with the converged -u. I'm already focusing on the upcoming 22.04, which is a whole new bag of surprises. ;-)

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

Successfully merging this pull request may close these issues.

2 participants