Chapter 8. Content and Synchronization

Your Red Hat Satellite Server installation is complete. The next step is to provide it with packages and channels for use with client systems. This chapter explains how to import content and keep it up-to-date.
Ensure you meet the following prerequisites before performing a Red Hat Satellite synchronization:
  • A successful Red Hat Satellite installation.
  • The Red Hat Satellite requires access to one of the following content sources:
    • The Red Hat Content Delivery Network (CDN) via the Internet.
    • Red Hat Network Channel Content ISOs.
    • Red Hat Satellite Exporter data.
The tool used to synchronize content depends on the content source. If content is being synchronized from the Red Hat Content Delivery Network (CDN) via the Internet, the Content Delivery Network Synchronization (cdn-sync) tool is used. If content is being synchronized from Red Hat Network Channel Content ISOs, or from one Satellite instance to another Satellite instance, the Satellite Synchronization (satellite-sync) tool is used. The sections in this chapter explain the use of each tool and its use with each content source type.
The new tool was introduced with Red Hat Satellite 5.8 because of the retirement of the Red Hat Network. To ease the transition, the cdn-sync tool has many of the same parameters as the satellite-sync tool.

8.1. Red Hat Satellite CDN Synchronization Tool

The Red Hat Satellite CDN Synchronization Tool (cdn-sync) enables a Satellite server to synchronize its repositories, and associated metadata, with the Red Hat Content Delivery Network (CDN).

Important

The cdn-sync tool imports a large amount of data, especially on newly installed Red Hat Satellite servers. If your database has performance issues after a significant amount of data changes, consider gathering statistics on the database.
In its simplest usage, run the cdn-sync command, and the synchronization of all packages in all available repositories begins. The total amount of data to be downloaded can be very large, so Red Hat recommends you first evaluate the amount of data to be downloaded, and determine a suitable strategy to minimize its impact on network load. For example, you could identify those channels with the most content, and schedule their synchronization accordingly.
In earlier versions of Red Hat Satellite, the satellite-sync -l command would list the number of packages per channel by default. The Red Hat CDN is repository based, and does not allow the number of packages per repository to be shown in real time. To provide this information, you must use the --count-packages parameter. The first time this parameter is used, it may take a long time time to process the data, depending on your manifest and the number of accessible repositories and channels. However the first run creates a cache, so subsequent runs are faster. For example, the first run might take an hour, and subsequent runs from 5 to 10 minutes.
The cdn-sync tool logs its activity in the file /var/log/rhn/cdnsync.log. It also logs the synchronization of each channel in /var/log/rhn/cdnsync/channel_name.

8.1.1. Calculating Data Download Size

To calculate the amount of data to be downloaded, list all channels and their total disk space sizes.
# cdn-sync --list-channels --count-packages
Extract from output of cdn-sync --list-channels --count-packages command.
12:18:48   . rhel-x86_64-server-7             14232 packages (18.4G)
12:18:48   . rhel-x86_64-server-7-htb         5200 packages (4.1G)
12:18:48   . rhel-x86_64-server-7.1.eus       8056 packages (10.5G)
12:18:48   . rhel-x86_64-server-7.2.eus       11697 packages (15.3G)

8.1.2. Synchronize Select Channels

When you have determined the names of channels to be synchronized, list them in the cdn-sync command's --channel parameter. Note that the --channel parameter accepts only one channel. To synchronize multiple channels, either repeat the cdn-sync command, or repeat the --channel parameter.
Example cdn-sync command to synchronize the four example channels in Section 8.1.1, “Calculating Data Download Size”.
# cdn-sync --channel rhel-x86_64-server-7 \
--channel rhel-x86_64-server-7-htb \
--channel rhel-x86_64-server-7.1.eus \
--channel rhel-x86_64-server-7.2.eus