Chapter 2. Managing repositories
2.1. Available repositories
Certified Cloud and Service Provider (CCSP) partners control what repositories and packages are delivered through their service. For the most current information regarding what repositories are available for the various operating system versions but are not yet added in your RHUI, run the following command on the RHUA:
rhui-manager --noninteractive repo unused --by_repo_id
# rhui-manager --noninteractive repo unused --by_repo_id
2.2. Adding a new Red Hat content repository
Your CCSP account enables you to access selected Red Hat repositories and make them available in your Red Hat Update Infrastructure environment.
Procedure
Navigate to the Red Hat Update Infrastructure Management Tool home screen:
rhui-manager
[root@rhua ~]# rhui-manager
Copy to Clipboard Copied! -
Press
r
to select manage repositories. -
From the Repository Management screen, press
a
to select add a new Red Hat content repository. Wait for the Red Hat Update Infrastructure Management Tool to determine the entitled repositories. This might take several minutes:
rhui (repo) => a Loading latest entitled products from Red Hat... ... listings loaded Determining undeployed products... ... product list calculated
rhui (repo) => a Loading latest entitled products from Red Hat... ... listings loaded Determining undeployed products... ... product list calculated
Copy to Clipboard Copied! The Red Hat Update Infrastructure Management Tool prompts for a selection method:
Import Repositories: 1 - All in Certificate 2 - By Product 3 - By Repository Enter value (1-3) or 'b' to abort:
Import Repositories: 1 - All in Certificate 2 - By Product 3 - By Repository Enter value (1-3) or 'b' to abort:
Copy to Clipboard Copied! -
To add several repositories bundled together as a product—usually all the minor versions of it in one step—press
2
to select the By Product method. Alternatively, you can add particular repositories by using the By Repository method. Select which repositories to add by typing the number of the repository at the prompt. You can also choose the range of repositories, for instance, by entering
1
-5
.Enter value (1-620) to toggle selection, 'c' to confirm selections, or '?' for more commands:
Enter value (1-620) to toggle selection, 'c' to confirm selections, or '?' for more commands:
Copy to Clipboard Copied! - Continue until all repositories you want to add are checked.
Press
c
when you are finished selecting the repositories. The Red Hat Update Infrastructure Management Tool displays the repositories for deployment and prompts for confirmation:The following products will be deployed: Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI Proceed? (y/n)
The following products will be deployed: Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI Proceed? (y/n)
Copy to Clipboard Copied! Press
y
to proceed. A message indicates each successful deployment:Importing Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.4)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.3)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.2)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.1)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.0)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8)... Importing Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.4)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.3)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.2)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.1)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.0)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8)... Content will not be downloaded to the newly imported repositories until the next sync is run.
Importing Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.4)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.3)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.2)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.1)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.0)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8)... Importing Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.4)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.3)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.2)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.1)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8.0)... Importing product repository Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (RPMs) from RHUI (8)... Content will not be downloaded to the newly imported repositories until the next sync is run.
Copy to Clipboard Copied!
Verification
-
From the Repository Management screen, press
l
to check that the correct repositories have been installed.
2.3. Listing repositories currently managed by RHUI 4
A repository contains downloadable software for a Linux distribution. You use yum
to search for, install, or only download RPMs from the repository.
Procedure
Navigate to the Red Hat Update Infrastructure Management Tool home screen:
rhui-manager
[root@rhua ~]# rhui-manager
Copy to Clipboard Copied! -
Press
r
to select manage repositories. From the Repository Management screen, press
l
to select list repositories currently managed by the RHUI:... Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.0) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.1) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.2) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.3) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.4) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.0) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.1) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.2) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.3) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.4) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.0) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.1) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.2) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.3) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.4) ...
... Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.0) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.1) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.2) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.3) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.4) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.0) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.1) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.2) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.3) Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.4) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.0) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.1) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.2) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.3) Red Hat Enterprise Linux 8 for ARM 64 - BaseOS (Debug RPMs) from RHUI (8.4) ...
Copy to Clipboard Copied!
2.4. Displaying detailed information on a repository
You can use the Repository Management screen to display information about a particular repository.
Procedure
Navigate to the Red Hat Update Infrastructure Management Tool home screen:
rhui-manager
[root@rhua ~]# rhui-manager
Copy to Clipboard Copied! -
Press
r
to select manage repositories. From the Repository Management screen, press
i
:Enter value (1-1631) to toggle selection, 'c' to confirm selections, or '?' for more commands:
Enter value (1-1631) to toggle selection, 'c' to confirm selections, or '?' for more commands:
Copy to Clipboard Copied! - Select the repository by entering the value beside the repository name. Enter one repository selection at a time before confirming your product selection.
Press
c
to confirm:Name: Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Debug RPMs) from RHUI (8.4) ID: rhel-8-for-aarch64-appstream-debug-rhui-rpms-8.4 Type: Red Hat Version: 0 Relative Path: content/dist/rhel8/rhui/8.4/aarch64/appstream/debug GPG Check: Yes Custom GPG Keys: (None) Red Hat GPG Key: Yes Content Unit Count: Last Sync: 2021-11-15 15:56:06 Next Sync: 2021-11-15 22:00:00 Name: Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.4) ID: rhel-8-for-aarch64-appstream-rhui-rpms-8.4 Type: Red Hat Version: 0 Relative Path: content/dist/rhel8/rhui/8.4/aarch64/appstream/os GPG Check: Yes Custom GPG Keys: (None) Red Hat GPG Key: Yes Content Unit Count: Last Sync: 2021-11-15 19:50:20 Next Sync: 2021-11-16 01:55:00 Name: Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.4) ID: rhel-8-for-aarch64-appstream-source-rhui-rpms-8.4 Type: Red Hat Version: 0 Relative Path: content/dist/rhel8/rhui/8.4/aarch64/appstream/source/SRPMS GPG Check: Yes Custom GPG Keys: (None) Red Hat GPG Key: Yes Content Unit Count: Last Sync: 2021-11-15 15:56:51 Next Sync: 2021-11-15 22:00:00
Name: Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Debug RPMs) from RHUI (8.4) ID: rhel-8-for-aarch64-appstream-debug-rhui-rpms-8.4 Type: Red Hat Version: 0 Relative Path: content/dist/rhel8/rhui/8.4/aarch64/appstream/debug GPG Check: Yes Custom GPG Keys: (None) Red Hat GPG Key: Yes Content Unit Count: Last Sync: 2021-11-15 15:56:06 Next Sync: 2021-11-15 22:00:00 Name: Red Hat Enterprise Linux 8 for ARM 64 - AppStream (RPMs) from RHUI (8.4) ID: rhel-8-for-aarch64-appstream-rhui-rpms-8.4 Type: Red Hat Version: 0 Relative Path: content/dist/rhel8/rhui/8.4/aarch64/appstream/os GPG Check: Yes Custom GPG Keys: (None) Red Hat GPG Key: Yes Content Unit Count: Last Sync: 2021-11-15 19:50:20 Next Sync: 2021-11-16 01:55:00 Name: Red Hat Enterprise Linux 8 for ARM 64 - AppStream (Source RPMs) from RHUI (8.4) ID: rhel-8-for-aarch64-appstream-source-rhui-rpms-8.4 Type: Red Hat Version: 0 Relative Path: content/dist/rhel8/rhui/8.4/aarch64/appstream/source/SRPMS GPG Check: Yes Custom GPG Keys: (None) Red Hat GPG Key: Yes Content Unit Count: Last Sync: 2021-11-15 15:56:51 Next Sync: 2021-11-15 22:00:00
Copy to Clipboard Copied!
Verification
- A similar output displays for your selections.
2.5. Generating a repository status file
You can generate a machine-readable JSON file that displays the status of all RHUI repositories as well as provides some additional information. This is useful, for example, if you want to passively monitor the status of the repositories.
2.5.1. Generating a status file for RHUI repositories
You can use the rhui-manager
command to obtain the status of each repository in a machine-readable format.
Procedure
On the RHUA node, run the following command.
rhui-manager --non-interactive status --repo_json <output file>
rhui-manager --non-interactive status --repo_json <output file>
Copy to Clipboard Copied! A JSON file is generated containing a list of dictionaries for all custom and Red Hat repositories. For a list of available dictionaries, see Section 2.5.2, “List of dictionary keys in the repository status JSON file”.
2.5.2. List of dictionary keys in the repository status JSON file
A machine-readable JSON file is created when you run the command to get the status of each RHUI repository. The JSON file contains a list of dictionaries with one dictionary for each repository.
List of dictionary keys for custom repositories
Key | Description |
---|---|
base_path | The path of the repository. |
description | The name of the repository. |
group |
The group the repository belongs to. It is always set to the string, |
id | The repository ID. |
name | The name of the repository. It is the same as the repository ID. |
List of dictionary keys for Red Hat repositories
Key | Description |
---|---|
base_path | The path of the repository. |
description | The name of the repository. |
group |
The group the repository belongs to. It is always set to the string, |
id | The repository ID. |
last_sync_date |
The date and time the repository was last synchronized. The value is |
last_sync_exception |
The exception raised if the repository failed to synchronize. The value is |
last_sync_result | The result of the synchronization task. The values are:
|
last_sync_traceback |
The traceback that was logged if the repository failed to synchronize. The value is |
metadata_available | A boolean value denoting whether metadata is available for the repository. |
name | The name of the repository. It is the same as the repository ID. |
next_sync_date |
The date and time of the next scheduled synchronization of the repository. If a synchronization task is currently running, the value is |
repo_published | A boolean value denoting whether this repository has been published in RHUI. Note that, by default, RHUI is configured to automatically publish repositories. |
2.6. Setting Up On-Demand Syncing of Repositories
RHUI allows you to minimize the amount of content downloaded to storage in advance by setting certain repositories to on_demand sync mode. This way, RHUI will only download and store content when it is requested by client machines, which can result in reduced storage usage and lower costs. However, the downside of this approach is that RHUI’s performance will depend on the connection speed to the Red Hat CDN network.
Repository Content Types
There are three types of repository content:
- Binary RPM repositories
- Source RPM repositories
- Debug RPM repositories
Synchronization Strategies
You can set each of these repository types to one of two synchronization policies:
- immediate
- on_demand
By default, all policies are set to immediate.
Setting the Sync Policy
By default, the /etc/rhui/rhui-tools.conf
file on the RHUA node contains the following lines in the [rhui]
section:
Sync policy can be immediate or on_demand
# Sync policy can be immediate or on_demand
default_sync_policy: immediate
The default_sync_policy
option applies to all three types of content repositories.
Although you can change the policy by editing this file, keep in mind that your changes will be lost when you rerun the installer for any reason. Therefore, configure the sync policies in the custom configuration file instead. The custom configuration file is located at /root/.rhui/rhui-tools-custom.conf
but does not exist by default. To use this file, create it and put the [rhui]
section there. Then you can add specific overrides to this section to customize the behavior for particular content types. The options available are:
-
rpm_sync_policy
-
source_sync_policy
-
debug_sync_policy
Examples
The most common usage of the on_demand policy is to set Binary RPMs to sync immediately while setting Source and Debug repositories to on_demand, as the general population of clients usually does not require these content types. You can configure this in several ways:
[rhui] default_sync_policy: on_demand rpm_sync_policy: immediate
[rhui]
default_sync_policy: on_demand
rpm_sync_policy: immediate
or
[rhui] default_sync_policy: immediate source_sync_policy: on_demand debug_sync_policy: on_demand
[rhui]
default_sync_policy: immediate
source_sync_policy: on_demand
debug_sync_policy: on_demand
or
[rhui] default_sync_policy: immediate rpm_sync_policy: immediate source_sync_policy: on_demand debug_sync_policy: on_demand
[rhui]
default_sync_policy: immediate
rpm_sync_policy: immediate
source_sync_policy: on_demand
debug_sync_policy: on_demand
All three configurations are valid; it is simply a matter of preference.
Applying the Policy
After updating the configuration file, the next repository synchronization will apply the new policy.
If you switch from on_demand to immediate, the next sync will begin downloading all content for the specified type.
If you switch from immediate to on_demand, the next sync will only download repository metadata. RHUI will then download content as requested by client machines.
Tips and Tricks
- Setting all repositories to on_demand right after installing RHUI can lead to faster deployment and quicker delivery for end-users, as only metadata needs to be initially synced.
-
Utilizing a "martyr client" strategy can be beneficial if you have a new installation and do not need to support older versions of RHEL clients. By using a client that mirrors end-user configurations and running
dnf update
, you can pre-download content to RHUI’s storage.
2.7. Adding a new Red Hat content repository using an input file
In Red Hat Update Infrastructure 4.2 and later, you can add custom repositories using a configured YAML input file. You can find an example template of the YAML file on the RHUA node in the /usr/share/rhui-tools/examples/repo_add_by_file.yaml
directory.
This functionality is only available in the command-line interface (CLI).
Prerequisites
- Ensure that you have root access to the RHUA node.
Procedure
On the RHUA node, create a YAML input file in the following format:
cat /root/example.yaml name: Example_YAML_File repo_ids: - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.1 - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.2 - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.4 - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.6
# cat /root/example.yaml name: Example_YAML_File repo_ids: - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.1 - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.2 - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.4 - rhel-8-for-x86_64-baseos-eus-rhui-rpms-8.6
Copy to Clipboard Copied! Add the repositories listed in the input file using the
rhui-manager
utility:rhui-manager repo add_by_file --file /root/example.yaml --sync_now
# rhui-manager repo add_by_file --file /root/example.yaml --sync_now The name of the repos being added: Example_YAML_File Loading latest entitled products from Red Hat... ... listings loaded Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.1) (Yum) Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.2) (Yum) Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.4) (Yum) Successfully added Red Hat Enterprise Linux 8 for x86_64 - BaseOS - Extended Update Support from RHUI (RPMs) (8.6) (Yum) ... successfully scheduled for the next available timeslot. ... successfully scheduled for the next available timeslot. ... successfully scheduled for the next available timeslot. ... successfully scheduled for the next available timeslot.
Copy to Clipboard Copied!
Verification
In the CLI, use the following command to list all the installed repositories and check whether the correct repositories have been installed:
rhui-manager repo list
# rhui-manager repo list
Copy to Clipboard Copied! -
In the RHUI Management Tool, on the Repository Management screen, press
l
to list all the installed repositories and check whether the correct repositories have been installed.
2.8. Creating a new custom repository (RPM content only)
You can create custom repositories that can be used to distribute updated client configuration packages or other non-Red Hat software to the RHUI clients. A protected repository for 64-bit RHUI servers (for example, client-rhui-x86_64
) will be the preferred vehicle for distributing new non-Red Hat packages, such as an updated client configuration package, to the RHUI clients.
Like Red Hat content repositories, all of which are protected, protected custom repositories that differ only in processor architecture (i386
versus AMD64
) are consolidated into a single entitlement within an entitlement certificate, using the $basearch
yum variable.
In the event of certificate problems, an unprotected repository for RHUI servers can be used as a fallback method for distributing updated RPMs to the RHUI clients.
Procedure
Navigate to the Red Hat Update Infrastructure Management Tool home screen:
rhui-manager
[root@rhua ~]# rhui-manager
Copy to Clipboard Copied! -
Press
r
to select manage repositories. -
From the Repository Management screen, press
c
to select create a new custom repository (RPM content only). Enter a unique ID for the repository. Only alphanumeric characters, _ (underscore), and - (hyphen) are permitted. You cannot use spaces in the unique ID. For example,
repo1
,repo_1
, andrepo-1
are valid entries.Unique ID for the custom repository (alphanumerics, _, and - only):
Unique ID for the custom repository (alphanumerics, _, and - only):
Copy to Clipboard Copied! Enter a display name for the repository. This name can contain spaces and other characters that could not be used in the ID. The name defaults to the ID.
Display name for the custom repository [repo_1]:
Display name for the custom repository [repo_1]:
Copy to Clipboard Copied! Specify the path that will host the repository. The path must be unique across all repositories hosted by RHUI. For example, if you specify the path at this step as
internal/rhel/9/repo_1
, then the repository will be located at:https://<yourLB>/pulp/content/protected/internal/rhel/9/repo_1
.Unique path at which the repository will be served [repo_1]:
Unique path at which the repository will be served [repo_1]:
Copy to Clipboard Copied! Choose whether to protect the new repository. If you answer no to this question, any client can access the repository. If you answer yes, only clients with an appropriate entitlement certificate can access the repository.
WarningAs the name implies, the content in an unprotected repository is available to any system that requests it, without any need for a client entitlement certificate. Be careful when using an unprotected repository to distribute any content, particularly content such as updated client configuration RPMs, which will then provide access to protected repositories.
Answer yes or no to the following questions as they appear:
Should the repository require clients to perform a GPG check and verify packages are signed by a GPG key? (y/n) Will the repository be used to host any Red Hat GPG signed content? (y/n) Will the repository be used to host any custom GPG signed content? (y/n) Enter the absolute path to the public key of the GPG key pair: Would you like to enter another public key? (y/n) Enter the absolute path to the public key of the GPG key pair: Would you like to enter another public key? (y/n)
Should the repository require clients to perform a GPG check and verify packages are signed by a GPG key? (y/n) Will the repository be used to host any Red Hat GPG signed content? (y/n) Will the repository be used to host any custom GPG signed content? (y/n) Enter the absolute path to the public key of the GPG key pair: Would you like to enter another public key? (y/n) Enter the absolute path to the public key of the GPG key pair: Would you like to enter another public key? (y/n)
Copy to Clipboard Copied! -
The details of the new repository displays. Press
y
at the prompt to confirm the information and create the repository.
Verification
-
From the Repository Management screen, press
l
to check that the correct repositories have been installed.
2.9. Deleting a repository from RHUI 4
When the Red Hat Update Infrastructure Management Tool deletes a Red Hat repository, it deletes the repository from the RHUA and all applicable CDS nodes.
Procedure
Navigate to the Red Hat Update Infrastructure Management Tool home screen:
rhui-manager
[root@rhua ~]# rhui-manager
Copy to Clipboard Copied! -
Press
r
to select manage repositories. -
From the Repository Management screen, press
d
at the prompt to delete a Red Hat repository. A list of all repositories currently being managed by RHUI displays. -
Select which repositories to delete by typing the number of the repository at the prompt. Typing the number of a repository places a checkmark next to the name of that repository. You can also choose the range of repositories, for instance, by entering
1
-5
. - Continue until all repositories you want to delete are checked.
Press
c
at the prompt to confirm.NoteAfter you delete the repositories, the client configuration RPMs that refer to the deleted repositories will not be available to be used by
yum
.
2.10. Uploading content to a custom repository (RPM content only)
You can upload multiple packages and upload to more than one repository at a time. Packages are uploaded to the RHUA immediately but are not available on the CDS node until the next time the CDS node synchronizes.
Procedure
Navigate to the Red Hat Update Infrastructure Management Tool home screen:
rhui-manager
[root@rhua ~]# rhui-manager
Copy to Clipboard Copied! -
Press
r
to select manage repositories. From the Repository Management screen, press
u
:Select the repositories to upload the package into: - 1: test
Select the repositories to upload the package into: - 1: test
Copy to Clipboard Copied! - Enter the value (1-1) to toggle the selection.
-
Press
c
to confirm your selection. Enter the location of the packages to upload. If the location is an RPM, the file will be uploaded. If the location is a directory, all RPMs in that directory will be uploaded:
/root/bear-4.1-1.noarch.rpm The following RPMs will be uploaded: bear-4.1-1.noarch.rpm
/root/bear-4.1-1.noarch.rpm The following RPMs will be uploaded: bear-4.1-1.noarch.rpm
Copy to Clipboard Copied! Press
y
to proceed orn
to cancel:Copying RPMs to a temporary directory: /tmp/rhui.rpmupload.jsqdub22.tmp .. 1 RPMs copied. Creating repository metadata for 1 packages ... .. repository metadata created for 1 packages. The packages upload task for repo: client-config-rhel-8-x86_64 has been queued: /pulp/api/v3/tasks/01937826-8654-77c1-84f7-e9e07c7a7aeb/ You can inspect its progress via (S)ync screen/(RR) menu option in rhui-manager TUI.
Copying RPMs to a temporary directory: /tmp/rhui.rpmupload.jsqdub22.tmp .. 1 RPMs copied. Creating repository metadata for 1 packages ... .. repository metadata created for 1 packages. The packages upload task for repo: client-config-rhel-8-x86_64 has been queued: /pulp/api/v3/tasks/01937826-8654-77c1-84f7-e9e07c7a7aeb/ You can inspect its progress via (S)ync screen/(RR) menu option in rhui-manager TUI.
Copy to Clipboard Copied!
2.11. Uploading content from a remote web site (RPM content only)
You can upload packages that are stored on a remote server without having to manually download them first. The packages must be accessible by HTTP, HTTPS, or FTP.
Procedure
Navigate to the Red Hat Update Infrastructure Management Tool home screen:
rhui-manager
[root@rhua ~]# rhui-manager
Copy to Clipboard Copied! -
Press
r
to select manage repositories. From the Repository Management screen, press
ur
:Select the repositories to upload the package into: - 1: test
Select the repositories to upload the package into: - 1: test
Copy to Clipboard Copied! - Enter the value (1-1) to toggle the selection.
Press
c
to confirm your selection:# Content retrieved from non-Red Hat arbitrary places can contain # unsupported or malicious software. Proceed at your own risk. # #
### WARNING ### WARNING ### WARNING ### WARNING ### WARNING ### WARNING ### # # # Content retrieved from non-Red Hat arbitrary places can contain # # unsupported or malicious software. Proceed at your own risk. # # # ###########################################################################
Copy to Clipboard Copied! Enter the remote URL of the packages to upload. If the location is an RPM, the file will be uploaded. If the location is a web page, all RPMs linked off that page will be uploaded:
https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/bear-4.1-1.noarch.rpm Retrieving https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/bear-4.1-1.noarch.rpm The following RPMs will be uploaded: bear-4.1-1.noarch.rpm
https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/bear-4.1-1.noarch.rpm Retrieving https://repos.fedorapeople.org/pulp/pulp/demo_repos/zoo/bear-4.1-1.noarch.rpm The following RPMs will be uploaded: bear-4.1-1.noarch.rpm
Copy to Clipboard Copied! Press
y
to proceed orn
to cancel:Copying RPMs to a temporary directory: /tmp/rhui.rpmupload.dwux8rq7.tmp .. 1 RPMs copied. Creating repository metadata for 1 packages ... .. repository metadata created for 1 packages. The packages upload task for repo: test has been queued: /pulp/api/v3/tasks/0193770c-6523-7363-ae5e-8c6429728b4f/ You can inspect its progress via (S)ync screen/(RR) menu option in rhui-manager TUI.
Copying RPMs to a temporary directory: /tmp/rhui.rpmupload.dwux8rq7.tmp .. 1 RPMs copied. Creating repository metadata for 1 packages ... .. repository metadata created for 1 packages. The packages upload task for repo: test has been queued: /pulp/api/v3/tasks/0193770c-6523-7363-ae5e-8c6429728b4f/ You can inspect its progress via (S)ync screen/(RR) menu option in rhui-manager TUI.
Copy to Clipboard Copied!
2.12. Importing package group metadata to a custom repository
To allow RHUI users to view and install package groups or language packs from a custom repository, you can import a comps.xml
or a comps.xml.gz
file to the custom repository.
Red Hat repositories contain these files provided by Red Hat. You can not override them. You can only upload these files to your custom repositories.
This functionality is only available in the command-line interface.
Prerequisites
-
Ensure that you have a valid
comps.xml
orcomps.xml.gz
file relevant to the custom repository. - Ensure you have root access to the RHUA node.
Procedure
On the RHUA node, import data from a
comps
file to your custom repository using therhui-manager
utility:rhui-manager repo add_comps --repo_id Example_Custom_Repo --comps /root/Example-Comps.xml
# rhui-manager repo add_comps --repo_id Example_Custom_Repo --comps /root/Example-Comps.xml
Copy to Clipboard Copied!
Verification
On a client system that uses the custom repository:
Refresh the repository data:
yum clean metadata
# yum clean metadata
Copy to Clipboard Copied! List the repository data and verify that the
comps
file has been updated:yum grouplist
# yum grouplist
Copy to Clipboard Copied!
2.13. Removing content from a custom repository (Custom RPM content only)
You can remove packages from custom repositories using RHUI’s Text User Interface (TUI).
For the command-line interface (CLI) command, see Section 10.1, “Using RHUI 4 CLI options”.
Procedure
Navigate to the Red Hat Update Infrastructure Management Tool home screen:
rhui-manager
[root@rhua ~]# rhui-manager
Copy to Clipboard Copied! -
Enter
r
to select manage repositories. On the Repository Management screen, enter
r
to select packages to remove from a repository (Custom RPM content only):-= Repository Management =- l list repositories currently managed by the RHUI i display detailed information on a repository a add a new Red Hat content repository ac add a new Red Hat container c create a new custom repository (RPM content only) d delete a repository from the RHUI u upload content to a custom repository (RPM content only) ur upload content from a remote web site (RPM content only) p list packages in a repository (RPM content only) r select packages to remove from a repository (Custom RPM content only)
-= Repository Management =- l list repositories currently managed by the RHUI i display detailed information on a repository a add a new Red Hat content repository ac add a new Red Hat container c create a new custom repository (RPM content only) d delete a repository from the RHUI u upload content to a custom repository (RPM content only) ur upload content from a remote web site (RPM content only) p list packages in a repository (RPM content only) r select packages to remove from a repository (Custom RPM content only)
Copy to Clipboard Copied! Enter the value to select the repository:
Choose a repository to delete packages from: 1 - Test-RPM-1 2 - Test-RPM-2
Choose a repository to delete packages from: 1 - Test-RPM-1 2 - Test-RPM-2
Copy to Clipboard Copied! Enter the value to select the packages to delete.
Select the packages to remove: - 1: example-package-1.noarch.rpm - 2: example-package-2.noarch.rpm
Select the packages to remove: - 1: example-package-1.noarch.rpm - 2: example-package-2.noarch.rpm
Copy to Clipboard Copied! Enter
c
to confirm selection.The following packages will be removed: example-package-1.noarch.rpm
The following packages will be removed: example-package-1.noarch.rpm
Copy to Clipboard Copied! Enter
y
to proceed orn
to cancel:Removed example-package-1.noarch.rpm
Removed example-package-1.noarch.rpm
Copy to Clipboard Copied!
2.14. Listing the packages in a repository (RPM content only)
When listing repositories within the Red Hat Update Infrastructure Management Tool, only repositories that contain fewer than 100 packages display their contents. Results with more than 100 packages only display a package count.
Procedure
Navigate to the Red Hat Update Infrastructure Management Tool home screen:
rhui-manager
[root@rhua ~]# rhui-manager
Copy to Clipboard Copied! -
Press
r
to select manage repositories. -
From the Repository Management screen, press
p
. Select the number of the repository you want to view. The Red Hat Update Infrastructure Management Tool asks if you want to filter the results. Leave the line blank to see the results without a filter.
Enter value (1-1631) or 'b' to abort: 1 Enter the first few characters (case insensitive) of an RPM to filter the results (blank line for no filter): Only filtered results that contain less than 100 packages will have their contents displayed. Results with more than 100 packages will display a package count only. Packages: bear-4.1-1.noarch.rpm
Enter value (1-1631) or 'b' to abort: 1 Enter the first few characters (case insensitive) of an RPM to filter the results (blank line for no filter): Only filtered results that contain less than 100 packages will have their contents displayed. Results with more than 100 packages will display a package count only. Packages: bear-4.1-1.noarch.rpm
Copy to Clipboard Copied!
Verification
One of three types of messages displays:
Packages: bear-4.1-1.noarch.rpm
Packages: bear-4.1-1.noarch.rpm
Copy to Clipboard Copied! Package Count: 8001
Package Count: 8001
Copy to Clipboard Copied! No packages in the repository.
No packages in the repository.
Copy to Clipboard Copied!
2.15. Limiting the number of repository versions
In Pulp 3, which is used in Red Hat Update Infrastructure 4, repositories are versioned. When a repository is updated in Red Hat CDN and synchronized in Red Hat Update Infrastructure, Pulp creates a new version.
By default, repositories added using Red Hat Update Infrastructure version 4.6 and earlier were configured to retain all repository versions. This resulted in data accumulating in the database indefinitely, taking up disk space and, in the worst case, the inability to delete a repository. With version 4.7 and newer, repositories are added with a version limit of 5. This means only the latest five versions are kept at all times, and any older version is automatically deleted. However, you may want to set the version limit for existing repositories added earlier and have any older versions deleted. You can do this for all your repositories at once or process one repository at a time.
The command to do this is as follows:
rhui-manager repo set_retain_versions [--repo_id <ID> or --all] --versions <NUMBER>
[root@rhua ~]# rhui-manager repo set_retain_versions [--repo_id <ID> or --all] --versions <NUMBER>
Copy to Clipboard Copied! For example, to limit the number of versions for all repositories to 5, one would run:
rhui-manager repo set_retain_versions --all --versions 5
[root@rhua ~]# rhui-manager repo set_retain_versions --all --versions 5
Copy to Clipboard Copied!
Depending on the number of repositories and existing repository versions, It can take more than an hour for all the necessary tasks to be scheduled, and up to a few days for the versions older than the limit to be deleted. You can watch the progress in the rhui-manager text user interface, on the synchronization screen, under running tasks.
2.16. Removing orphaned artifacts
RPM packages, repodata files, and other relates files are kept on the disk even if they are no longer part of a repository; for example, after a repository is deleted and the files do not belong to another repository, or when an update is made available and a new set of repodata files is synchronized.
To remove this obsolete content, one can run the following command:
rhui-manager repo orphan_cleanup
[root@rhua ~]# rhui-manager repo orphan_cleanup
Copy to Clipboard Copied!
Depending on the number of files, it can take up to several days for this task to complete. You can watch the progress in the rhui-manager text user interface, on the synchronization screen, under running tasks.