Chapter 2. Managing repositories to build your customized operating systems


You can define your customized repositories with third-party content without having to manage their lifecycle. You can use your third-party content to build an image, and when you launch that image to the public cloud environment, you can use those repositories with the dnf tool.

2.1. Adding a custom repository

Define your repository to be able to add packages from this repository to your customized images.

Prerequisites

  • You have a RHEL subscription.
  • You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.
  • You have the URL link to your repository content.

Procedure

  1. Access Hybrid Cloud Console, click Services Red Hat Enterprise Linux Content Repositories.
  2. Click Add repositories. The Add custom repositories wizard opens.
  3. In the Name field provide a name for your custom repository.
  4. In the Repository type, select:

    Snapshotting
    Enables creating a daily snapshot of this repository. That enables you to create Image Blueprints with consistent repository content.
    Introspect only
    Disables snapshots for this repository.
    Upload

    Enables uploading packages to your custom repository. The file must have an rpm extension.

    Note, the Upload option is available only in the Preview mode.

  5. If you selected Snapshotting or Introspect only, in the URL field, provide the URL to your repository.
  6. Optional: In the Restrict architecture drop-down menu, select an architecture. You can allow all the architectures or restrict it to your system architecture to prevent incorrect repositories availability.
  7. Optional: In the Restrict OS version drop-down menu, select an operating system (OS). You can allow all the RHEL versions or select one for your system version to prevent incorrect repositories being available.
  8. Optional: Disable Modularity filtering option. When the Modularity filtering option is disabled, you can update packages in this repository even if the packages are part of a module.
  9. Optional: In the GPG key field, upload the .txt file with a GPG key or paste the URL or value of an existing GPG key. The GPG key can be used to verify the signed packages of a repository. If you do not provide the GPG key for a repository, your system cannot perform the verification.
  10. If you selected Snapshotting or Introspect only, click Save. The Red Hat Hybrid Cloud Console validates the project status. If your repository is marked as Invalid, check the repository URL that you added. For details about the repository status, see Repository status section.
  11. If you selected Upload:

    1. Click Save and upload content. The Upload content window opens.
    2. Click Upload, select the rpm files you want to upload, and click Open.
    3. Click Confirm changes when your file uploading is complete.

Verification

  • Open the list of custom repositories and verify that the repository you added is listed.

2.2. Modifying a custom repository

You can modify a custom repository when you need to update information for that repository.

Prerequisites

  • You have a RHEL subscription.
  • You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.

Procedure

  1. Access Hybrid Cloud Console, click Services Red Hat Enterprise Linux Content Repositories.
  2. Find a repository you want to modify and click Edit in the Options menu.
  3. In the Edit custom repository wizard, modify the information you need. Click Save changes.

2.3. Removing a custom repository

When you no longer need a custom repository you can delete it.

Prerequisites

  • You have a RHEL subscription.
  • You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.

Procedure

  1. Access Hybrid Cloud Console, click Services Red Hat Enterprise Linux Content Repositories.
  2. Find a repository to delete and click Delete in the Options menu.

Verification

  • Open the list of custom repositories, and verify that the repository no longer exists.

2.4. Adding existing repositories from popular repositories to custom repositories

The Red Hat Hybrid Cloud Console has pre-configured repositories that you can use to build your customized RHEL image.

Prerequisites

  • You have a RHEL subscription.
  • You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.

Procedure

  1. Access Hybrid Cloud Console, click Services Red Hat Enterprise Linux Content Repositories.
  2. On the Custom repositories page click the Popular repositories tab.
  3. Search for the repository you want to add and click Add.

Verification

  • Select the Your repositories tab and verify that the new repository is displayed in the list of custom repositories.

2.5. Removing snapshots from a repository

You can delete snapshots from your custom repository to avoid broken functionality or security vulnerabilities that the old content might introduce.

Important

Snapshots get removed automatically after 365 days unless there is no newer snapshot of this repository. If a repository has multiple snapshots and the snapshot for removal is used in a content template, this snapshot will be replaced with the newer snapshot in the content template.

Prerequisites

  • You have a RHEL subscription.
  • You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.
  • You have added a custom repository. See Adding a custom repository.

Procedure

  1. Access Hybrid Cloud Console, click Services Red Hat Enterprise Linux Content Repositories.
  2. In the Your repositories tab, find the repository containing the snapshot to be removed, and click View all snapshots in the Option menu.
  3. In the Snapshot window, select all snapshots that you want to remove from this repository, and click Remove selected snapshots.
  4. In the Remove snapshot window, confirm the removal of the selected snapshots and click Remove.

2.6. Updating custom repository after changes

When you make changes to your repository you can trigger a refresh of that repository in the Red Hat Hybrid Cloud Console.

Prerequisites

  • You have a RHEL subscription.
  • You have administrator access to the Red Hat Hybrid Cloud Console web user interface or repository administrator role.
  • You updated your custom repository.

Procedure

  1. Access Hybrid Cloud Console, click Services Red Hat Enterprise Linux Content Repositories.
  2. Find a repository you want to modify and click Introspect Now in the Options menu.
  3. The status of that repository changes to In progress that indicates the Hybrid Cloud Console is connecting to the repository and checking for changes.

    The Red Hat Hybrid Cloud Console checks the status of the repositories every 24 hours and again every 8 hours if the status check fails.

2.7. Repository status in the Red Hat Hybrid Cloud Console

The repository status shows if the repository is available. The Red Hat Hybrid Cloud Console checks the repository status periodically and can change it. The following table describes the repository status in the Red Hat Hybrid Cloud Console.

Table 2.1. Repository status
StatusDescription

Valid

The Red Hat Hybrid Cloud Console has validated the repository and you can use it.

Invalid

The Red Hat Hybrid Cloud Console never validated this repository. You cannot use it.

Unavailable

The repository was valid at least once. The Red Hat Hybrid Console cannot reach this repository at the moment. You cannot use it.

In progress

The repository validation is in progress.

Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.