YUM Repositories

Skip to end of metadata
Go to start of metadata
Table of Contents

Overview

Artifactory can act as a full-fledged YUM repository (since Artifactory 2.4.0). As such, it provides:

  1. RPM metadata calculation for RPMs hosted in Artifactory local repositories.
  2. Provisioning RPMs directly from Artifactory to YUM clients.
  3. Detailed RPM metadata views from Artifactory's web UI.

RPM Metadata for Hosted RPMs

The RPM metadata generated by Artifactory is identical to the basic-mode output of the Red-Hat based linux command createrepo. A folder named repodata is created in the configured location within a local repository with the following files within it:

  • repodata.xml.gz - Contains an XML file that describes the primary metadata of each RPM archive.
  • filelists.xml.gz - Contains an XML file that describes all the files contained within each RPM archive.
  • other.xml.gz - Contains an XML file that describes miscellaneous information regarding each RPM archive.
  • repomd.xml - Contains information regarding all the other metadata files.
YUM Support is Platform Independent!

Artifactory employes a pure Java-based RPM metadata calculation.
Therefore, it does not rely on the existence of the createrepo binary or on running external processes on the host on which Artifactory is running.

Triggering RPM Metadata Updates

When enabled, the calculation is run in a number of ways:

  1. Automatically when deploying/removing/copying/moving an RPM file.
  2. Automatically when performing content import (both system and repository imports).
  3. Manually via "Calculate Now" in the local repository YUM configuration tab.
  4. Manually via Artifactory's REST-API.

The produced metadata is served to YUM clients.

Metadata calculation will clean up pre-existing YUM metadata (existing as a result of manual deployment or import), including RPM metdata stored as SQLite DB files.

Configuration

To enable RPM metadata calculation on a local repository, browse within Artifactory's UI to the local repository configuration and select the YUM tab.

The Depth field tells Artifactory under which level of directory to search for RPMs and save the repodata directory.
0 is the default and refers to the repository's root folder; the calculator will search the entire repository for RPMs and save the repodata directory at $REPO-KEY/repodata.
Using a different depth is useful in cases such as generating metadata for a repository that separates it's artifacts by name, version and architecture; for example, if the repository layout is similar to:

And if you wish to generate RPM metadata for every artifact divided by name, you'd set the Depth to 1 and the repodata directory will be saved at REPO_ROOT/ARTIFACT_NAME/repodata

Metadata calculation is throttled per metadata base-folder and is asynchronous; Artifactory invokes the actual calculation only after a certain "quiet period" following an action involving update or removal of an RPM file. For this reason, the creation of the metadata will normally occur 1-2 minutes after an RPM-related action has been completed.

Viewing Individual RPM Information

It is also possible to view all the metadata that annotates an RPM by choosing the RPM file in Artifactory's tree browser and selecting the RPM Info tab:

Labels: