3.7.4. Enabling Yum Repositories

Red Hat Satellite 5 and Satellite 6 use different methods to group RPM files and to present them. In Satellite 5, all RPM files are placed into channels which you clone, and you then manage the content from within those cloned channels. The satellite-sync command synchronizes Red Hat channels from RHN into Satellite 5. In Satellite 6, everything is a yum repository and you filter the content from that repository that is exposed to the systems being managed by Satellite 6.
Several options exist for recreating Satellite 5 repositories and importing the content:
  • Use the hammer import repository --synchronize command to initiate repository synchronization in the background.
  • Use the hammer import repository --synchronize --wait command to initiate repository synchronization in the background, but wait for each synchronization to complete before proceeding to the next repository.
  • Use the hammer import repository command with neither option and then synchronize the content manually using the WebUI or hammer commands.
Recommended Practices for Synchronizing Content

The default behavior of the hammer import repository command is to not automatically synchronize content. Many of the following import operations require that synchronization be complete before they can run successfully. Synchronization is a time-consuming task, because it involves retrieving content from external sources into your Satellite 6 server.

Red Hat recommends that you schedule a background synchronization of all content before proceeding. Only repositories available to imported organizations are enabled. The hammer import command does not alter organizations that are not part of the overall transition process.
Run the following command to find, enable, and synchronize all Red Hat content enabled by the uploaded manifest files and matched by channels synchronized on the Satellite 5 server. This command tells the import process to wait until the synchronization is complete, and only synchronizes one repository at a time.
# hammer import repository-enable --synchronize --wait --no-async
After the repository-enable command is complete, run the following command to process local and custom repositories in a similar fashion.
# hammer import repository --synchronize --wait --no-async
The following is an example session of importing repositories but without performing any content synchronization.

Example 3.5. Example Session of Importing Repositories

The following is an example session of successfully importing repositories into Satellite 6.
# hammer import all --entities repository
Import organization         with arguments --csv-file /tmp/exports/users.csv
Summary
  No action taken.
Import repository           with arguments --csv-file /tmp/exports/repositories.csv
Summary
  Created 6 repositories.
  Created 6 products.

3.7.4.1. Enabling External Yum Repositories

You need to recreate all non-Red Hat yum repositories that Satellite 5.6 was configured to use as new external yum repositories from which Satellite 6 can import content.
The following example demonstrates using the --synchronize option to import and synchronize repositories.

Example 3.6. Importing and Synchronizing non-Red Hat Repositories

# hammer import repository --synchronize --wait --no-async \
--csv-file /tmp/exports/repositories.csv

Creating new product: PUPPETLABS.COM
Creating new repository: puppet-rhel6-server-x86_64
Sync started!

Creating new repository: puppet-deps-rhel6-server-x86_64
Sync started!

Creating new repository: puppet-rhel5-server-x86_64
Sync started!

Product [1PUPPETLABS.COM->116] already imported.

Creating new repository: puppet-deps-rhel5-server-x86_64
Sync started!

Creating new product: FEDORAPROJECT.ORG
Creating new repository: epel-rhel6-server-x86_64
Sync started!
Viewing Imported Products and Repositories

Navigate to ContentProducts in the Satellite 6 WebUI to view the resulting products and repositories for your organization. Alternatively, use the following hammer commands:

# hammer organization list

ID | NAME | LABEL | DESCRIPTION

1 | ACME_Corporation | ACME_Corporation | ACME_Corporation Organization
3 | GLOBAL SUPPORT SERVI RED HAT, INC. | GLOBAL_SUPPORT_SERVI_RED_HAT__INC_ | Imported 'GLOBAL SUPPORT SERVI RED HAT, INC.' organization from Red ...

# hammer product list --organization-id 3

ID | NAME | ORGANIZATION | REPOSITORIES | SYNC STATE

32 | Red Hat Enterprise Linux High Performance Networking for RHEL for IBM POWER -... | GLOBAL SUPPORT SERVI RED HAT, INC. | 0 | not_synced
35 | Red Hat Enterprise Linux 7 High Availability High Touch Beta | GLOBAL SUPPORT SERVI RED HAT, INC. | 0 | not_synced

Important

The default behavior of the hammer import repository command is to not automatically synchronize content, but rather only to enable the repositories listed in the repositories.csv file. Red Hat recommends that you use the --synchronize option to schedule a background synchronization of all content before proceeding.