Bookmark this page

Guided Exercise: Control Software with Content Views

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

Important

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.

  1. Log in to the Satellite Server web UI, https://satellite.lab.example.com, as the admin account with redhat as the password.

  2. In the upper-left corner of the web page, set the organization to Operations. Set the location to Any Location.

  3. 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.

    1. Click ContentContent Views, and then click OperationsServerBase. Verify that both Version 1.0 and Version 2.0 are listed.

    2. Click HostsContent Hosts, and then click servera.lab.example.com. Verify that the value for the Content View field is OperationsServerBase. Verify that the value for the Lifecycle Environment field is Development.

    3. Click HostsContent Hosts, and then click serverc.lab.example.com. Verify that the value for the Content View field is OperationsServerBase. Verify that the selected Lifecycle Environment checkbox is Development.

  4. Assign the serverc system to the QA lifecycle environment.

    1. Click HostsContent Hosts, and then select the checkbox next to serverc.lab.example.com. In the upper-right corner, select Change Lifecycle Environment from the Select Action list.

    2. On the Assign Lifecycle Environment and Content View dialog box, select the QA checkbox.

    3. You must select a new content view when you change a content host's lifecycle environment. The Content View list choices are the same as for the previous lifecycle environment. Select OperationsServerBase, and then click Assign. Click Yes when prompted to confirm the new assignment.

  5. Verify that the servera and serverc systems have access to the software that is available to their unique lifecycle environments.

    1. 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 ~]#
    2. 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/OperationsServerBase
    3. If 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/OperationsServerBase
  6. Verify that the ant package is not available to serverc. Install the ant package on servera.

    Note

    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.

    1. 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 list
    2. Return to the workstation system as the student user.

      [root@serverc ~]# exit
      logout
      [student@serverc ~]$ exit
      logout
      Connection to serverc closed.
    3. 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 ~]#
    4. 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-rpms
    5. Install the ant package on servera.

      [root@servera ~]# dnf install ant
      ...output omitted...
      Is this ok [y/N]: y
      ...output omitted...
      Complete!
    6. Return to the workstation system as the student user.

      [root@servera ~]# exit
      logout
      [student@servera ~]$ exit
      logout
      Connection to servera closed.

Finish

On the workstation machine, change to the student user home directory and use the lab command to complete this exercise. This step is important to ensure that resources from previous exercises do not impact upcoming exercises.

[student@workstation ~]$ lab finish software-control

Revision: rh403-6.11-3ad886e