-
Notifications
You must be signed in to change notification settings - Fork 108
Add package persistence for image mode hosts #4605
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
Merged
Lennonka
merged 6 commits into
theforeman:master
from
Lennonka:image-mode-transient-packages
Jan 28, 2026
+95
−0
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
31c09e2
Add package persistence for image mode hosts
Lennonka 09d871f
Drop note about future availability
Lennonka c6d6978
Improve concept
Lennonka 7c409c9
Rework Containerfile generation
Lennonka 8a02809
Fix hammer command
Lennonka d0665da
Apply suggestions from review
Lennonka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
guides/common/modules/con_package-persistence-on-image-mode-hosts.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
|
|
||
| [id="package-persistence-on-image-mode-hosts"] | ||
| = Package persistence on image mode hosts | ||
|
|
||
| [role="_abstract"] | ||
| Packages installed on an image mode host after image creation are installed with transient package persistence. | ||
| Transient packages are temporary and are lost after a reboot. | ||
|
|
||
| You can view the persistence of installed packages on an image mode host by navigating to the host details in the {ProjectWebUI}, selecting *Content* > *Packages*, and checking the *Persistence* column. | ||
| In Hammer CLI, you can view the persistence by running `hammer host package list --host-id _My_Host_ID_ --fields ALL`. | ||
|
|
||
| To persist packages on an image mode host, you can build a new container image that includes the necessary packages. | ||
| After upgrading the image mode host to the new image, the new packages are installed permanently on the host. | ||
8 changes: 8 additions & 0 deletions
8
guides/common/modules/con_persisting-transient-packages-in-your-image.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| :_mod-docs-content-type: CONCEPT | ||
|
|
||
| [id="persisting-transient-packages-in-your-image"] | ||
| = Persisting transient packages in your image | ||
|
|
||
| [role="_abstract"] | ||
| You can generate a Containerfile install command using the transient packages on your image mode host. | ||
| Then, you can use this command to rebuild your image to make the packages persistent. |
17 changes: 17 additions & 0 deletions
17
guides/common/modules/proc_generating-a-containerfile-command-by-using-api.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
|
|
||
| [id="generating-a-containerfile-command-by-using-api"] | ||
| = Generating a Containerfile command by using {Project} API | ||
Lennonka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [role="_abstract"] | ||
| You can generate a Containerfile install command by using {Project} API to persist transient packages in your container image. | ||
|
|
||
| .Prerequisites | ||
| * Your {Project} account has a role that grants the `view_hosts` permission. | ||
|
|
||
| .Procedure | ||
| . Send a `GET` request to the `/api/hosts/:host_id/transient_packages/containerfile_install_command` endpoint. | ||
| . Copy the generated command from the response. | ||
|
|
||
| .Next steps | ||
| * Include the generated command in your Containerfile and rebuild the image. | ||
22 changes: 22 additions & 0 deletions
22
guides/common/modules/proc_generating-a-containerfile-command-by-using-cli.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
|
|
||
| [id="generating-a-containerfile-command-by-using-cli"] | ||
| = Generating a Containerfile command by using Hammer CLI | ||
Lennonka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [role="_abstract"] | ||
| You can generate a Containerfile install command by using Hammer CLI to persist transient packages in your container image. | ||
|
|
||
| .Prerequisites | ||
| * Your {Project} account has a role that grants the `view_hosts` permission. | ||
|
|
||
| .Procedure | ||
| . Generate the Containerfile command: | ||
Lennonka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| + | ||
| [options="nowrap", subs="+quotes,attributes"] | ||
| ---- | ||
| $ hammer host package containerfile-install-command --host-id _My_Host_ID_ | ||
| ---- | ||
| . Copy the generated command from the output. | ||
|
|
||
| .Next steps | ||
| * Include the generated command in your Containerfile and rebuild the image. | ||
24 changes: 24 additions & 0 deletions
24
guides/common/modules/proc_generating-a-containerfile-command-by-using-web-ui.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| :_mod-docs-content-type: PROCEDURE | ||
|
|
||
| [id="generating-a-containerfile-command-by-using-web-ui"] | ||
| = Generating a Containerfile command by using {ProjectWebUI} | ||
Lennonka marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| [role="_abstract"] | ||
| You can generate a Containerfile install command by using {ProjectWebUI} to persist transient packages in your container image. | ||
|
|
||
| .Prerequisites | ||
| * Your {Project} account has a role that grants the `view_hosts` permission. | ||
|
|
||
| .Procedure | ||
| . In the {ProjectWebUI}, navigate to *Hosts* > *All Hosts*. | ||
| . Click the name of a host. | ||
| . Select the *Content* tab. | ||
| . Select the *Packages* tab. | ||
| . Select the packages you want to include in the command. | ||
| . Click the package table menu icon. | ||
| . Select *Generate containerfile install command*. | ||
| . If {Project} does not recognize persistence for any of the selected packages and you want to include them in the command, enable *Include packages with unknown persistence*. | ||
| . Click *Copy* to copy the command to your clipboard. | ||
|
|
||
| .Next steps | ||
| * Include the generated command in your Containerfile and rebuild the image. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.