Observe content hosts that are assigned to different lifecycle environments for development and quality testing, and demonstrate that the version differences in a content view control the software that is deployed to the content hosts in the different environments.
Outcomes
Reassign a host to a specific lifecycle environment and content view.
Deploy software to a content host that is assigned to a specific lifecycle environment and content view.
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 software-control
Instructions
This exercise expects two versions of the OperationsServerBase content view.
The latest version is assigned to the Development lifecycle environment, and the previous version containing fewer packages is assigned to the QA lifecycle environment.
The currently used version numbers are not essential and might differ in your lab environment.
If your content view contents differ from what the exercise expects, the lab start software-control script modifies the content view and promotes new content view versions to 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, set the organization to Operations.
Set the location to Any Location.
Verify that two versions are available for the OperationsServerBase content view.
Verify that the servera.lab.example.com and the serverc.lab.example.com content hosts are assigned to use the OperationsServerBase content view in the Development lifecycle environment.
Click → , and then click .
Verify that both Version 1.0 and Version 2.0 are listed.
Click → , and then click .
Verify that the value for the field is OperationsServerBase.
Verify that the value for the field is Development.
Click → , and then click .
Verify that the value for the field is OperationsServerBase.
Verify that the selected checkbox is Development.
Assign the serverc system to the QA lifecycle environment.
Click → , and then select the checkbox next to .
In the upper-right corner, select Change Lifecycle Environment from the list.
On the Assign Lifecycle Environment and Content View dialog box, select the checkbox.
You must select a new content view when you change a content host's lifecycle environment.
The list choices are the same as for the previous lifecycle environment.
Select OperationsServerBase, and then click .
Click when prompted to confirm the new assignment.
Verify that the servera and serverc systems have access to the software that is available to their unique lifecycle environments.
On workstation, log in to the serverc system as the student user and switch to the root user.
[student@workstation ~]$ssh student@serverc[student@serverc ~]$sudo -i[sudo] password for student:student[root@serverc ~]#
Verify that the serverc system is informed about the new assignment.
The system's identity should list the QA lifecycle environment assignment, but it might still list Development/OperationsServerBase.
[root@serverc ~]# subscription-manager identity
system identity: 3244ed9d-ce23-4a2a-a39d-112324d84b3c
name: serverc.lab.example.com
org name: Operations
org ID: Operations
environment name: Development/OperationsServerBaseIf the environment name field remains as Development/OperationsServerBase, then request the content host to refresh its subscription data.
Verify the system's identity again.
[root@serverc ~]# subscription-manager refresh
1 local certificate has been deleted.
All local data refreshed[root@serverc ~]# subscription-manager identity
system identity: 3244ed9d-ce23-4a2a-a39d-112324d84b3c
name: serverc.lab.example.com
org name: Operations
org ID: Operations
environment name: QA/OperationsServerBaseVerify that the ant package is not available to serverc.
Install the ant package on servera.
Selecting the AppStream repository's ant package as the example in this exercise is arbitrary.
The AppStream repository is not included in the earlier version of the OperationsServerBase content view, but is included in the later version.
You expect the package to be unavailable to the serverc content host in the QA lifecycle, which uses the earlier version.
Conversely, you expect the package to be available to the servera content host in the Development lifecycle, which uses the later version.
Verify that the ant package is not available on serverc.
[root@serverc ~]# dnf list ant
Updating Subscription Management repositories.
Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs) 75 kB/s | 2.4 kB
Error: No matching Packages to listReturn to the workstation system as the student user.
[root@serverc ~]#exitlogout [student@serverc ~]$exitlogout Connection to serverc closed.
On workstation, log in to the servera system as the student user and switch to the root user.
[student@workstation ~]$ssh student@servera[student@servera ~]$sudo -i[sudo] password for student:student[root@servera ~]#
Verify that the ant package is available on servera.
[root@servera ~]# dnf list ant
Updating Subscription Management repositories.
Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs) 73 kB/s | 2.4 kB
Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) 84 kB/s | 2.4 kB
Available Packages
ant.noarch 1.10.9-7.el9 rhel-9-for-x86_64-appstream-rpmsInstall the ant package on servera.
[root@servera ~]#dnf install ant...output omitted... Is this ok [y/N]:y...output omitted... Complete!
Return to the workstation system as the student user.
[root@servera ~]#exitlogout [student@servera ~]$exitlogout Connection to servera closed.