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

Document how to configure rpm prefetch #136

Merged
merged 7 commits into from
Oct 2, 2024
Merged

Document how to configure rpm prefetch #136

merged 7 commits into from
Oct 2, 2024

Conversation

ralphbean
Copy link
Member

This required adjusting language at the top of the document about what is supported.

Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

@ralphbean ralphbean force-pushed the rpm-prefetch branch 2 times, most recently from 67d9e5b to 56eab37 Compare September 20, 2024 19:01
Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

This required adjusting language at the top of the document about what
is supported.

Signed-off-by: Ralph Bean <[email protected]>
Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

Copy link
Member

@arewm arewm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this!

<1> The `*packages*` list is the list of packages you want to install in your Container. Only include first-order dependencies here, i.e. the packages you want to install.
<2> This should be a reference to a repo file, like those found in `/etc/yum.repos.d/`. This tells the Cachi2 where to find your rpm and its dependencies.

. Copy any necessary yum/dnf repo files into your git repository. If you are using a fedora base image, that looks like:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the base image of the container that you are building? Would users know how to select the appropriate file(s) for rhel/UBI from this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, let's provide a command to extract it from the base image they're working with.

My favorite command for that is oc image extract ... though, and I don't know an "easy" alternative with skopeo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I guess this works:

podman run -it registry.redhat.io/ubi9/ubi:latest cat /etc/yum.repos.d/ubi.repo > ubi.repo

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT of the change in 27cdf67?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The *.repo files don't really need to be commited to the user's repo, they only need to be there for the lockfile resolution (although it doesn't hurt to commit them). Not sure if we should point that out, or if that'll only make it more confusing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am similarly unsure if one is more confusing than the other.

I guess, without more user reactions to go on, I'd assume that committing the file is more explicit and clear. FWIW, it kind of looks like a beefier version of content_sets.yaml (some openstack devs today understood it right away when I tested out explaining it that way).

<1> The `*packages*` list is the list of packages you want to install in your Container. Only include first-order dependencies here, i.e. the packages you want to install.
<2> This should be a reference to a repo file, like those found in `/etc/yum.repos.d/`. This tells the Cachi2 where to find your rpm and its dependencies.

. Copy any necessary yum/dnf repo files into your git repository. If you are using a fedora base image, that looks like:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be copied from the system that is running the tool or should we instruct users on how to extract the file from the actual parent image that will be used?

(or should the tool be run from the base image which will be used?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 27cdf67

+
[source]
----
$ rpm-lockfile-prototype --image YOUR_BASE_IMAGE rpms.in.yaml <1>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I assume that this means that the prior base image is indeed that of the container you are building.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Clarified in 27cdf67.

Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

1 similar comment
Copy link

🚀 Preview is available at https://pr-136--konflux-docs.netlify.app

@arewm arewm merged commit 9c74ef2 into main Oct 2, 2024
2 checks passed
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.

4 participants