Bookmark this page

Chapter 5.  Deploy Custom Software

Abstract

Goal

Create, manage, and deploy custom software products and repositories.

Objectives
  • Create products and repositories for non-Red Hat content in Red Hat Satellite.

  • Create custom products and repositories with the repository discovery feature to search URLs for multiple repositories.

  • Update custom products and repositories and use content views to make them available to hosts.

Sections
  • Create Custom Products and Repositories (and Guided Exercise)

  • Create Products with Repository Discovery (and Guided Exercise)

  • Administer Custom Products and Repositories (and Guided Exercise)

Lab
  • Deploy Custom Software

Create Custom Products and Repositories

Objectives

  • Create products and repositories for non-Red Hat content in Red Hat Satellite.

Custom Products and Repositories

Satellite Server automatically creates Red Hat repositories and their parent Red Hat products when you add Red Hat content. Satellite supports storing and distributing non-Red Hat content, such as custom packages or files.

Satellite can manage repositories that contain the following content types:

  • RPM packages

  • Kickstart trees

  • ISO and KVM images

  • Containers

  • Files

The files repository type supports provisioning configuration files that are created from a template without needing to deploy an RPM package.

To host custom and third-party content on Satellite Server, you must create new repositories and products. Products are collections of repositories that are grouped to suit software relationships. For example, you can use products to group software repositories from different software vendors.

As with Red Hat repositories, you must also create and maintain custom and third-party products and repositories in an organizational context. Products and repositories that are created within an organizational context are visible only to that organization.

Extra Packages for Enterprise Linux

A Fedora project Special Interest Group (SIG) builds and maintains a community-supported package repository called Extra Packages for Enterprise Linux (EPEL). EPEL versions align with major RHEL releases, and enable RHEL customers to run workloads with software dependencies that are not supported in RHEL. EPEL packages are not included in Red Hat support, but are equivalent to Fedora's level of quality. Typically, EPEL packages are built against RHEL releases.

CentOS Stream

CentOS Stream is the upstream project for RHEL. Development of the next RHEL version is open for community contributions that can directly influence the next release. Patches that are submitted to CentOS Stream are integrated faster to RHEL, to support significant changes during the current RHEL version lifecycle. CentOS Stream is a continuous integration and delivery distribution, with tested and stable nightly builds. You can download and install CentOS Stream for many use cases, including development and light production. CentOS Stream is not included in Red Hat support. Thus, do not mix CentOS Stream with RHEL repositories on the same system.

EPEL Next is an additional EPEL repository for package maintainers to build against CentOS Stream. This repository is useful when CentOS Stream contains an upcoming RHEL library rebase, or if an EPEL package has a minimum version build requirement that is already in CentOS Stream but not yet in RHEL. Use the EPEL Next repository on top of the regular EPEL repository. EPEL Next versions align with EPEL versions that might have CentOS Stream dependencies.

GPG Keys in Red Hat Satellite

When you add custom and third-party content on Satellite Server, you can secure repositories that contain RPM packages and files by using GPG keys. Developers can use the RPM package format to introduce a signature of the header and payload, and as an administrator, you can verify with the GPG public key to ensure that the package comes from a valid and safe organization.

When you enable or configure a repository for a host, the repository public key is imported to that host. If you enable the gpgcheck parameter for that repository, then the host uses the public key to verify packages when they are downloaded to be installed.

For Red Hat repositories, Red Hat signs all the packages with the Red Hat private key. Satellite verifies all Red Hat packages against the Red Hat public key. You can locate the Red Hat public key in the /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release file. This key is used for most RHEL products.

Some vendors might have repositories to discover that they sign with their own key set. Then, the vendor signs the applications with their private key and make the public key available for download. If you make a custom repository to synchronize content from the vendor's repository, then you must add the vendor's repository public key to your new repository before packages start to load into the repository.

For your organization's software, you must use or create a key set. Typically, developers in an organization share the organization's signing keys, because a repository can have only one key. Thus, developers can use the same repositories to provide RPM packages, because they all use the same key set.

Create Custom Products and Repositories

You can create repositories in Satellite Server for non-Red Hat content by using one of two methods. This section discusses the first method: manually creating custom products and their associated repositories. The second method, repository discovery, is discussed later in this chapter.

Create Custom Products

Satellite Server contains custom and third-party software packages in repositories, and you must associate those repositories with a product. Therefore, to use Satellite Server to host non-Red Hat content, you must first create the products. Creating products in Satellite Server requires administrative privileges.

To create a custom product, first choose the required organization and location from the main menu. Then, navigate to ContentProducts and click Create Product.

Set values for the Name and Description fields. The value of Name acts as the identifier of the product. The Description field provides a human-friendly description of the repository names that the product includes. The Label field is automatically populated with the value of the Name field.

If all the repositories in the product use the same key, then you can use the GPG Key list to attach the GPG key at the product level. All the repositories in the product use the attached GPG key. If a repository on the product uses a different key, then you can override the product's public key by attaching the different key at the repository level, as explained later in this section. You must first import the key into Satellite Server to use it. Satellite uses the GPG key to validate the origin of the packages in the repository of the product, and it also uses the key when you install content in a host.

Create Custom Repositories

After you create a product, you can create the repositories within the product that you intend to group. Creating product repositories in Satellite Server requires administrative privileges.

To create a custom repository, navigate to ContentProducts and click the product name to add a repository to. On the Repositories tab, click New Repository.

Set values for the Name and Description fields. The Label field is auto-populated from the Name field. Use the Description field to specify a human-friendly version of the repository name. Then, select the repository type in the Type list. Selecting a repository type enables additional fields under the Sync Settings section of the page. For example, if your custom repository will be a software package repository, then select yum from the Type field. The parameters in the enabled additional section control the custom repository synchronization with the upstream repository.

If you select the yum repository type, then you can select a GPG key from the GPG Key list. This GPG key overrides the product-level GPG key, and Satellite uses it to verify the RPM packages only for this repository.

Figure 5.1: Create repository for a custom product

The following table describes some common parameters in the additional fields after selecting the repository type:

OptionDescription
Restrict to Architecture Enables the repository for a particular architecture. The default value (No restriction) enables the repository for all architectures.
Upstream URL Sets the upstream repository URL for this repository to use as the content source. This field is optional. If you do not specify the URL, then the new repository acts as a stand-alone repository without source content synchronization. You can populate the empty repository by manually adding packages.
Upstream Username Sets the username for authentication at the upstream repository. Leave this field blank if the upstream repository is not password-protected.
Upstream Password Sets the password for authentication at the upstream repository. Leave this field blank if the upstream repository is not password-protected.
Download Policy Specifies how clients retrieve packages from the source. The On Demand policy downloads only metadata during synchronization. After synchronization, the packages are downloaded only when clients request them. The Immediate policy downloads metadata and packages during synchronization.
Verify SSL When this checkbox is selected, the Katello component of Satellite Server verifies that the SSL certificates of the upstream repository are signed by a trusted Certificate Authority (CA).
Unprotected You can clear the Unprotected checkbox to require a subscription entitlement certificate for accessing this repository. By default, the repository is published through HTTP.
Mirroring Policy This checkbox keeps the local repository in synchronization with the upstream repository.

Add Packages to Repositories

Typically, you add packages to a custom repository during its initial creation; you can also add them later. Adding packages to custom product repositories in Satellite Server requires administrative privileges.

To add packages to a repository, first choose the required organization and location from the main menu. Then, navigate to ContentProducts and click the product name to add packages to. On the Repositories tab, click the repository name to display the details of the repository. In the Upload Package section, click Browse to select the locally available packages, and click Open to mark the packages for uploading to the repository. Click Upload.

In the Content Counts section, the Content Type table displays the number of packages in the repository. To view the packages in the repository, click the number that corresponds to the package count, to open the Packages page of the repository.

Remove Packages from Repositories

You require administrative privileges to remove packages from product repositories.

To remove repository packages, navigate to the Packages page of the custom product repository. Select the checkbox for the package to remove, and click Remove Packages.

References

For more information, refer to the Creating a Custom Product section of the Importing Content chapter in the Red Hat Satellite 6.11 Managing Content Guide at https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html-single/managing_content/index#Creating_a_Custom_Product_content-management

For more information, refer to the Adding a Custom RPM Repository section of the Importing Content chapter in the Red Hat Satellite 6.11 Managing Content Guide at https://access.redhat.com/documentation/en-us/red_hat_satellite/6.11/html-single/managing_content/index#Adding_Custom_RPM_Repositories_content-management

Revision: rh403-6.11-3ad886e