Create a sync plan, enable software repositories, create products, and ensure that the products are current in the library.
Outcomes
Enable and synchronize available repositories.
Set the default download policy to on_demand.
Create a sync plan to provide control over the frequency of content synchronizations.
As the student user on the workstation machine, use the lab command to prepare your system for this exercise.
This command ensures that the satellite host is reachable on the network and prepares it for this exercise.
[student@workstation ~]$ lab start lifecycles-sync
Instructions
To reduce exercise wait time, the initial Satellite classroom environment contains the preconfigured Operations and Finance organizations, each with an imported subscription manifest and presynchronized RHEL 9 BaseOS and AppStream repositories.
In this exercise, you practice synchronization by adding a client dnf repository to the Operations organization.
Log in to the Satellite Server web UI, https://satellite.lab.example.com, as admin with redhat as the password.
In the upper-left corner of the web page, set the organization to Operations.
Enable synchronization of the desired repository from the local CDN.
A correct CDN URL value is necessary for successful course operation. If the URL is incorrect, then return to → and click . On the dialog, click the tab and update the field to http://cdn.lab.example.com.
Click → to access the page.
Enter RHEL 9 x86_64 in the field, and then click .
Verify that the Red Hat Enterprise Linux 9 for x86_64 - AppStream (RPMs) and the Red Hat Enterprise Linux 9 for x86_64 - BaseOS (RPMs) repositories are already listed in the Enabled Repositories list on the right side of the web page.
The prebuilt classroom environment includes these two RHEL 9 repositories.
In the list, click the greater-than symbol (>) to the left of the Red Hat Satellite Client 6 for RHEL 9 x86_64 (RPMs) repository to expand the version information.
Click the plus sign (+) to the right of to enable that repository and version.
Verify that the client repository is listed in the list and that the repository is for RHEL 9.
Verify that the default download policy for repositories is set to on_demand so that Satellite Server downloads only repository metadata during synchronization.
Click → and then click the tab.
In the column, locate the entry and ensure that is set to on_demand.
Use the Search field to filter the list, if needed.
Use the Satellite Server web UI to verify that the Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9 and Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9 repositories are already synced.
Click → to open the page.
Click the product to view the product's repositories. The tab is displayed.
Verify that the Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9 and Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 9 repositories each state Success in the Sync Status column.
If either repository does not have a Success status, then click the checkbox to the left of the repository name, and then click to begin the repository synchronization.
The synchronization task runs for several minutes, but you can continue this exercise without waiting for the synchronization to complete.
Use the hammer command to synchronize the Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs repository.
On workstation, log in to the satellite system as the student user and switch to the root user.
[student@workstation ~]$ssh student@satellite[student@satellite ~]$sudo -i[sudo] password for student:student[root@satellite ~]#
List the enabled repositories.
Note the numeric identifier of the Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs repository in the command output.
[root@satellite ~]#hammer repository list \ --organization Operations --fields Id,Name---|--------------------------------------------------------- ID | NAME ---|--------------------------------------------------------- 22 | Red Hat Enterprise Linux 8 for x86_64 - AppStream RPMs 8 23 | Red Hat Enterprise Linux 8 for x86_64 - BaseOS RPMs 8 25 | Red Hat Enterprise Linux 9 for x86_64 - AppStream RPMs 9 24 | Red Hat Enterprise Linux 9 for x86_64 - BaseOS RPMs 930 | Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs---|---------------------------------------------------------
Synchronize the Red Hat Satellite Client 6 for RHEL 9 x86_64 RPMs repository by using the repository ID from your previous query.
[root@satellite ~]# hammer repository synchronize --id 30
[.......................................................................] [100%]
Added Rpms: 10, Errata: 1
Total steps: 30/30
--------------------------------
Associating Content: 12/12
Downloading Artifacts: 0/0
Downloading Metadata Files: 6/6
Parsed Advisories: 1/1
Parsed Comps: 1/1
Parsed Packages: 10/10
Un-Associating Content: 0/0Return to the workstation system as the student user.
[root@satellite ~]#exitlogout [student@satellite ~]$exitlogout Connection to satellite closed. [student@workstation ~]$
Use the Satellite Server web UI to create a sync plan that checks and updates the content every day at a scheduled time.
Assign Red Hat Enterprise Linux for x86_64 product to the sync plan.
In the upper-left corner of the web page, verify that the Operations organization context is set.
Click → , and then click .
Enter Red Hat Products - Operations in the field.
Select in the field.
Enter the current time in the field to synchronize at that time every day.
For example, enter 15 18 * * * in the field to synchronize at 18:15 every day.
The time values for the field use the 24-hour clock, with the minutes value first, followed by the hour, day, month, and day of the week values.
Select the current date for the field.
Click to create the sync plan. The tab is displayed.
Click the tab and then click the tab.
Select the checkbox next to Red Hat Enterprise Linux for x86_64, and then click .
Click → to verify the recurring task that you created.
Click the ID value in the task's row to view the task's details. Note that tasks can be disabled without being deleted. Verify that the task remains enabled.
Click → and then click the Red Hat Enterprise Linux for x86_64 product.
Click the tab to verify that previous synchronization tasks successfully completed on the product's repositories.
Click the tab to view the product's sync status. Verify that the field displays a future time for the next occurrence.