Managing content view environments
A content view environment combines a specific lifecycle environment with a content view and describes which version of the content view to use. You can assign hosts and activation keys to one or more content view environments instead of assigning lifecycle environments and content views separately. When you assign a host to multiple content view environments, the host gains access to the combined repositories from all its associated content view environments.
You can assign multiple content view environments to hosts from the server using Hammer or from the host using Subscription Manager. You can also view content view environment assignments in both Hammer and the web UI.
You also have the option to assign multiple content view environments to an activation key to give hosts access to content from each environment. For more information about managing multiple content view environments with activation keys, see assigning content view environments to activation keys.
Multiple content view environments in hosts and activation keys is a Technology Preview feature only. Technology Preview features are not supported by ATIX AG. ATIX AG does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of ATIX AG Technology Preview features, see Technical Previews in the ATIX Service Portal. |
Content view environments overview
The Allow multiple content views setting controls whether hosts and activation keys can be assigned to multiple content view environments. By default, this feature is disabled, limiting assignments to a single content view environment. Enable this setting to assign multiple content view environments to hosts and activation keys.
Hosts registered with multiple activation keys handle content view environment assignments based on the key order and settings configuration. For more information about content view environment ordering and priority, see content view environment ordering and priority.
When you disable Allow multiple content views, multi-environment hosts remain assigned to multiple content view environments and retain access to all their content. Existing multi-environment activation keys remain associated with multiple content view environments, and both multi-environment hosts and activation keys remain visible in the orcharhino management UI and accessible through the Hammer CLI. However, registration fails if you attempt to assign a host to multiple content view environments or use a multi-environment activation key during host registration. Assigning multiple content view environments to a host or activation key results in an error.
When you disable Allow multiple content views, you can still reassign a multi-environment host to a single content view environment. You can also reassign a multi-environment activation key to a single content view environment or remove all content view environments from the key.
This setting provides flexibility in managing how content view environments are applied to hosts and activation keys while ensuring consistent behavior when disabled.
Content view environment categories
The content view environments available in your organization fall into the following categories:
- Library environment
-
orcharhino assigns the Library environment to represent the Library lifecycle environment and the Default Organization View content view.
- Unpromoted content views
-
For each content view that you publish but do not promote to a lifecycle environment, orcharhino creates a content view environment. orcharhino labels these environments using the format:
Library/<content_view_label>
. - Promoted content views
-
For each content view that you promote to a specific lifecycle environment, orcharhino creates a corresponding content view environment. orcharhino labels these environments using the format:
<lifecycle_environment_label>/<content_view_label>
.
Content view environment ordering and priority
The order of content view environments assigned to a host or activation key determines content priority. During host registration, an activation key assigns content view environments in the order in which they are stored.
A host pulls content from the first assigned content view environment that contains the repository.
If Library
is first in the list, it overrides other content view environments because it contains all repositories.
Content view environment order is critical when repository conflicts occur.
A repository conflict occurs when multiple content view environments contain a repository with the same label.
For example:
A host assigned to the content view environments Library/cv1, dev/cv1
uses the following configuration:
$ hammer host update \
--content-view-environments "Library/cv1,dev/cv1" \
--name "server.example.com" \
--organization-id My_Organization_ID
Both content view environments include the orcharhino-client
repository.
Log in as a root
user, then run subscription-manager repos
to inspect the available repositories on the host.
The output reflects the Library/cv1
content view environment:
$ subscription-manager repos
This results in the following output:
+----------------------------------------------------------+
Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID: orcharhino-client
Repo Name: orcharhino Client
Repo URL: https://orcharhino.example.com/pulp/content/My_Organization/Library/cv1/content/dist/layered/orcharhino-client/x86_64/My_Product/My_Repository_ID/os
Enabled: 0
The |
To change priority, reorder the content view environments.
To prioritize dev/cv1
over Library/cv1
, update the host settings:
$ hammer host update \
--content-view-environments "dev/cv1,Library/cv1" \
--name "server.example.com" \
--organization-id My_Organization_ID
After reordering, inspecting the repositories again shows the dev/cv1
content view environment:
$ subscription-manager repos
This results in the following output:
+----------------------------------------------------------+
Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID: orcharhino-client
Repo Name: orcharhino Client
Repo URL: https://orcharhino.example.com/pulp/content/My_Organization/dev/cv1/content/dist/layered/orcharhino-client/x86_64/My_Product/My_Repository_ID/os
Enabled: 0
The Repo URL
now reflects the dev/cv1
content view environment, meaning the system uses content from dev/cv1
and ignores Library/cv1
.
Assigning content view environments to hosts
To assign content view environments to a host, specify the entire list in order. There is no interface in Hammer or the API to add, remove, or insert individual content view environments. The current content view environments on the host are replaced with the new list you provide.
-
List available content view environments in your organization:
$ hammer content-view-environment list --organization "My_Organization"
Record the labels of each content view environment. Use these labels in the command in the next step.
-
Assign content view environments to a host:
$ hammer host update \ --content-view-environments="Library/along_cv,LCE_XYZ/CV1" \ --name "server.example.com" \ --organization-id My_Organization_ID
Assigning content view environments to hosts by using Subscription Manager
You can assign content view environments to hosts by using Subscription Manager.
-
Display the available environments and identify which ones to pass in:
$ subscription-manager environments --list
-
Set the content view environments for the host using
subscription-manager
:$ subscription-manager environments --set Library/cv1,Library
-
Check assigned content view environments of the host with:
$ subscription-manager environments --list-enabled
The output displays the enabled environments, similar to the following:
+-------------------------------------------+ Environments +-------------------------------------------+ Name: Library/cv1 Description: Name: Library Description:
Comparison of content view environments and composite content views
Composite content views provide an alternative method for granting hosts access to content from multiple content views. You can use composite content views, multiple content view environments, or a combination of both. The key differences between these methods include the following:
- Access timing
-
Hosts assigned to composite content views gain access to the combined content only after you publish the composite content view. Hosts assigned to multiple content view environments immediately access the combined content from all assigned environments.
- Conflict resolution
-
Composite content views resolve conflicts at the time of publishing by merging duplicate repositories. For hosts assigned to multiple content view environments, repository conflicts are resolved based on the order of content view environments. For more information about content view environment ordering and priority, see content view environment ordering and priority.
- Version selection
-
Composite content views allow you to select specific versions of a content view, including older versions. With multiple content view environments, the host always receives the latest version of the content view with no option to select a different version.
Choose the approach that best suits your requirements based on these differences.
The text and illustrations on this page are licensed by ATIX AG under a Creative Commons Attribution Share Alike 4.0 International ("CC BY-SA 4.0") license. This page also contains text from the official Foreman documentation which uses the same license ("CC BY-SA 4.0"). |