-
Notifications
You must be signed in to change notification settings - Fork 297
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 #38109 - As a user, I want to install flatpaks on remote hosts via REX #11264
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks @sjha4
I did not test this yet, but left some annoying nitpicks etc. below. Sorry!
@@ -0,0 +1,37 @@ | |||
<%# | |||
kind: job_template | |||
name: Install Flatpak and Firefox |
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'm assuming you're changing this so it's an input and not hard-coded to Firefox, right? Why have a template specifically for Firefox?
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.
No..This was bait for you to take a look and drive the PR from here on.. <3
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.
You know how to trick me!
kind: job_template | ||
name: Install Flatpak and Firefox | ||
job_category: Katello | ||
description_format: 'Install Flatpak and Firefox' |
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.
description_format
can use wildcards and incorporate the input.
- name: Password | ||
description: Password for container registry login |
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.
This is where we're meant to use the personal auth token, right? Maybe the input or description should call that out.
flatpak remote-add --authenticator-name=org.flatpak.Authenticator.Oci <%= remote_name %> oci+<%= server_url %>/ | ||
podman login <%= server_url %> --username <%= username %> --password <%= password %> | ||
cp /run/containers/0/auth.json /etc/flatpak/oci-auth.json | ||
flatpak install firefox --assumeyes |
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.
The actual install could probably be split into a second template, and then called here with render_template
. Then you could do flatpak installs separately assuming your installations and logins are already in place.
name: Install Flatpak and Firefox | ||
job_category: Katello | ||
description_format: 'Install Flatpak and Firefox' | ||
feature: katello_host_flatpak_install |
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.
If you're introducing a new REX feature, you'll have to register the feature (in plugin.rb I think?)
You don't have to use a feature, if you don't need easy access from Hammer or web UI..
@jeremylenz Thanks for the reviews..Working on them. This is kind of an early draft to make sure the flow makes sense..I'll split this into 2 templates : 1 for remote-add/authentication and another for the flatpak install. |
ed3d6d9
to
fc0a938
Compare
What are the changes introduced in this pull request?
Adds a new job template to setup flatpak remote, authentication and possibly install a flatpak repo on a host
Considerations taken when implementing this change?
We are not installing flatpak/podman. Admin/Client will need to do that on their own.
This will need to be run with sudo or as root on the host
What are the testing steps for this pull request?