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
Host Registration - Install packages #8298
Conversation
Issues: #31743 |
app/views/unattended/provisioning_templates/snippet/manage_packages.erb
Outdated
Show resolved
Hide resolved
71ddd62
to
1b371e0
Compare
@ekohl updated & rebased |
1b371e0
to
e66f9dc
Compare
It seems we ship the snippet and only activate it if host param is defined. In such case, we should use So I wonder, would it be better to take the content of the linked job template and convert it to macro in core? No snippet involved. The package list is based on the parameter. The only downside is, user can't extend it without Foreman code core change. Also we could then use the same macro in our provisioning templates, where we today use |
Given the above, next steps:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that in principe a macro is a good idea, but I did struggle with the use of a snippet. We are providing an API with it. How clear is it to the user that if they make changes to that template, they can change the API?
One thing to consider: the commit message says "after host registration" but it calls built
after installing packages. Perhaps during
instead of after
is a better description?
I would also consider solving this in a more generic way: don't include a parameter by default but give the user a generic snippet_if_exists 'registration_linux_post'
so they can customize their registration via their own snippet.
Ok, so to summarize
please speak up if I misunderstood |
In kickstart you have 2 types of package installation: the native %packages section which also gives you a nice progress bar. However, it's generally not usable on RHEL due to subscriptions (though since RHEL 8.2 Anaconda understands activation keys so there it can be done, our kickstarts don't understand this). I'd expect preseed to have something similar. I'd be ok with leaving it out of scope for now. Other than that 👍 |
e66f9dc
to
91bdab8
Compare
@ares @ekohl |
91bdab8
to
8d4025b
Compare
8d4025b
to
e6ea527
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'd just wait for the renaming PR to get in and rename things here so we don't have to rename again after merge.
app/views/unattended/provisioning_templates/registration/linux_registration_default.erb
Outdated
Show resolved
Hide resolved
app/views/unattended/provisioning_templates/registration/linux_registration_default.erb
Outdated
Show resolved
Hide resolved
e6ea527
to
eff9d77
Compare
eff9d77
to
74ef3d2
Compare
8147f51
to
99d74c9
Compare
513c9cf
to
60f175c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getting closer and closer :-) two small things and I'll test the whole thing
app/views/unattended/provisioning_templates/host_init_config/host_init_config_default.erb
Outdated
Show resolved
Hide resolved
60f175c
to
852d842
Compare
852d842
to
be1389b
Compare
be1389b
to
65ab893
Compare
65ab893
to
43d168c
Compare
For package installation on supported OS families: Red Hat, Debian & Suse. In host registration users can now install packages by setting the `host_registration_packages` parameter.
43d168c
to
de03a2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested the functionality and all works fine including the snippet. Leaving this open for a few days or until other reviews confirm concerns are addressed. If I don't see any reaction I plan to merge this by the end of the week.
Thanks @stejskalleos, merged and updated the commit message to reflect the new names |
New host macro
:manage_packages
for package installationon supported OS families: Red Hat, Debian & Suse.
In host registration users can now install packages
on the host by setting the
host_registration_packages
.