Este conteúdo não está disponível no idioma selecionado.
Chapter 7. Managing content views
Red Hat Satellite uses content views to allow your hosts access to a deliberately curated subset of content. To do this, you must define which repositories to use and then apply certain filters to the content.
The general workflow for creating content views for filtering and creating snapshots is as follows:
- Create a content view.
- Add one or more repositories that you want to the content view.
- Optional: Create one or more filters to refine the content of the content view. For more information, see Section 7.23, “Content filter examples”.
- Optional: Resolve any package dependencies for a content view. For more information, see Section 7.21, “Resolving package dependencies”.
- Publish the content view.
- Optional: Promote the content view to another environment. For more information, see Section 7.11, “Promoting a content view by using Satellite web UI”.
- Attach the content host to the content view.
If a repository is not associated with the content view, the file /etc/yum.repos.d/redhat.repo remains empty and systems registered to it cannot receive updates.
Hosts can only be associated with a single content view. To associate a host with multiple content views, create a composite content view. For more information, see Section 7.18, “Creating a composite content view by using Satellite web UI”.
7.1. Content views in Red Hat Satellite Copiar o linkLink copiado para a área de transferência!
A content view is a deliberately curated subset of content that your hosts can access. By creating a content view, you can define the software versions used by a particular environment or Capsule Server.
Each content view creates a set of repositories across each environment. Your Satellite Server stores and manages these repositories. For example, you can create content views in the following ways:
- A content view with older package versions for a production environment and another content view with newer package versions for a Development environment.
- A content view with a package repository required by an operating system and another content view with a package repository required by an application.
A composite content view for a modular approach to managing content views. For example, you can use one content view for content for managing an operating system and another content view for content for managing an application. By creating a composite content view that combines both content views, you create a new repository that merges the repositories from each of the content views. However, the repositories for the content views still exist and you can keep managing them separately as well.
- Default Organization View
- A Default Organization View is an application-controlled content view for all content that is synchronized to Satellite. You can register a host to the Library environment on Satellite to consume the Default Organization View without configuring content views and lifecycle environments.
- Promoting a content view across environments
- When you promote a content view from one environment to the next environment in the application lifecycle, Satellite updates the repository and publishes the packages.
Example 7.1. Promoting a package from Development to Testing
The repositories for Testing and Production contain the my-software-1.0-0.noarch.rpm package:
| Development | Testing | Production | |
|---|---|---|---|
| Version of the content view | Version 2 | Version 1 | Version 1 |
| Contents of the content view | my-software-1.1-0.noarch.rpm | my-software-1.0-0.noarch.rpm | my-software-1.0-0.noarch.rpm |
If you promote Version 2 of the content view from Development to Testing, the repository for Testing updates to contain the my-software-1.1-0.noarch.rpm package:
| Development | Testing | Production | |
|---|---|---|---|
| Version of the content view | Version 2 | Version 2 | Version 1 |
| Contents of the content view | my-software-1.1-0.noarch.rpm | my-software-1.1-0.noarch.rpm | my-software-1.0-0.noarch.rpm |
This ensures hosts are designated to a specific environment but receive updates when that environment uses a new version of the content view.
7.2. Best practices for content views Copiar o linkLink copiado para a área de transferência!
Red Hat recommends you follow these practices for content views.
-
Content views that bundle content, such as Red Hat Enterprise Linux and additional software like
Apache-2.4orPostgreSQL-16.2, are easier to maintain. Content views that are too small require more maintenance. -
If you require daily updated content, use the content view
Default Organization View, which contains the latest synchronized content from all repositories and is available in the Library lifecycle environment. To give hosts access to content from multiple content views, such as when you update one content view weekly and another monthly, you have two options:
- Assign multiple content view environments to hosts. For more information, see Section 8.4, “Assigning content view environments to hosts”.
- Assign composite content views to hosts. For more information, see Section 8.6, “Comparison of content view environments and composite content views”.
- If you use composite content views, first publish the content views and then publish the composite content views. The more content views you bundle into composite content views, the more effort is needed to change or update content.
- Setting a lifecycle environment for content views is unnecessary if they are solely bundled to a composite content view.
- Automate creating and publishing composite content views and lifecycle environments by using a Hammer script or an Ansible Playbook. Use cron jobs, systemd timers, or recurring logics for more visibility.
- Add the changes and date to the description of each published content view or composite content view version. The most recent activity, such as moving content to a new lifecycle environment, is displayed by date in the Satellite web UI, regardless of the latest changes to the content itself.
- Publishing a new content view or composite content view creates a new major version. Incremental errata updates increment the minor version. Note that you cannot change or reset this counter.
7.3. Best practices for patching content hosts Copiar o linkLink copiado para a área de transferência!
Red Hat recommends you follow these practices for patching content hosts.
-
Registering hosts to Satellite requires Red Hat Satellite Client 6, which contains the
katello-host-toolspackage and its dependencies. For more information, see Registering hosts by using global registration in Managing hosts. - Use the Satellite web UI to install, upgrade, and remove packages from hosts. You can update content hosts with job templates using SSH and Ansible.
- Apply errata on content hosts using the Satellite web UI. When patching packages on hosts using the default package manager, Satellite receives a list of packages and repositories to recalculate applicable errata and available updates.
- Modify or replace job templates to add custom steps. This allows you to run commands or execute scripts on hosts.
- When running bulk actions on hosts, bundle them by major operating system version, especially when upgrading packages.
- Select via remote execution – customize first to define the time when patches are applied to hosts when performing bulk actions.
- You cannot apply errata to packages that are not part of the repositories on Satellite and the assigned content view environments.
-
Modifications to installed packages using
rpmordpkgare sent to Satellite with the next run ofapt,yum, orzypper.
7.4. Creating a content view by using Satellite web UI Copiar o linkLink copiado para a área de transferência!
Use this procedure to create a content view by using the Satellite web UI.
While you can stipulate whether you want to resolve any package dependencies on a content view by content view basis, you might want to change the default Satellite settings to enable or disable package resolution for all content views. For more information, see Section 7.21, “Resolving package dependencies”.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- Click Create content view.
- In the Name field, enter a name for the view. Satellite automatically completes the Label field from the name you enter.
- In the Description field, enter a description of the view.
- In the Type field, select a Content view or a Composite content view.
- Optional: If you want to solve dependencies automatically every time you publish this content view, select the Solve dependencies checkbox. Dependency solving slows the publishing time and might ignore any content view filters you use. This can also cause errors when resolving dependencies for errata.
- Click Create content view.
- On the Repositories tab, select the repository from the Type list that you want to add to your content view, select the checkbox next to the available repositories you want to add, then click Add repositories.
- Click Publish new version and in the Description field, enter information about the version to log changes.
- Optional: Enable a promotion path by clicking Promote and select one or more lifecycle environments to promote the new version to.
- Click Next.
- On the Review details page, review the environments you are trying to publish.
- Click Finish.
Next steps
- To register a host to your content view, see Registering hosts by using global registration in Managing hosts.
7.5. Creating a content view by using Hammer CLI Copiar o linkLink copiado para a área de transferência!
Use this procedure to create a content view by using Hammer CLI.
While you can stipulate whether you want to resolve any package dependencies on a content view by content view basis, you might want to change the default Satellite settings to enable or disable package resolution for all content views. For more information, see Section 7.21, “Resolving package dependencies”.
Procedure
Obtain a list of repository IDs:
hammer repository list --organization "My_Organization"
$ hammer repository list --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create the content view and add repositories:
hammer content-view create \ --description "My_Content_View" \ --name "My_Content_View" \ --organization "My_Organization" \ --repository-ids My_Repository_ID_1,My_Repository_ID_2
$ hammer content-view create \ --description "My_Content_View" \ --name "My_Content_View" \ --organization "My_Organization" \ --repository-ids My_Repository_ID_1,My_Repository_ID_2Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Add another repository to your content view:
hammer content-view add-repository \ --name "My_Content_View" \ --organization "My_Organization" \ --repository-id My_Repository_ID_3
$ hammer content-view add-repository \ --name "My_Content_View" \ --organization "My_Organization" \ --repository-id My_Repository_ID_3Copy to Clipboard Copied! Toggle word wrap Toggle overflow Publish the content view:
hammer content-view publish \ --description "My_Content_View" \ --name "My_Content_View" \ --organization "My_Organization"
$ hammer content-view publish \ --description "My_Content_View" \ --name "My_Content_View" \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Satellite Server creates the new version of the view and publishes it to the Library environment.
7.6. Copying a content view by using Satellite web UI Copiar o linkLink copiado para a área de transferência!
You can copy an existing content view into a new content view by using Satellite web UI.
A copied content view does not have the same history as the original content view. Version 1 of the copied content view begins at the last version of the original content view. As a result, you cannot promote an older version of a content view from the copied content view.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- Select the content view you want to copy.
- Click the vertical ellipsis icon and click Copy.
- In the Name field, enter a name for the new content view and click Copy content view.
Verification
- The copied content view appears on the Content views page.
7.7. Copying a content view by using Hammer CLI Copiar o linkLink copiado para a área de transferência!
You can copy an existing content view into a new content view by using Hammer CLI.
A copied content view does not have the same history as the original content view. Version 1 of the copied content view begins at the last version of the original content view. As a result, you cannot promote an older version of a content view from the copied content view.
Procedure
Copy the content view by using Hammer:
hammer content-view copy \ --name My_original_CV_name \ --new-name My_new_CV_name
$ hammer content-view copy \ --name My_original_CV_name \ --new-name My_new_CV_nameCopy to Clipboard Copied! Toggle word wrap Toggle overflow
7.8. Synchronizing a content view to a Capsule Server Copiar o linkLink copiado para a área de transferência!
In the Satellite web UI, you can only synchronize all selected lifecycle environments simultaneously. If you need to synchronize smaller items, such as individual lifecycle environments, single content views, and single repositories, use the Hammer CLI.
Procedure
Synchronize a content view to your Capsule Server:
hammer capsule content synchronize \ --content-view "My_Content_View_Name" \ --id My_Capsule_Server_ID
$ hammer capsule content synchronize \ --content-view "My_Content_View_Name" \ --id My_Capsule_Server_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow
7.9. Viewing module streams by using Satellite web UI Copiar o linkLink copiado para a área de transferência!
You can view the module streams of the repositories in your content views by using Satellite web UI.
Procedure
- In the Satellite web UI, Content > Lifecycle > Content Views.
- Select your content view.
- Click on a published version.
- Click Module Streams to view the module streams that are available for the Content Types.
- Use the Search field to search for specific modules.
- To view the information about the module, click the module and its corresponding tabs to include Details, Repositories, Profiles, and Artifacts.
7.10. Viewing module streams by using Hammer CLI Copiar o linkLink copiado para a área de transferência!
In Satellite, you can view the module streams of the repositories in your content views by using Hammer CLI.
Procedure
List all organizations:
hammer organization list
$ hammer organization listCopy to Clipboard Copied! Toggle word wrap Toggle overflow View all module streams for your organization:
hammer module-stream list \ --organization-id My_Organization_ID
$ hammer module-stream list \ --organization-id My_Organization_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow
7.11. Promoting a content view by using Satellite web UI Copiar o linkLink copiado para a área de transferência!
Use this procedure to promote content views across different lifecycle environments by using Satellite web UI.
Prerequisites
-
Your Satellite account has a role that grants the
promote_or_remove_content_viewsandpromote_or_remove_content_views_to_environmentpermissions.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- Select the content view that you want to promote.
- Select the version that you want to promote, click the vertical ellipsis icon, and click Promote.
- Select the environment where you want to promote the content view and click Promote.
Next steps
- To register a host to your content view, see Registering hosts by using global registration in Managing hosts.
7.12. Promoting a content view by using Hammer CLI Copiar o linkLink copiado para a área de transferência!
Use this procedure to promote content views across different lifecycle environments by using Hammer CLI.
Prerequisites
-
Your Satellite account has a role that grants the
promote_or_remove_content_viewsandpromote_or_remove_content_views_to_environmentpermissions.
Procedure
Promote the content view to a lifecycle environment:
hammer content-view version promote \ --content-view "My_Content_View_Name" \ --version 1 \ --to-lifecycle-environment "My_Lifecycle_Environment_Name" \ --organization "My_Organization"
$ hammer content-view version promote \ --content-view "My_Content_View_Name" \ --version 1 \ --to-lifecycle-environment "My_Lifecycle_Environment_Name" \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Repeat the command for each lifecycle environment to promote the content view to.
Verification
Display information about your content view version to verify that it is promoted to the required lifecycle environment:
hammer content-view version info --id My_Content_View_Version_ID
$ hammer content-view version info --id My_Content_View_Version_IDCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Next steps
- To register a host to your content view, see Registering hosts by using global registration in Managing hosts.
7.13. Promoting a content view to all environments in an organization Copiar o linkLink copiado para a área de transferência!
You can promote content views across all lifecycle environments within an organization by using the following Bash script.
Prerequisites
-
Your Satellite account has a role that grants the
promote_or_remove_content_viewsandpromote_or_remove_content_views_to_environmentpermissions.
Procedure
Promote content views across all lifecycle environments within an organization:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.14. Rolling content views Copiar o linkLink copiado para a área de transferência!
A rolling content view is a curated subset of content that your hosts can access. It is a subset of the Library environment and contains the latest synchronized content from one or multiple repositories. You can use a rolling content view to provide a continuous stream of synchronized content to hosts.
When you synchronize repositories to Satellite, all rolling content views that contain them get automatically updated to include the latest changes. You do not have to publish and/or promote a rolling content view compared to content views or composite content views.
7.15. Creating a rolling content view by using Satellite web UI Copiar o linkLink copiado para a área de transferência!
You can create a rolling content view by using Satellite web UI.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- Click Create content view.
- In the Create content view window, enter a name for the content view in the Name field. Satellite automatically completes the Label field from the name you enter.
- Optional: In the Description field, enter a description of the content view.
- On the Type tab, select Rolling content view.
- Click Create content view.
- Click Show repositories.
- Select the repositories that you want to add to your rolling content view.
- Click Add repositories to add all selected repositories to your rolling content view.
Next steps
- You cannot publish or promote your rolling content view. Instead, continue by adding it to your activation key. For more information, see Section 10.2, “Creating an activation key by using Satellite web UI”.
- To register a host to your rolling content view, see Registering hosts and setting up host integration in Managing hosts.
7.16. Creating a rolling content view by using Hammer CLI Copiar o linkLink copiado para a área de transferência!
You can create a rolling content view by using Hammer CLI.
Procedure
List all available lifecycle environments:
hammer lifecycle-environment list \ --fields id,name \ --organization "My_Organization"
$ hammer lifecycle-environment list \ --fields id,name \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow List all available repositories to identify IDs of repositories to add to your rolling content view:
hammer repository list \ --fields id,name,product \ --organization "My_Organization"
$ hammer repository list \ --fields id,name,product \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create your rolling content view:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Next steps
- You cannot publish or promote your rolling content view. Instead, continue by adding it to your activation key. For more information, see Section 10.3, “Creating an activation key by using Hammer CLI”.
- To register a host to your rolling content view, see Registering hosts and setting up host integration in Managing hosts.
7.17. Composite content views overview Copiar o linkLink copiado para a área de transferência!
A composite content view combines the content from several content views. For example, you might have separate content views to manage an operating system and an application individually. You can use a composite content view to merge the contents of both content views into a new repository. The repositories for the original content views still exist but a new repository also exists for the combined content.
Example 7.2. Application that supports different database servers
You want to develop an application that supports different database servers. The example_application appears as:
| example_software |
|---|
| Application |
| Database |
| Operating System |
Example of four separate content views:
- Red Hat Enterprise Linux (Operating System)
- PostgreSQL (Database)
- MariaDB (Database)
- example_software (Application)
From the previous content views, you can create two composite content views.
Example composite content view for a PostgreSQL database:
| Composite content view 1 – example_software on PostgreSQL |
|---|
| example_software (Application) |
| PostgreSQL (Database) |
| Red Hat Enterprise Linux (Operating System) |
Example composite content view for a MariaDB:
| Composite content view 2 – example_software on MariaDB |
|---|
| example_software (Application) |
| MariaDB (Database) |
| Red Hat Enterprise Linux (Operating System) |
Each content view is then managed and published separately. When you create a version of the application, you publish a new version of the composite content views. You can also select the Auto Publish option when creating a composite content view, and then the composite content view is automatically republished when a content view it includes is republished.
- Repository restrictions
- Docker repositories cannot be included more than once in a composite content view. For example, if you attempt to include two content views that contain the same docker repository in a composite content view, Satellite Server reports an error.
7.18. Creating a composite content view by using Satellite web UI Copiar o linkLink copiado para a área de transferência!
Use this procedure to create a composite content view by using Satellite web UI.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- Click Create content view.
- In the Create content view window, enter a name for the view in the Name field. Red Hat Satellite automatically completes the Label field from the name you enter.
- Optional: In the Description field, enter a description of the view.
- On the Type tab, select Composite content view.
- Optional: If you want to automatically publish a new version of the composite content view when a content view is republished, select the Auto publish checkbox.
- Click Create content view.
- On the Content views tab, select the content views that you want to add to the composite content view, and then click Add content views.
- In the Add content views window, select the version of each content view.
- Optional: If you want to automatically update the content view to the latest version, select the Always update to latest version checkbox.
- Click Add, then click Publish new version.
- Optional: In the Description field, enter a description of the content view.
- In the Publish window, set the Promote switch, then select the lifecycle environment.
- Click Next, then click Finish.
7.19. Creating a composite content view by using Hammer CLI Copiar o linkLink copiado para a área de transferência!
Use this procedure to create a composite content view by using Hammer CLI.
Procedure
Before you create the composite content views, list the version IDs for your existing content views:
hammer content-view version list \ --organization "My_Organization"
$ hammer content-view version list \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a new composite content view. When the
--auto-publishoption is set toyes, the composite content view is automatically republished when a content view it includes is republished:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add a content view to the composite content view. You can identify content view, content view version, and Organization in the commands by either their ID or their name. To add multiple content views to the composite content view, repeat this step for every content view you want to include.
If you have the Always update to latest version option enabled for the content view:
hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --latest \ --organization "My_Organization"
$ hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --latest \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you have the Always update to latest version option disabled for the content view:
hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --component-content-view-version-id Content_View_Version_ID \ --organization "My_Organization"
$ hammer content-view component add \ --component-content-view-id Content_View_ID \ --composite-content-view "Example_Composite_Content_View" \ --component-content-view-version-id Content_View_Version_ID \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Publish the composite content view:
hammer content-view publish \ --name "Example_Composite_Content_View" \ --description "Initial version of composite content view" \ --organization "My_Organization"
$ hammer content-view publish \ --name "Example_Composite_Content_View" \ --description "Initial version of composite content view" \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Promote the composite content view across all environments:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.20. Content filter overview Copiar o linkLink copiado para a área de transferência!
Content views also use filters to include or restrict certain Yum content. Without these filters, a content view includes everything from the selected repositories.
- Filter types
There are two types of content filters:
Expand Table 7.1. Filter types Filter Type Description Include
You start with no content, then select which content to add from the selected repositories. Use this filter to combine multiple content items.
Exclude
You start with all content from selected repositories, then select which content to remove. Use this filter when you want to use most of a particular content repository while excluding certain packages. The filter uses all content in the repository except for the content you select.
- Include and Exclude filter combinations
- If using a combination of Include and Exclude filters, publishing a content view triggers the include filters first, then the exclude filters. In this situation, select which content to include, then which content to exclude from the inclusive subset.
- Content types
You can filter content based on the following content types:
Expand Table 7.2. Content types Content Type Description RPM
Filter packages based on their name and version number. The RPM option filters non-modular RPM packages and errata. Source RPMs are not affected by this filter and will still be available in the content view.
Package Group
Filter packages based on package groups. The list of package groups is based on the repositories added to the content view.
Erratum (by ID)
Select which specific errata to add to the filter. The list of Errata is based on the repositories added to the content view.
Erratum (by Date and Type)
Select a issued or updated date range and errata type (Bugfix, Enhancement, or Security) to add to the filter.
Module Streams
Select whether to include or exclude specific module streams. The Module Streams option filters modular RPMs and errata, but does not filter non-modular content that is associated with the selected module stream.
Container Image Tag
Select whether to include or exclude specific container image tags.
7.21. Resolving package dependencies Copiar o linkLink copiado para a área de transferência!
Satellite can add dependencies of packages in a content view to the dependent repository when publishing the content view. To configure this, you can enable dependency solving.
For example, dependency solving is useful when you incrementally add a single package to a content view version. You might need to enable dependency solving to install that package.
However, dependency solving is unnecessary in most situations. For example:
- When incrementally adding a security errata to a content view, dependency solving can cause significant delays to content view publication without major benefits.
- Packages from a newer erratum might have dependencies that are incompatible with packages from an older content view version. Incrementally adding the erratum by solving dependencies might result in the inclusion of unwanted packages. As an alternative, consider updating the content view.
Dependency solving only considers packages within the repositories of the content view. It does not consider packages installed on clients. For example, if a content view includes only AppStream, dependency solving does not include dependent BaseOS content at publish time.
For more information, see Limitations to Repository Dependency Resolution in Managing content.
Dependency solving can lead to the following problems:
- Significant delay in content view publication
Satellite examines every repository in a content view for dependencies. Therefore, publish time increases with more repositories.
To mitigate this problem, use multiple content views with fewer repositories and combine them into composite content views.
- Ignored content view filters on dependent packages
Satellite prioritizes resolving package dependencies over the rules in your filter.
For example, if you create a filter for security purposes but enable dependency solving, Satellite can add packages that you might consider insecure.
To mitigate this problem, carefully test filtering rules to determine the required dependencies. If dependency solving includes unwanted packages, manually identify the core basic dependencies that the extra packages and errata need.
Example 7.3. Combining exclusion filters with dependency solving
For example, you can recreate Red Hat Enterprise Linux 8.3 by using content view filters and include selected errata from a later Red Hat Enterprise Linux 8 minor release. To achieve this, you create filters to exclude most of the errata after the Red Hat Enterprise Linux 8.3 release date, except a few that you need. Then, you enable dependency solving.
In this situation, dependency solving might include more packages than expected. As a result, the host diverges from Red Hat Enterprise Linux 8.3 machines.
If you do not need the extra errata and packages, do not configure content view filtering. Instead, enable and use the Red Hat Enterprise Linux 8.3 repository on the Content > Red Hat Repositories page in the Satellite web UI.
Example 7.4. Excluding packages sometimes makes dependency solving impossible for DNF
If you create Red Hat Enterprise Linux 8.3 repositories with a few excluded packages, dnf upgrade can sometimes fail.
Do not enable dependency solving to resolve the problem. Instead, investigate the error from dnf and adjust the filters to stop excluding the missing dependency.
Else, dependency solving might cause the repository to diverge from Red Hat Enterprise Linux 8.3.
7.22. Enabling dependency solving for a content view Copiar o linkLink copiado para a área de transferência!
Use this procedure to enable dependency solving for a content view.
Prerequisites
- Dependency solving is useful only in limited contexts. Before enabling it, ensure you read and understand Section 7.21, “Resolving package dependencies”
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- From the list of content views, select the required content view.
- On the Details tab, toggle Solve dependencies.
7.23. Content filter examples Copiar o linkLink copiado para a área de transferência!
Use any of the following examples with the procedure that follows to build custom content filters.
Filters can significantly increase the time to publish a content view. For example, if a content view publish task completes in a few minutes without filters, it can take 30 minutes after adding an exclude or include errata filter.
Example 7.5. Include a package group
Create a repository with the base Red Hat Enterprise Linux packages. This filter requires a Red Hat Enterprise Linux repository added to the content view.
Filter:
- Inclusion Type: Include
- Content Type: Package Group
- Filter: Select only the Base package group
Example 7.6. Exclude errata
Create a repository that excludes all errata, except for security updates, after a certain date. This is useful if you want to perform system updates on a regular basis with the exception of critical security updates, which must be applied immediately. This filter requires a Red Hat Enterprise Linux repository added to the content view.
Filter:
- Inclusion Type: Exclude
- Content Type: Erratum (by Date and Type)
- Filter: Select only the Bugfix and Enhancement errata types, and clear the Security errata type. Set the Date Type to Updated On. Set the Start Date to the date you want to restrict errata. Leave the End Date blank to ensure any new non-security errata is filtered.
Example 7.7. Exclude errata and include a package group
A combination of Example 1 and Example 2 where you only require the operating system packages and want to exclude recent bug fix and enhancement errata. This requires two filters attached to the same content view. The content view processes the Include filter first, then the Exclude filter.
Filter 1:
- Inclusion Type: Include
- Content Type: Package Group
- Filter: Select only the Base package group
Filter 2:
- Inclusion Type: Exclude
- Content Type: Erratum (by Date and Type)
- Filter: Select only the Bugfix and Enhancement errata types, and clear the Security errata type. Set the Date Type to Updated On. Set the Start Date to the date you want to restrict errata. Leave the End Date blank to ensure any new non-security errata is filtered.
Example 7.8. Include a module stream
Filter a specific module stream in a content view.
Filter 1:
- Inclusion Type: Include
- Content Type: Module Stream
- Filter: Select only the specific module stream that you want for the content view, for example ant, and click Add Module Stream.
Filter 2:
- Inclusion Type: Exclude
- Content Type: Package
-
Filter: Add a rule to filter any non-modular packages that you want to exclude from the content view. If you do not filter the packages, the content view filter includes all non-modular packages associated with the module stream ant. Add a rule to exclude all
*packages, or specify the package names that you want to exclude.
Additional resources
7.24. Creating a content view filter by using Satellite web UI Copiar o linkLink copiado para a área de transferência!
You can filter content views containing yum content to include or exclude specific packages or errata. Package filters are based on a combination of the name, version, and architecture. For examples of how to build a filter, see Section 7.23, “Content filter examples”.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- Select a content view.
- On the Filters tab, click Create filter.
- Enter a name.
- From the Content type list, select a content type.
- From the Inclusion Type list, select either Include filter or Exclude filter.
- Optional: In the Description field, enter a description for the filter.
- Click Create filter to create your content filter.
- Click Add RPM rule.
- Enter a name, architecture, and version.
- Click Add rule.
- Select if you want the filter to Apply to subset of repositories or Apply to all repositories in the CV.
- Click Publish new version to publish the filtered content view.
- Optional: In the Description field, enter a description of the changes.
- Optional: Select Promote to promote your filtered content view to a lifecycle environment.
- Click Finish to publish a new version of the content view.
7.25. Creating a content view filter by using CLI Copiar o linkLink copiado para a área de transferência!
You can use Hammer CLI to create content view filters to include or exclude specific content units like packages, errata, or container image tags.
Procedure
Add a filter to the content view. Use the
--inclusion falseoption to set the filter to an Exclude filter:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Add a rule to the filter:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Publish the content view:
hammer content-view publish \ --name "Example_Content_View" \ --description "Adding errata filter" \ --organization "My_Organization"
$ hammer content-view publish \ --name "Example_Content_View" \ --description "Adding errata filter" \ --organization "My_Organization"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Promote the view across all environments:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
7.26. Deleting multiple content view versions Copiar o linkLink copiado para a área de transferência!
You can delete multiple content view versions simultaneously.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- Select the content view you want to delete versions of.
- On the Versions tab, select the checkbox of the version or versions you want to delete.
- Click the vertical ellipsis icon at the top of the list of content views.
- Click Delete to open the deletion wizard that shows any affected environments.
- If there are no affected environments, review the details and click Delete.
- If there are any affected environments, reassign any hosts or activation keys before deletion.
- Review the details of the actions.
- Click Delete.
7.27. Clearing the search filter Copiar o linkLink copiado para a área de transferência!
If you search for specific content types by using keywords in the Search text box and the search returns no results, click Clear search to clear all the search queries and reset the Search text box.
If you use a filter to search for specific repositories in the Type text box and the search returns no results, click Clear filters to clear all active filters and reset the Type text box.
7.28. Standardizing content view empty states Copiar o linkLink copiado para a área de transferência!
If there are no filters listed for a content view, click Create filter. A modal opens to show you the next steps to create a filter. Follow these steps to add a new filter to create new content types.
7.29. Comparing content view versions Copiar o linkLink copiado para a área de transferência!
Use this procedure to compare content view version functionality for Satellite.
Procedure
- In the Satellite web UI, navigate to Content > Lifecycle > Content Views.
- Select a content view whose versions you want to compare.
- On the Versions tab, select the checkbox next to any two versions you want to compare.
Click Compare.
The Compare screen has the pre-selected versions in the version dropdown menus and tabs for all content types found in either version. You can filter the results to show only the same, different, or all content types. You can compare different content view versions by selecting them from the dropdown menus.
7.30. Distributing archived content view versions Copiar o linkLink copiado para a área de transferência!
The setting Distribute archived content view versions enables hosting of non-promoted content view version repositories in the Satellite content web application along with other repositories. This is useful while debugging to see what content is present in your content view versions.
Procedure
- In the Satellite web UI, navigate to Administer > Settings.
- Click the Content tab.
- Set the Distribute archived content view versions parameter to Yes.
Click Submit.
This enables the repositories of content view versions without lifecycle environments to be distributed at
satellite.example.com/pulp/content/My_Organization/content_views/My_Content_View/My_Content_View_Version/.NoteOlder non-promoted content view versions are not distributed once the setting is enabled. Only new content view versions become distributed.