Publish a new or modified content view and promote it to a specific lifecycle environment.
Outcomes
Create and publish content views.
Modify content views.
Promote content views.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command ensures that the satellite host is reachable on the network and prepares it for this exercise.
[student@workstation ~]$ lab start lifecycles-publish
Instructions
Be careful to create the multiple content view versions as instructed in this exercise. You create two versions of one content view, with different content in each version, and publish both versions to a lifecycle path. In a later exercise, you assign each of two content hosts to different lifecycle environments to demonstrate software access control through the content view versions.
If you create a different result than instructed, then edit the content view to create the two specified content versions, and use the resulting version numbers in the later exercise. Promoting a content host version to a lifecycle environment removes all other content host versions from that lifecycle environment. Use that technique to adjust the versions in each lifecycle environment.
Log in to the Satellite Server web UI, https://satellite.lab.example.com, as the admin account with redhat as the password.
In the upper-left corner of the web page, verify that the Operations organization context is set.
Create the OperationsServerBase content view in the Operations organization.
Click → and then click to display the page.
Enter OperationsServerBase in the field.
Notice that the field is autogenerated from the field.
Enter Operations server base packages in the field, and then click .
The tab is displayed.
Create version 1.0 of the content view.
Select repositories and publish the OperationsServerBase content view version to the Operations organization's Development lifecycle environment.
Select the checkbox for the Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9 repository, and then click to add the selected repository to the content view.
Click to display the page.
Enter Operations server base repositories in the field, and click to display the page.
Click to publish the new content view version. Wait for the publishing process to complete. The time to complete publishing depends on the repository size.
Click to display the page.
Enter Initial base repositories in the field, and select the checkboxes for the and lifecycle environments.
Set the switch to promote the new content view version.
Wait for the environment promotion process to complete.
At the end of this process, version 1.0 of the OperationsServerBase content view is promoted through to the QA environment in the Operations organization.
After some initial quality testing, you recognize that additional software from other repositories is needed for the content view's use case.
Modify the OperationsServerBase content view to include additional repositories.
Publish and promote version 2.0 of the content view to the Development environment.
Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9
Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs
Click tab to view the available repositories.
Select the checkboxes for the Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9 and Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs repositories, and click to include the selected repositories in the content view.
Click to display the page.
The version is now 2.0.
Enter Initial base repositories expanded in the field.
Set the Promote switch to display the lifecycle environments.
Select the checkbox.
Click to display the page.
Click to publish the new content view version.
Wait for the publishing process to complete.
At the end of this process, version 1.0 of the OperationsServerBase content view is promoted to the Development and QA environments in the Operations organization, and version 2.0 is promoted only to the Development environment.
In the web UI, view the differences between the two content view versions.
Click → , and then click to display content view attributes.
The column lists the lifecycle environments that are associated with the content view.
Notice the different versions and the difference in the number of packages.
The Version 2.0 content view has more packages than the Version 1.0 content view.
Click to view the attributes for that content view version.
Version 1.0 contains only the Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9 repository.
Click the tab, and then click .
Verify that version 2.0 contains Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9, Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9, and Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs repositories.
In the web UI, enable and synchronize the following RHEL 9 repositories for the Marketing organization, to prepare for creating a content view.
Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs)
Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs)
Red Hat Satellite Client 6 for RHEL 9 x86_64 (RPMs)
In the upper-left corner of the web page, set the organization to Marketing.
Set the location to Any Location.
Click → to display the Red Hat Repositories page.
Enter RHEL 9 x86_64 in the field, and then click .
In the list, click the greater-than symbol (>) to the left of the Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs) repository to expand the version information.
Click the plus sign (+) to the right of x86_64 to enable that repository and version.
Verify that the repository is in the list and that the repository is for RHEL 9.
In the list, click the greater-than symbol (>) to the left of the Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) repository to expand the version information.
Click the plus sign (+) to the right of x86_64 to enable that repository and version.
Verify that the repository is in the list and that the repository is for RHEL 9.
In the list, click the greater-than symbol (>) to the left of the Red Hat Satellite Client 6 for RHEL 9 x86_64 (RPMs) repository to expand the version information.
Click the plus sign (+) to the right of x86_64 to enable that repository and version.
Verify that the repository is in the list and that the repository is for RHEL 9.
Click → to display the Products page.
Select the checkbox next to the Red Hat Enterprise Linux for x86_64 product.
From the list, select Sync Selected.
Click in the popup message and wait for the task to complete.
Using the hammer command, create the MarketingServerBase content view in the Marketing organization, add repositories, publish the content view version, and promote the content view version to the Development and QA environments.
On workstation, log in to the satellite system as the student user and switch to the root user.
[student@workstation ~]$ssh student@satellite[student@satellite ~]$sudo -i[sudo] password for student:student[root@satellite ~]#
List the repositories in the Marketing organization.
Note the repository ID for the RHEL 9 Client repository.
[root@satellite ~]# hammer repository list \
--organization Marketing --fields Id,Name
---|---------------------------------------------------------
ID | NAME
---|---------------------------------------------------------
52 | Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9
51 | Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9
32 | Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs
---|---------------------------------------------------------Create the MarketingServerBase content view in the Marketing organization.
Add the three repositories that you discovered in the previous query by including their repository IDs as a comma-delimited list.
[root@satellite ~]# hammer content-view create \
--organization Marketing --name MarketingServerBase \
--description "Marketing server base repositories" \
--repository-ids 32,51,52
Content view created.Publish the MarketingServerBase content view version to the Library environment and promote the version to the Development and QA lifecycle environments.
[root@satellite ~]# hammer content-view publish \
--organization Marketing --name MarketingServerBase \
--description "Initial base repositories" \
--lifecycle-environments Development,QA
[....................................................................] [100%]View the published content views that are available to the Marketing organization.
[root@satellite ~]# hammer content-view list \
--organization Marketing \
--fields Name,"Last Published","Repository Ids"
--------------------------|---------------------|---------------
NAME | LAST PUBLISHED | REPOSITORY IDS
--------------------------|---------------------|---------------
Default Organization View | 2023/02/04 23:50:04 |
MarketingServerBase | 2023/02/05 03:24:28 | 32,51,52
--------------------------|---------------------|---------------View the Marketing organization's lifecycle environments where the MarketingServerBase content view is available.
[root@satellite ~]# hammer content-view version list \
--organization Marketing --content-view MarketingServerBase \
--fields Name,Description,"Lifecycle Environments"
------------------------|---------------------------|-------------------------
NAME | DESCRIPTION | LIFECYCLE ENVIRONMENTS
------------------------|---------------------------|-------------------------
MarketingServerBase 1.0 | Initial base repositories | Library, Development, QA
------------------------|---------------------------|-------------------------Return to the workstation system as the student user.
[root@satellite ~]#exitlogout [student@satellite ~]$exitlogout Connection to satellite closed. [student@workstation ~]$