Bookmark this page

Lab: Deploy Custom Software

Provide a signed software package to content hosts by creating a custom product, a repository with a GPG key, and an updated content view.

Outcomes

  • Create a custom product and a repository for providing validated software packages.

  • Install a validated package on a content host.

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

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

Instructions

The Finance development team needs to deploy custom software packages that are signed with the existing Example Software company GPG key that was created by developer Trey Feagle. Create a Custom Software product and an Admin Tools repository in the Finance organization. The development team provided the signed ~/home/student/bkp-1.0-1.el9.x86_64.rpm package and the /home/student/EXAMPLE-RPM-GPG-KEY public key on the satellite system. Install the bkp package on the serverb system to test the package validation.

  1. Log in to the web UI, https://satellite.lab.example.com, as the admin user 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. Use the provided public key to create a content credential.

    1. From the Satellite web UI, add the GPG public key to the credentials store. Click ContentContent Credentials, and then click Create Content Credential.

    2. Enter Example Software in the Name field.

    3. Select GPG Key from the Type list. Click Browse, and then select the EXAMPLE-RPM-GPG-KEY file in the /home/student directory. Click Save.

  4. Create a custom product called Custom Software, and add an Admin Tools custom repository to the product.

    1. Click ContentProducts, and then click Create Product.

    2. Enter Custom Software in the Name field. The Label field is autogenerated from the Name field. Enter Example Software in the GPG Key field, and then click Save.

    3. In the Repositories tab, click New Repository.

    4. Enter Admin Tools in the Name field. The Label field is autogenerated from the Name field.

    5. Select yum from the Type menu. Select the checkbox for Verify SSL. Click Save.

  5. Upload the signed bkp package to the Admin Tools repository.

    1. In the Repositories tab, click the Admin Tools link to view the repository details.

    2. In the Upload Package section, click Browse. Select the bkp-1.0-1.el9.x86_64.rpm file in the /home/student/ directory, and then click Open. Click Upload. The package count for the Admin Tools repository is now 1.

  6. Update the FinanceServers activation key to add the Admin Tools repository.

    1. Click ContentActivation Keys, and then click the FinanceServers link.

    2. On the FinanceServers page, click the Repository Sets tab. View the Status column for each of the listed repositories.

    3. Select the checkbox for the Admin Tools repository. Select Override to Enabled in the Select Action list.

  7. Update the FinanceServerBase content view to verify or add the following repositories. Publish and promote the new content view version to the Build lifecycle environment in the Finance organization.

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

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

    • Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs

    • Admin Tools

    1. Click ContentContent Views, and then click the FinanceServerBase content view. In the Repositories tab, select the checkbox for the Admin Tools repository, and then click Add Repositories.

    2. Click Publish new version. Enter Add Admin Tools Repository in the Description field. Click the Promote switch, and then select the Build checkbox. Click Next.

    3. Review the details, and then click Finish. Wait for the process to complete.

  8. Install the bkp package on the serverb content host and import the public key for the signed package.

    1. Log in to the serverb system as the student user and switch to the root user.

      [student@workstation ~]$ ssh student@serverb
      [student@serverb ~]$ sudo -i
      [sudo] password for student: student
      [root@serverb ~]#
    2. Install the bkp-1.0-1.el9.x86_64.rpm package.

      [root@serverb ~]# dnf install bkp
      ...output omitted...
      Is this ok [y/N]: y
      ...output omitted...
      Importing GPG key 0x97751C8A:
       Userid     : "student <student@workstation.lab.example.com>"
       Fingerprint: 1CAC FBA2 9532 C029 1D7B 12A0 CC9F CF16 9775 1C8A
       From       : https://satellite.lab.example.com/katello/api/v2/repositories/25/gpg_key_content
      Is this ok [y/N]: y
      Key imported successfully
      ...output omitted...
      Complete!
    3. Return to the workstation system as the student user.

      [root@serverb ~]# exit
      logout
      [student@serverb ~]$ exit
      logout
      [student@workstation ~]$

Evaluation

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

Revision: rh403-6.11-3ad886e