Bookmark this page

Lab: Manage Software Lifecycles

Enable software repositories, create a sync plan, create lifecycle environments, and associate a new content view with a lifecycle environment.

Outcomes

  • Enable software repositories.

  • Create a sync plan.

  • Create lifecycle environments.

  • Create content views.

  • Associate a content view with a lifecycle environment.

As the student user on the workstation machine, use the lab command to prepare your system for this exercise.

This command verifies that the Satellite Server is operational, and that the required resources exist.

[student@workstation ~]$ lab start lifecycles-review

Instructions

Important

To reduce exercise wait time, the initial Satellite classroom environment contains the preconfigured Operations and Finance organizations, each with an imported subscription manifest and presynchronized RHEL 9 BaseOS and AppStream repositories. This exercise adds a client DNF repository to the Finance organization.

  1. Verify that the following software repositories are enabled for the Finance organization:

    • Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9

    • Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9

    • Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs

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

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

    3. Click ContentRed Hat Repositories to list the organization's repositories. The Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) and Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs) repositories are already listed in the Enabled Repositories list.

    4. In the Available Repositories list, locate the Red Hat Satellite Client 6 for RHEL 9 x86_64 (RPMs) entry. Click the greater-than symbol (>) to the left of the name to expand the version information. Click the plus sign next to x86_64 to enable this repository version. The Red Hat Satellite Client 6 for RHEL 9 x86_64 (RPMs) entry is displayed in the Enabled Repository list.

  2. Use the hammer command to synchronize the Finance organization's enabled repositories.

    1. 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 ~]#
    2. List the enabled repositories within the Finance organization. Note the numeric identifier for each repository. All of the repositories belong to the same product.

      [root@satellite ~]# hammer --output base repository list --organization Finance
      
      Id:           3
      Name:         Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9
      Product:      Red Hat Enterprise Linux for x86_64
      Content Type: yum
      Url:          http://cdn.lab.example.com/content/dist/rhel9/9/x86_64/appstream/os
      
      Id:           4
      Name:         Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9
      Product:      Red Hat Enterprise Linux for x86_64
      Content Type: yum
      Url:          http://cdn.lab.example.com/content/dist/rhel9/9/x86_64/baseos/os
      
      Id:           5
      Name:         Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs
      Product:      Red Hat Enterprise Linux for x86_64
      Content Type: yum
      Url:          http://cdn.lab.example.com/content/dist/layered/rhel9/x86_64/sat-client/6/os
    3. Synchronize the enabled repositories in the Finance organization. You can synchronize each repository separately by using the --id option on a hammer repository synchronize command. Instead, use the hammer product synchronize command to synchronize all of a product's repositories with a single command. Because most of the repositories are already synchronized, the sync is expected to finish quickly.

      [root@satellite ~]# hammer product synchronize \
      --organization Finance \
      --name "Red Hat Enterprise Linux for x86_64"
      [......................................................................] [100%]
      5 task(s), 5 success, 0 fail
    4. In the web UI, click MonitorTasks to open the Tasks page. Use the Search field under Active Filters: to filter for task actions that begin with Synchronize repository. Verify that the latest repository synchronizations display success in the Result column.

  3. Create a sync plan named Red Hat Products - Finance in the Finance organization. Set the sync plan to update the product's repository content daily, starting today at 6:00 PM.

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

    2. Click ContentSync Plans to display the Sync Plans page, and then click Create Sync Plan to display the New Sync Plan page.

    3. Enter Red Hat Products - Finance in the Name field. In the Interval field, click daily. In the Start Date field, use the current date default as the start date. In the Start Time fields, enter 18 for the hour and 00 for the minute, and then click Save.

  4. Assign the Red Hat Products - Finance sync plan to the enabled repositories in the Finance organization:

    • Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9

    • Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9

    • Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs

    1. In the upper-left corner of the web page, verify that the Finance organization and the Any Location context are set.

    2. On the Sync Plan for Red Hat Products page, click the Products tab, and then click the Add tab. Select the checkbox next to the Red Hat Enterprise Linux for x86_64 product, and click Add Selected. All of the product's repositories are included in this sync plan.

    3. Click the List/Remove tab to verify that the product is in the sync plan. Click the Red Hat Enterprise Linux for x86_64 link to display the Red Hat Enterprise Linux for x86_64 page, and then click the Repositories tab. Verify that the Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9, Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9, and Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs repositories are listed. Do not select any repositories on this page.

  5. Run the sync plan manually to immediately synchronize the configured content.

    1. Click ContentSync Plans to return to the Sync Plans page. Click the Red Hat Products - Finance link to view the sync plan details. Click Select Action in the upper-right corner, and then click Run Sync Plan.

    2. Click MonitorTasks. Use the Search field under Active Filters: to filter for task actions that begin with Synchronize repository. Verify that the latest repository synchronizations display success in the Result column.

  6. Create the Build, Test, and Deploy lifecycle environments for the Finance organization.

    1. Click ContentLifecycle Environments and then click Create Environment Path to display the New Environment page.

    2. Enter Build in the Name field, and click Save to display the Lifecycle Environment Paths page.

    3. Click Add New Environment to display the New Environment page. Enter Test in the Name field, and set the Prior Environment field to Build. Click Save.

    4. Click Add New Environment to display the New Environment page again. Enter Deploy in the Name field, and set the Prior Environment field to Test. Click Save.

  7. Create a FinanceServerBase content view, and add the Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9 repository. Publish the content view, and promote it to the Build lifecycle environment in the Finance organization.

    1. Click ContentContent Views and then click Create content view. On the New content view page, enter FinanceServerBase in the Name field, and click Create content view.

    2. Click the Repositories tab, select the checkbox next to Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9, and then click Add Repositories. Verify that the column Status displays Added for the Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9 repository.

    3. Click Publish new version to display the Publish page. Set the Promote switch to on, and select the Build checkbox. Click Next to display the Review details page.

    4. Click Finish to publish the content view version. Wait for the version promotion to complete. Monitor the progress in the Status column.

Evaluation

As the student user on the workstation machine, use the lab command to grade your work. Correct any reported failures and rerun the command until successful.

[student@workstation ~]$ lab grade lifecycles-review

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 lifecycles-review

Revision: rh403-6.11-3ad886e