Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 4. Synchronizing content to Satellite
After you define repositories, synchronize them to download content into Satellite. Configure network access, HTTP proxies, and recurring sync plans so content stays current.
4.1. Configuring network for content synchronization Link kopierenLink in die Zwischenablage kopiert!
Content synchronization requires outbound access to upstream URLs. Adjust SELinux, HTTP proxies, and per-product or per-repository HTTP proxy policies if your environment restricts or inspects that traffic.
4.1.1. Configuring SELinux to permit content synchronization on custom ports Link kopierenLink in die Zwischenablage kopiert!
SELinux permits access of Satellite for content synchronization only on specific ports. By default, connecting to web servers running on the following ports is permitted: 80, 81, 443, 488, 8008, 8009, 8443, and 9000.
Procedure
On Satellite, to verify the ports that are permitted by SELinux for content synchronization, enter a command as follows:
# semanage port -l | grep ^http_port_t http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000To configure SELinux to permit a port for content synchronization, for example 10011, enter a command as follows:
# semanage port -a -t http_port_t -p tcp 10011
4.1.2. Adding an HTTP proxy by using Satellite web UI Link kopierenLink in die Zwischenablage kopiert!
You can add HTTP proxies to Satellite by using the Satellite web UI. You can then specify which HTTP proxy to use for products, repositories, and supported compute resources.
Prerequisites
Your HTTP proxy must allow access to the following hosts:
Expand Host name Port Protocol subscription.rhsm.redhat.com
443
HTTPS
cdn.redhat.com
443
HTTPS
cert.console.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
api.access.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
cert-api.access.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
console.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
connect.cloud.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
*.akamaiedge.net (if using Red Hat Lightspeed in Satellite)
443
HTTPS
-
If Satellite Server uses an HTTP proxy to communicate with
subscription.rhsm.redhat.comandcdn.redhat.com, then your HTTP proxy must not perform SSL inspection on these communications.
Procedure
- In the Satellite web UI, navigate to Infrastructure > HTTP Proxies.
- Select New HTTP Proxy.
- In the Name field, enter a name for the HTTP proxy.
- In the URL field, enter the URL for the HTTP proxy, including the port number.
- If your HTTP proxy requires authentication, enter a Username and Password.
- In the Cacert field, enter the SSL CA certificate if your HTTP proxy requires authentication.
- Optional: In the Test URL field, enter a URL, then click Test Connection to ensure that Satellite Server can connect to the URL through your HTTP proxy.
- Optional: Select the Default content HTTP proxy option to set your HTTP proxy as default to synchronize content.
- Click the Locations tab and add a location.
- Click the Organization tab and add an organization.
- Click Submit.
Additional resources
4.1.3. Adding an HTTP proxy by using Hammer CLI Link kopierenLink in die Zwischenablage kopiert!
You can add HTTP proxies to Satellite by using Hammer CLI. You can then specify which HTTP proxy to use for products, repositories, and supported compute resources.
Prerequisites
Your HTTP proxy must allow access to the following hosts:
Expand Host name Port Protocol subscription.rhsm.redhat.com
443
HTTPS
cdn.redhat.com
443
HTTPS
cert.console.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
api.access.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
cert-api.access.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
console.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
connect.cloud.redhat.com (if using Red Hat Lightspeed)
443
HTTPS
*.akamaiedge.net (if using Red Hat Lightspeed in Satellite)
443
HTTPS
-
If Satellite Server uses an HTTP proxy to communicate with
subscription.rhsm.redhat.comandcdn.redhat.com, then your HTTP proxy must not perform SSL inspection on these communications.
Procedure
Add your HTTP proxy to Satellite:
$ hammer http-proxy create \ --name My_HTTP_Proxy \ --url http-proxy.example.com:8080Optional: To set the HTTP proxy as default for content synchronization, add the
--content-default-http-proxy trueoption.If your HTTP proxy requires authentication, add the
--username My_User_Nameand--password My_Passwordoptions.
Additional resources
4.1.4. Changing the HTTP proxy policy for a product Link kopierenLink in die Zwischenablage kopiert!
For granular control over network traffic, you can set an HTTP proxy policy for each product. A product’s HTTP proxy policy applies to all repositories in the product, unless you set a different policy for individual repositories.
To set an HTTP proxy policy for individual repositories, see Section 4.1.5, “Changing the HTTP proxy policy for a repository by using Satellite web UI”.
Procedure
- In the Satellite web UI, navigate to Content > Products and select the products that you want to change.
- From the Select Action list, select Manage HTTP Proxy.
Select an HTTP Proxy Policy from the list:
- Global Default: Use the global default proxy setting.
- No HTTP Proxy: Do not use an HTTP proxy, even if a global default proxy is configured.
- Use specific HTTP Proxy: Select an HTTP Proxy from the list. You must add HTTP proxies to Satellite before you can select a proxy from this list. For more information, see Section 4.1.2, “Adding an HTTP proxy by using Satellite web UI”.
- Click Update.
4.1.5. Changing the HTTP proxy policy for a repository by using Satellite web UI Link kopierenLink in die Zwischenablage kopiert!
You can set an HTTP proxy policy to synchronize repositories to Satellite Server. Use an HTTP proxy for repository synchronization if your network restricts access to the internet.
To set the same HTTP proxy policy for all repositories in a product, see Section 4.1.4, “Changing the HTTP proxy policy for a product”.
Procedure
- In the Satellite web UI, navigate to Content > Products and click the name of the product that contains the repository.
- In the Repositories tab, click the name of the repository.
- Locate the HTTP Proxy field and click the edit icon.
Select an HTTP Proxy Policy from the list:
- Global Default: Use the global default HTTP proxy setting.
- No HTTP Proxy: Do not use an HTTP proxy, even if a global default HTTP proxy is configured.
- Use specific HTTP Proxy: Select an HTTP Proxy from the list. You must add HTTP proxies to Satellite before you can select a proxy from this list. For more information, see Section 4.1.2, “Adding an HTTP proxy by using Satellite web UI”.
- Click Save.
4.1.6. Changing the HTTP proxy policy for a repository by using Hammer CLI Link kopierenLink in die Zwischenablage kopiert!
You can set an HTTP proxy policy to synchronize repositories to Satellite Server. Use an HTTP proxy for repository synchronization if your network restricts access to the internet.
To set the same HTTP proxy policy for all repositories in a product, see Section 4.1.4, “Changing the HTTP proxy policy for a product”.
Procedure
Specify the HTTP proxy policy you want to use:
$ hammer repository update \ --http-proxy-policy My_HTTP_Proxy_Policy \ --id My_Repository_IDSpecify one of the following options for
--http-proxy-policy:-
none: Do not use an HTTP proxy, even if a global default HTTP proxy is configured. -
global_default_http_proxy: Use the global default HTTP proxy setting. -
use_selected_http_proxy: Specify an HTTP proxy using either--http-proxy My_HTTP_Proxy_Nameor--http-proxy-id My_HTTP_Proxy_ID. To add a new HTTP proxy to Satellite, see Section 4.1.3, “Adding an HTTP proxy by using Hammer CLI”.
-
4.2. Synchronizing repositories on demand Link kopierenLink in die Zwischenablage kopiert!
You must synchronize repositories to download content into Satellite. You can use on-demand synchronization for an initial synchronization of repositories or to synchronize repositories manually as you need.
The synchronization duration depends on the size of each repository and the speed of your network connection. The following table provides estimates of how long it would take to synchronize content, depending on the available internet bandwidth:
| Single Package (10Mb) | Minor Release (750Mb) | Major Release (6Gb) | |
|---|---|---|---|
| 256 Kbps | 5 Mins 27 Secs | 6 Hrs 49 Mins 36 Secs | 2 Days 7 Hrs 55 Mins |
| 512 Kbps | 2 Mins 43.84 Secs | 3 Hrs 24 Mins 48 Secs | 1 Day 3 Hrs 57 Mins |
| T1 (1.5 Mbps) | 54.33 Secs | 1 Hr 7 Mins 54.78 Secs | 9 Hrs 16 Mins 20.57 Secs |
| 10 Mbps | 8.39 Secs | 10 Mins 29.15 Secs | 1 Hr 25 Mins 53.96 Secs |
| 100 Mbps | 0.84 Secs | 1 Min 2.91 Secs | 8 Mins 35.4 Secs |
| 1000 Mbps | 0.08 Secs | 6.29 Secs | 51.54 Secs |
Schedule product synchronization by creating a sync plan to ensure updates on a regular basis.
Additional resources
4.2.1. Synchronizing repositories by using Satellite web UI Link kopierenLink in die Zwischenablage kopiert!
You can synchronize repositories one-time by using Satellite web UI.
Procedure
- In the Satellite web UI, navigate to Content > Products.
- Select the product that contains the repositories that you want to synchronize.
- Select the repositories that you want to synchronize and click Sync Now.
Verification
- In the Satellite web UI, navigate to Content > Sync Status.
- Expand the corresponding product or repository tree.
- Verify that the synchronization is complete.
4.2.2. Synchronizing repositories by using Hammer CLI Link kopierenLink in die Zwischenablage kopiert!
You can synchronize repositories one-time by using Hammer CLI.
Procedure
Synchronize an entire product:
$ hammer product synchronize \ --name "My_Product" \ --organization "My_Organization"Synchronize an individual repository:
$ hammer repository synchronize \ --name "My_Repository" \ --organization "My_Organization" \ --product "My_Product"
4.2.3. Synchronizing all repositories in an organization Link kopierenLink in die Zwischenablage kopiert!
Use this procedure to synchronize all repositories within an organization.
Procedure
- Log in to your Satellite Server using SSH.
Run the following Bash script:
ORG="My_Organization" for i in $(hammer --no-headers --csv repository list --organization $ORG --fields Id) do hammer repository synchronize --id ${i} --organization $ORG --async done
4.3. Scheduling product synchronization Link kopierenLink in die Zwischenablage kopiert!
Sync plans run repository synchronization on a schedule. Assign a sync plan to one or more products so updates are fetched automatically.
4.3.1. Best practices for sync plans Link kopierenLink in die Zwischenablage kopiert!
Red Hat recommends following best practices for sync plans in Satellite.
- Add sync plans to products and regularly synchronize content to keep the load on Satellite low during synchronization. Synchronize content rather more often than less often. For example, setup a sync plan to synchronize content every day rather than only once a month.
- Automate the creation and update of sync plans by using a Hammer script or an Ansible Playbook.
- Distribute synchronization tasks over several hours to reduce the task load by creating multiple sync plans with the Custom Cron tool.
| Cron expression | Explanation |
|---|---|
|
| every day at 22:00 from Monday to Friday |
|
| at 03:30 every Saturday and Sunday |
|
| at 02:30 every day between the 8th and the 14th days of the month |
4.3.2. Creating a sync plan by using Satellite web UI Link kopierenLink in die Zwischenablage kopiert!
A sync plan checks and updates the content at a scheduled date and time. In Satellite, you can create a sync plan and assign products to the plan.
Procedure
- In the Satellite web UI, navigate to Content > Sync Plans.
- Click New Sync Plan.
- In the Name field, enter a name for the plan.
- Optional: In the Description field, enter a description of the plan.
- From the Interval list, select the interval at which you want the plan to run.
- From the Start Date and Start Time lists, select when to start running the sync plan.
- Click Save.
4.3.3. Creating a sync plan by using Hammer CLI Link kopierenLink in die Zwischenablage kopiert!
A sync plan checks and updates the content at a scheduled date and time. In Satellite, you can create a sync plan and assign products to the plan.
Procedure
Create a sync plan:
$ hammer sync-plan create \ --description "My_Description" \ --enabled true \ --interval daily \ --name "My_Products" \ --organization "My_Organization" \ --sync-date "2023-01-01 01:00:00"
Verification
View the available sync plans for an organization to verify that the sync plan has been created:
$ hammer sync-plan list --organization "My_Organization"
4.3.4. Assigning a sync plan to a product by using Satellite web UI Link kopierenLink in die Zwischenablage kopiert!
A sync plan checks and updates the content at a scheduled date and time. In Satellite, you can assign a sync plan to products to update content regularly.
Procedure
- In the Satellite web UI, navigate to Content > Products.
- Select a product.
- On the Details tab, select a Sync Plan from the drop down menu.
4.3.5. Assigning a sync plan to a product by using Hammer CLI Link kopierenLink in die Zwischenablage kopiert!
A sync plan checks and updates the content at a scheduled date and time. In Satellite, you can assign a sync plan to products to update content regularly.
Procedure
Assign a sync plan to a product:
$ hammer product set-sync-plan \ --name "My_Product_Name" \ --organization "My_Organization" \ --sync-plan "My_Sync_Plan_Name"
4.3.6. Assigning a sync plan to multiple products Link kopierenLink in die Zwischenablage kopiert!
Use this procedure to assign a sync plan to the products in an organization that have been synchronized at least once and contain at least one repository.
Procedure
Run the following Bash script:
ORG="My_Organization" SYNC_PLAN="daily_sync_at_3_a.m" hammer sync-plan create --name $SYNC_PLAN --interval daily --sync-date "2023-04-5 03:00:00" --enabled true --organization $ORG for i in $(hammer --no-headers --csv --csv-separator="|" product list --organization $ORG --per-page 999 | grep -vi not_synced | awk -F'|' '$5 != "0" { print $1}') do hammer product set-sync-plan --sync-plan $SYNC_PLAN --organization $ORG --id $i doneAfter executing the script, view the products assigned to the sync plan:
$ hammer product list --organization $ORG --sync-plan $SYNC_PLAN
4.4. Refreshing content counts on Capsule Link kopierenLink in die Zwischenablage kopiert!
If your Capsules have synchronized content enabled, you can refresh the number of content counts available to the environments associated with the Capsule. This displays the content views inside those environments available to the Capsule. You can then expand the content view to view the repositories associated with that content view version.
Procedure
- In the Satellite web UI, navigate to Infrastructure > Capsules, and select the Capsule where you want to see the synchronized content.
- Select the Overview tab.
- Under Content Sync, toggle the Synchronize button to do an Optimized Sync or a Complete Sync to synchronize the Capsule which refreshes the content counts.
- Select the Content tab.
- Choose an Environment to view content views available to those Capsules by clicking >.
- Expand the content view by clicking > to view repositories available to the content view and the specific version for the environment.
- View the number of content counts under Packages specific to yum repositories.
- View the number of errata, package groups, files, container tags, container manifests, and Ansible collections under Additional content.
- Click the vertical ellipsis in the column to the right next to the environment and click Refresh counts to refresh the content counts synchronized on the Capsule under Packages.
4.5. Advanced synchronization options Link kopierenLink in die Zwischenablage kopiert!
You can use advanced synchronization to recover corrupted repositories on Satellite Server.
Advanced synchronization has the following options:
- Optimized Sync
- Synchronizes the repository bypassing packages that have no detected differences from the upstream packages.
- Complete Sync
- Synchronizes all packages regardless of detected changes. Use this option if specific packages could not be downloaded to the local repository even though they exist in the upstream repository.
- Verify Content Checksum
Synchronizes all packages and then verifies the checksum of all packages locally. If the checksum of an RPM differs from the upstream, it re-downloads the RPM. This option is relevant only for Yum content. Use this option if you have one of the following errors:
-
Specific packages cause a
404error while synchronizing withyum. -
Package does not match intended downloaderror, which means that specific packages are corrupted.
-
Specific packages cause a
Additional resources