Chapter 4. Populating Red Hat Satellite with Content

Red Hat Satellite provides multiple types of content to subscribed client hosts including software packages, errata, Puppet modules, and container images.
The primary source of this content is the Red Hat Customer Portal, in order to access it, you need to upload a subscription manifest file to the Satellite server. A subscription manifest provides subscriptions to client hosts through the Red Hat Satellite rather than through Red Hat Network. Obtain the subscription manifest file from the Red Hat Customer Portal as described in Section 4.1.1.1, “Creating a Subscription Manifest”, or by contacting Red Hat Support.
This chapter outlines the process of populating your Red Hat Satellite server with content. Some of the following procedures are not needed frequently and are usually performed only once after installation. Others, like Section 4.1.3, “Synchronizing Content” must be repeated regularly to keep the content up to date.
The steps required to get the content from Red Hat Customer Portal to the Satellite Server depend on the type of deployment:

4.1. Connected Satellite

A connected Satellite server has access to the Internet and therefore can download software packages, errata, Puppet modules, and container images directly from the Red Hat Customer Portal.

4.1.1. Accessing Red Hat Content Providers

This section outlines the steps required to receive content from Red Hat Customer Portal. First create a manifest on the Red Hat Customer Portal, then upload it to the Satellite server, and enable Red Hat repositories.

4.1.1.1. Creating a Subscription Manifest

A subscription manifest can be obtained through the method below or by contacting Red Hat Support. The manifest is used to set up Red Hat content providers and contains repository information and subscriptions. It is used as a basis of dispensing subscriptions and Red Hat Network (RHN) content to client systems from Red Hat Satellite.

Important

Manifests are organization-specific, which means you have to create and upload a separate manifest for every organization on your Satellite.
Prerequisites

You must meet the following conditions before continuing with this task:

  • A Customer Portal user name and password.
  • Sufficient subscriptions to add to the manifest.

Procedure 4.1. To Create a Manifest for Satellite 6:

  1. Navigate to https://access.redhat.com and click SUBSCRIPTIONS on the main menu at the top of the page.
  2. Scroll down to the Red Hat Subscription Management section, and click Satellite under Subscription Management Applications.
  3. To create a manifest for a new system, click Register a Satellite. Select the Satellite version and Name that must match the name of the organization on your Satellite. Click Register.
    To add or modify subscriptions of an existing manifest, click the name of the system this manifest is associated to, and click Attach a subscription.
  4. For each subscription that you want to attach, select the check box for that subscription, and specify the quantity of subscriptions to attach.
  5. Click Attach Selected.

    Note

    It can take several minutes for all the subscriptions to attach. Refresh the screen every few minutes until you receive confirmation that the subscriptions are attached.
  6. After the subscriptions have been attached, click Download Manifest to generate an archive in .zip format containing the manifest for Red Hat Satellite.

4.1.1.2. Uploading a Subscription Manifest to Satellite

This section describes how to upload a subscription manifest to an organization. Because subscription manifests are organization-specific, ensure you select the correct organization before you try to upload a subscription manifest. Failing to do so will cause a permission denied error (Error 403).

Procedure 4.2. To Upload a Subscription Manifest:

  1. Log in to the Satellite server and select the desired organization from the menu in the top left hand corner.
  2. Click ContentRed Hat Subscriptions and then click Manage Manifest at the upper right of the page.
  3. In the Subscription Manifest section, click Actions and under the Upload New Manifest subsection, click Browse.
  4. Select the manifest file to upload, and then click Upload.

4.1.1.3. Enabling Red Hat Repositories

The Red Hat Satellite manifest file provides access to Red Hat products and repositories. Because most products have several architectures and product versions, Red Hat Satellite Server allows the Satellite administrators to choose which repositories are required by their organizations. You need to enable the repositories in Red Hat Satellite Server to prepare them for synchronization.

Procedure 4.3. To Enable Red Hat Repositories:

  1. On the main menu, click ContentRed Hat Repositories and then click the tab for the type of content that you want to enable.
  2. Click the product name for which you want to add repositories. This expands the list of available repository sets.
  3. Click each repository set from which you want to select repositories, and select the check box for each required repository. The repository is automatically enabled. The content from this repository will be downloaded during the next synchronization, see Section 4.1.3, “Synchronizing Content”. After enabling a Red Hat repository, a product for this repository is automatically created.

    Important

    Ensure you enable the Satellite Tools repository. This repository provides the katello-agent and puppet-agent packages for clients registered to the Satellite Server.
The following is an example set of subscriptions that contain repositories with the latest packages for Red Hat Enterprise Linux 6:
  • Red Hat Enterprise Linux 6 Server Kickstart x86_64 6Server Repository
  • Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server Repository
  • Red Hat Enterprise Linux 6 Server - Satellite Tools RPMs x86_64 Repository

4.1.2. Using Products

A product is a group of related repositories that acts as the smallest unit of the synchronization process. Products ensure that repositories that depend on each other are synchronized together. For Red Hat repositories, products are created automatically after enabling the repository. Therefore, you only need to create products manually for repositories with custom or third-party content.

4.1.2.1. Creating a Product

These steps show how to create a new product.

Procedure 4.4. To Create a Product:

  1. Click ContentProducts.
  2. Click New Product.
  3. Specify the name of the new product in the Name field.
  4. Specify the label for the new product in the Label field.
  5. Select a GPG key from the GPG Key drop-down menu.
  6. Select a synchronization plan from the Sync Plan drop-down menu. You can also select the New Sync Plan link to create a new synchronization plan.
  7. Enter a description of the new product in the Description field.
  8. Click Save.

4.1.2.2. Adding Repositories to a Product

These steps show how to add repositories to a product in Red Hat Satellite.

Procedure 4.5. To Add Repositories to a Product:

  1. Click ContentProducts.
  2. Click the product to add a repository.
  3. Click Repositories.
  4. Click Create Repository.
  5. Specify the name of the new repository in the Name field.
  6. Specify a label for the new repository in the Label field.
  7. Select the type of the repository from the Type drop-down menu.
  8. Specify the URL of the repository in the URL field.
  9. Choose whether to publish the repository via HTTP by selecting Publish via HTTP.
  10. Select a GPG key for the repository from the GPG Key drop-down menu.
  11. Click Create.

4.1.2.3. Using Bulk Actions for Products

This section describes how to use bulk actions to synchronize or remove products in Red Hat Satellite. The procedure described here requires that at least one product be available.

Procedure 4.6. To Synchronize Multiple Products:

  1. Navigate to ContentProducts.
  2. Select the check box for the products you want to work with.
  3. Click Bulk Actions.
  4. Click the Product Sync tab and then click Sync Now.

Procedure 4.7. To Remove Multiple Products:

  1. Navigate to ContentProducts.
  2. Select the check box for the products you want to work with.
  3. Click Bulk Actions.
  4. Click Remove Products and then click Remove.

Procedure 4.8. To Update Synchronization Plans for Multiple Products:

  1. Navigate to ContentProducts.
  2. Select the check box for the products you want to work with.
  3. Click Bulk Actions.
  4. Click the Alter Sync Plans tab. Depending on the type of action you want to perform select from the following alternatives.
    • To create a new synchronization plan, click Create Sync Plan. Specify the required details and click Save.
    • To remove the synchronization plans from the selected products, click Unattach Sync Plan.
    • To update the synchronization plans for the selected products, click Update Sync Plan.

4.1.2.4. Using Repository Discovery

Repository discovery enables you to search using a URL to discover repositories available to include in a product.

Procedure 4.9. To Use Repository Discovery:

  1. Navigate to ContentProducts.
  2. Click Repo Discovery.
  3. Insert the URL where the repositories are located in the Yum Repo Discovery field.
  4. Click Discover.
    A list of the repositories at the URL is displayed under Results.
  5. Click Discovered URLs to add the repositories to the product.
  6. Click Create selected.
  7. Choose whether to add the repositories to an existing product or create a new product.
    1. To add the repositories to an existing product:
      1. Select Existing Product.
      2. Select the required product from the drop-down menu.
    2. To create a new product to add the repositories to:
      1. Select New Product.
      2. Enter the Name and Label for the new product and select a GPG Key from the drop-down menu.
  8. Select Serve via HTTP to serve the repository via HTTP.
  9. Edit the Name and Label for the Selected URLs.
  10. Click Create.

4.1.2.5. Removing a Product

This section describes how to remove products from Red Hat Satellite.

Procedure 4.10. To Remove a Product from Satellite:

  1. Navigate to ContentProducts.
  2. Select the check box next to the products you want to remove.
  3. Click Bulk Actions and then click Remove Products.
  4. Click Remove to confirm that you want to remove the products.

4.1.3. Synchronizing Content

Synchronization is the act of coordinating updates between the Red Hat Satellite repositories and the source repositories being used. It is a required step after enabling repositories, in order to populate the Red Hat Satellite with content from the source repositories.
Constant, scheduled synchronization will result in:
  • Data integrity between packages
  • Updated packages, security fixes, and errata
Red Hat Satellite's synchronization management capabilities allows an organization's administrators to create synchronization plans to configure how often a host should look for and install updates. Synchronization plans are then paired with the product repositories to specify a synchronization schedule that will allow products to be updated at specific intervals that are convenient for the organization's network.

4.1.3.1. Synchronization Status

Important

The manual synchronization of repositories is required after enabling them. It is at this point that the local repository in the Satellite is populated by the required packages.
These steps show how to synchronize products in Red Hat Satellite.

Procedure 4.11. Synchronize Products

  1. Navigate to ContentSync Status. Based on the subscriptions and repositories enabled, the list of product repositories available for synchronization is displayed.
  2. Click the arrow next to the product name to see available content.
  3. Select the content you want to synchronize.
  4. Click Synchronize Now to starting synchronizing. The status of the synchronization process will appear in the Result column. If synchronization is successful, Sync complete will appear in the Result column. If synchronization failed, Error syncing will appear.

Note

Content synchronization can take a long time. The length of time required depends on the speed of disk drives, network connection speed, and the amount of content selected for synchronization.

4.1.3.2. Creating a Synchronization Plan

Regular, frequent synchronization is required to maintain data integrity between packages as well as making sure that packages are updated to the latest security fixes. Red Hat Satellite provides the ability to create scheduled synchronization plans that allow package updates at intervals convenient to the organization.

Procedure 4.12. To Create a Synchronization Plan:

  1. Navigate to ContentSync Plans.
  2. Click New Sync Plan to create a new synchronization plan.
  3. Specify the Name, Description, Interval and Start Date for the plan.
  4. Click Save.
After creating a synchronization plan, select products that will be synchronized according to this plan as described in Section 4.1.3.3, “Applying a Synchronization Schedule”.

Note

Synchronization plans are applied per product, therefore all repositories associated with the product are synchronized with the same frequency. It is not possible to set different synchronization intervals for repositories in the same product.

4.1.3.3. Applying a Synchronization Schedule

After you have created a synchronization plan, you need to associate products with that plan to create a synchronization schedule. The following procedure describes how to create a synchronization schedule in Red Hat Satellite 6.

Procedure 4.13. To Create a Synchronization Schedule:

  1. Click ContentSync Plans and select the synchronization plan you want to implement.
  2. Click ProductsAdd in the synchronization plan main page.
  3. Select the check box of the product to associate with the synchronization plan.
  4. Click Add Selected.

4.1.4. Using a Content ISO for Initial Synchronization

Even if the Satellite Server can connect directly to the Red Hat Customer Portal, you can perform the initial synchronization from a locally mounted content ISO. Such synchronization is not limited by network bandwidth and therefore is usually faster, especially when synchronizing large repositories for the first time. Once the initial synchronization is completed from the content ISO, you can switch back to downloading content through the network connection.
A connection to the Red Hat Customer Portal is required for downloading repository metadata. The following example uses the Red Hat Satellite content ISO, but you can also use the exported content from katello-disconnected (see Section 4.2.2, “Using the Synchronization Host”).

Example 4.1. Synchronizing a Repository from a Local Source

This example shows how to perform the first synchronization of the Red Hat Enterprise Linux 6 repository from a content ISO.
  1. Download the content ISO for Red Hat Enterprise Linux 6 from the Red Hat Customer Portal (see Section 4.2.1, “Using Content ISO” for detailed instructions). Copy the content ISO to your Satellite server, for example to the /root/isos/ directory.
  2. On the Satellite server, create a mount point, mount the ISO and copy its content to a writable directory that Satellite can access, in this example /mnt/rhel6/:
    # mkdir /mnt/iso
    # mount -o loop /root/isos/sat-6-isos--rhel-6-server-x86_64.iso /mnt/iso
    # cp -ruv /mnt/iso/ /mnt/rhel6/
    Then unmount the ISO and remove the mount point:
    # umount /mnt/iso
    # rmdir /mnt/iso
  3. Set the correct SELinux context and ownership for the content directory:
    # chcon -R --type=httpd_sys_rw_content_t /mnt/rhel6/
    # chown -R apache:apache /mnt/rhel6/
  4. Create or edit the /etc/pulp/content/sources/conf.d/local.conf file. Insert the following text to the file:
    [rhel-6-server]
    enabled: 1
    priority: 0
    expires: 3d
    name: Red Hat Enterprise Linux 6 Server
    type: yum
    base_url: file:///mnt/rhel6/content/dist/rhel/server/6/6Server/x86_64/os/
    
    The base_url path may differ in your content ISO. The directory specified in base_url must contain the repodata directory, otherwise the synchronization will fail. To synchronize multiple repositories, create a separate entry for each of them in the configuration file /etc/pulp/content/sources/conf.d/local.conf.
  5. In the Satellite web UI, navigate to ContentRed Hat Repositories and select the repository to be enabled, in this example Red Hat Enterprise Linux 6 Server RPMs x86_64 6Server.
    Under ContentSync Status select the repository to be synchronized and click Synchronize Now.
    Note that there is no indication in the Satellite web UI of which source is being used. In case of problems with a local source, Satellite pulls content through the network. To monitor the process, run the following command in the console on Satellite (limited to Red Hat Enterprise Linux 7 base systems):
    # journalctl -f -l SYSLOG_IDENTIFIER=pulp | grep -v worker[\-,\.]heartbeat
    The above command displays interactive logs. First, the Satellite server connects to the Red Hat Customer Portal to download and process repository metadata. Then, the local repository is loaded. In case of any errors, cancel the synchronization in the Satellite web UI and verify your configuration.
  6. After successful synchronization you can detach the local source by removing its entry from /etc/pulp/content/sources/conf.d/local.conf.