After installing the RHN Satellite Server, you must provide it the packages and channels to be served. This chapter explains how to import that data and keep it up-to-date.
With the Satellite installation, Red Hat Network provides an application designed specifically to import and synchronize data - the RHN Satellite Synchronization Tool. This tool, which comes with the rhns-satellite-tools package, enables an RHN Satellite Server to update its database metadata and RPM packages with that of Red Hat. To launch it, as root execute the command:
satellite-sync |
The tool can be used in a closed environment, such as the one created with a disconnected install, or it may obtain data directly over the Internet. For disconnected importing and synchronization, local media in the form of Red Hat Network Channel Content CDs are required. After installing and mounting the discs, the sole difference in use will be the addition of the --mount-point option and path to the files appended to every command. This will be covered in more detail in a moment.
The RHN Satellite Synchronization Tool works incrementally, or in steps. For it to obtain Errata information, it must first know the packages contained. For the packages to be updated, the tool must first identify the associated channel(s). For this reason, the RHN Satellite Synchronization Tool performs its actions in the following order:
channel-families — Import/synchronize channel family (architecture) data.
channels — Import/synchronize channel data.
rpms — Import/synchronize RPMs.
packages — Import/synchronize full package data for those RPMs retrieved successfully.
errata — Import/synchronize Errata information.
Each of these steps can be initiated individually for testing purposes with the effect of forcing the tool to stop when that step is complete. All steps that precede it, however, will have taken place. Therefore, calling the rpms step will automatically ensure the channels and channel-families steps take place first. To initiate an individual step, use the --step, like so:
satellite-sync --step=rpms |
In addition to --step the RHN Satellite Synchronization Tool offers many other command line options. To use them, insert the option and the appropriate value after the satellite-sync command when launching import/synchronization.
Option | Description |
---|---|
-h, --help | Display this list of options and exit. |
-d=, --db=DB | Include alternate database connect string: username/password@SID. |
-m=, --mount-point=MOUNT_POINT | Import/sync from local media mounted to the Satellite. To be used in closed environments (such as those created during disconnected installs). |
--list-channels | List all available channels and exit. |
-c=, --channel=CHANNEL_LABEL | Process data for this channel only. Multiple channels can be included by repeating the option. If no channels are specified, all channels on the Satellite will be freshened. |
-p, --print-configuration | Print the current configuration and exit. |
--no-ssl | Not Advisable - Turn off SSL. |
--step=STEP_NAME | Perform the sync process only to the step specified. Typically used in testing. |
--no-rpms | Do not retrieve actual RPMs. |
--no-packages | Do not process full package data. |
--no-errata | Do not process Errata information. |
--no-kickstarts | Do not process kickstart data (provisioning only). |
--force-all-packages | Forcibly process all package data without conducting a diff. |
--cache-refresh-level=LEVEL_NUMBER | The level of caching refresh for the Satellite, 0-6. Refer to Section 6.1.3 Import/Sync Cache Refresh for a complete description. |
--debug-level=LEVEL_NUMBER | Override the amount of messaging sent to log files and generated on the screen set in /etc/rhn/rhn.conf, 0-6 (2 is default). |
Email a report of what was imported/synchronized to the designated recipient of traceback email. | |
--traceback-mail=TRACEBACK_MAIL | Direct sync output (from --email) to this email address. |
-s=, --server=SERVER | Include the hostname of an alternative server to connect to for synchronization. |
--http-proxy=HTTP_PROXY | Add an alternative HTTP proxy server in the form hostname:port. |
--http-proxy-username=HTTP_PROXY_USERNAME | Include the username for the alternative HTTP proxy server. |
--http-proxy-password=HTTP_PROXY_PASSWORD | Include the password for the alternative HTTP proxy server. |
--ca-cert=CA_CERT | Use an alternative SSL CA certificate by including the full path and filename. |
--systemid=SYSTEM_ID | For debugging only - Include path to alternative digital system ID. |
--systemid=SYSTEM_ID | For debugging only - Include path to alternative digital system ID. |
--batch-size=BATCH_SIZE | For debugging only - Set maximum batch size in percent for XML/database-import processing. Open man satellite-sync for more information. |
Table 6-1. Satellite Import/Sync Options
If no options are included, satellite-sync will synchronize all channels that already exist in the Satellite's database. By default, the --cache-refresh-level=2 and --step (all steps) options are enabled.
Keep in mind, when using the --channel option, you must specify the channel label, not its name. For instance, use "rhel-i386-as-3" not "Red Hat Enterprise Linux 3 i386." Use the --list-channels option to obtain a list of all channels by label. All of these channels are available for importing and synchronizing.
The RHN Satellite Synchronization Tool caches metadata used for the synchronization process. This cache, which exists by default in /var/cache/rhn/, can be completely refreshed every time the process is run, be partially refreshed, or be left in place entirely. The closer to a full refresh, the slower the synchronization process.
The default setting is a cache refresh level of 2. This can be adjusted using the --cache-refresh-level option. In the event that satellite-sync is called many times in a short period of time, level 0 may be more appropriate. Here are the levels:
0 — Do not refresh unless something differs.
1 — Delete staging area so all short (indexing) package data is downloaded every time.
2 — Default behavior - Obtain short (indexing) package data and long package data.
3 — Always replace Errata information.
4 — Remove all caches upon sync completion.
5 — Remove all caches upon sync initialization.
6 — Remove all caches upon sync completion and initialization.
Increasing the cache level is useful in troubleshooting. If users suspect the cache is out of sync or corrupt, they may increase the level incrementally in order to completely remove it and start anew. Refer to Section 7.5 Caching Issues for manual clearing instructions.