Chapter 4. Managing Alternate Content Sources
Alternate content sources define alternate paths to download content during synchronization. The content itself is downloaded from the alternate content source, while the metadata is downloaded from the Satellite Server or the upstream URL, depending on the configuration. You can use alternate content source to speed up synchronization if the content is located on the local filesystem or on a nearby network. You can set up alternate content sources for Satellite Server and Capsule. You must refresh the alternate content source after creation or after making any changes. A weekly cron job refreshes all alternate content sources. You can also refresh the alternate content sources manually using the Satellite web UI or the Hammer CLI. Alternate content sources associated with your Satellite Server, or Capsule Servers attached to multiple organizations, affect all organizations.
There are three types of alternate content sources:
- Custom
- Custom alternate content sources download the content from any upstream repository on the network or filesystem.
- Simplified
- Simplified alternate content sources copy the upstream repository information from your Satellite Server for the selected products. Simplified alternate content sources are ideal for situations where the connection from your Capsule to the upstream repo is faster than from your Satellite Server. Selecting the Red Hat products when creating a simplified alternate content source will download the content to the Capsules from the Red Hat CDN.
- RHUI
- RHUI alternate content sources download content from a Red Hat Update Infrastructure server. Satellite web UI provides examples to help you find the network paths and to import authentication credentials. The RHUI alternate content source must be RHUI version 4 or greater and use the default installation configuration. For example, AWS RHUI is unsupported because it uses an installation scenario with unique authentication requirements.
Permission Requirements for Alternate Content Sources
Non-administrator users must have the below permissions to manage alternate content sources:
-
view_smart_proxies
-
view_content_credentials
-
view_organizations
-
view_products
In addition to the above permissions, assign permissions specific to alternate content sources, depending on the actions the users can perform:
-
view_alternate_content_sources
-
create_alternate_content_sources
-
edit_alternate_content_sources
-
destroy_alternate_content_sources
4.1. Configuring Custom Alternate Content Sources
Prerequisites
- If the repository requires SSL authentication, import the SSL certificate and key to the Satellite. For more information, see Importing Custom SSL Certificates in Managing Content.
-
Note that the alternate content source paths consist of a base URL appended with the subpaths that you provide. For example, if your base URL is
https://server.example.com
and your subpaths arerhel7/
andrhel8/
, then bothhttps://server.example.com/rhel7/
andhttps://server.example.com/rhel8/
will be searched.
Procedure
- In the Satellite web UI, navigate to Content > Alternate Content Sources.
- Click Add Source and set the Source type as Custom.
- Select the Content type.
- In the Name field, enter a name for the alternate content source.
- Optional: In the the Description field, provide a description for the ACS.
- Select Capsules to which the alternate content source is to be synced.
- Enter the Base URL of the alternate content source.
- Enter a comma-separated list of Subpaths.
- Provide the Manual Authentication or Content Authentication credentials, if these are needed.
- If SSL verification is required, enable Verify SSL and select the SSL CA certificate.
- Review details and click Add.
- Navigate to Content > Alternate Content Sources > click the vertical ellipsis next to the newly created alternate content source > Select Refresh.
CLI procedure
On Satellite Server, enter the following command:
# hammer alternate-content-source create \ --alternate-content-source-type custom \ --base-url "https://local-repo.example.com:port" \ --name "My_ACS_Name" \ --smart-proxy-ids My_Capsule_ID
Check if the newly created alternate content source is listed:
# hammer alternate-content-source list
Refresh the alternate content source:
# hammer alternate-content-source refresh --id My_Alternate_Content_Source_ID
Add the Capsules to which the alternate content source is to be synced:
# hammer alternate-content-source update \ --id My_Alternate_Content_Source_ID \ --smart-proxy-ids My_Capsule_ID
Refresh the alternate content sources:
# hammer alternate-content-source refresh --id My_Alternate_Content_Source_ID
4.2. Configuring Simplified Alternate Content Sources
Procedure
- In the Satellite web UI, navigate to Content > Alternate Content Sources.
- Click Add Source and set the Source type as Simplified.
- Select the Content type.
- In the Name field, enter a name for the alternate content source.
- Optional: In the Description field, provide a description for the ACS.
- Select Capsules to which the alternate content source is to be synced.
- Optional: Select Use HTTP proxies if you want the ACS to use the Capsule Server’s HTTP proxy.
- Select the products that should use the alternate content source.
- Review details and click Add.
- Navigate to Content > Alternate Content Sources, click the vertical ellipsis next to the newly created alternate content source, and select Refresh.
CLI procedure
Create a simplified ACS:
# hammer alternate-content-source create \ --alternate-content-source-type simplified \ --name My_ACS_Name \ --product-ids My_Product_ID \ --smart-proxy-ids My_Capsule_ID
Check if the newly created ACS is listed:
# hammer alternate-content-source list
Refresh the ACS:
# hammer alternate-content-source refresh --id My_ACS_ID
4.2.1. Synchronizing Capsule Directly From Red Hat CDN
You can use simplified alternate content sources to configure your Capsule to sync content directly from Red Hat CDN.
Procedure
- In the Satellite web UI, navigate to Content > Alternate Content Sources.
- Click Add Source and set the Source type as Simplified.
- Set the Content type to Yum.
- In the Name field, enter a name for the alternate content source.
- Optional: In the Description field, provide a description for the alternate content source.
- Select Capsules that you want to sync directly from Red Hat CDN.
- Optional: Select Use HTTP proxies if you want the ACS to use the Capsule Server’s HTTP proxy.
- Select the Red Hat products that should be synced to the Capsule from Red Hat CDN.
- Review details and click Add.
- Navigate to Content > Alternate Content Sources, click the vertical ellipsis next to the newly created alternate content source, and select Refresh.
The Capsule will now download content from Red Hat CDN and not the Satellite.
4.3. Configuring RHUI Alternate Content Sources
Prerequisites
- Generate the client entitlement certificates for the required repos on the RHUA node as described in Creating a client entitlement certificate with the Red Hat Update Infrastructure Management Tool in Configuring and Managing Red Hat Update Infrastructure.
- Import the client entitlement certificates into Satellite. For more information, see Importing Custom SSL Certificates in Managing Content.
Obtain a list of the subpaths for the required repositories. Execute the following command on your RHUA server:
# rhui-manager repo info --repo_id My_Repo_ID
-
Note that the alternate content source paths consist of a base URL appended with the subpaths that you provide. For example, if your base URL is
https://server.example.com
and your subpaths arerhel7/
andrhel8/
, then bothhttps://server.example.com/rhel7/
andhttps://server.example.com/rhel8/
will be searched.
Procedure
- In the Satellite web UI, navigate to Content > Alternate Content Sources.
- Click Add Source and set the Source type as RHUI.
- Generate RHUI certificates using the command provided in the Satellite web UI. Ensure that you pass the repo labels of the desired repositories.
- In the Name field, enter a name for the alternate content source.
- Optional: In the Description field, provide a description for the ACS.
- Select Capsules to which the alternate content source is to be synced.
- Optional: Select Use HTTP proxies if you want the ACS to use the Capsule’s HTTP proxy.
- Enter the Base URL of the Red Hat Update Infrastructure CDS node.
- Enter a comma-separated list of Subpaths.
- Provide the Content Credentials, if these are needed.
- If SSL verification is required, enable Verify SSL and select the SSL CA certificate.
- Review details and click Add.
- Navigate to Content > Alternate Content Sources, click the vertical ellipsis next to the newly created alternate content source, and select Refresh.
CLI procedure
On Satellite Server, enter the following command:
# hammer alternate-content-source create \ --alternate-content-source-type rhui \ --base-url "https://rhui-cds-node/pulp/content" \ --name "My_ACS_Name" \ --smart-proxy-ids My_Capsule_ID \ --ssl-client-cert-id My_SSL_Client_Certificate_ID \ --ssl-client-key-id My_SSL_Client_Key_ID \ --subpaths path/to/repo/1/,path/to/repo/2/ \ --verify-ssl 1
Check if the newly created alternate content source is listed:
# hammer alternate-content-source list
Refresh the alternate content source:
# hammer alternate-content-source refresh --id My_Alternate_Content_Source_ID
Add the Capsules to which the alternate content source is to be synced:
# hammer alternate-content-source update \ --id My_Alternate_Content_Source_ID \ --smart-proxy-ids My_Capsule_ID
Refresh the alternate content sources:
# hammer alternate-content-source refresh --id My_Alternate_Content_Source_ID