5
votes

How to fully import yum repository into Artifactory?

Please note that I am referring to external yum repositories and due to the way the external repository mirroring is implemented in Artifactory I cannot use the artifactory-remote repositories.

Artifactory remote repositories are able to cache results but they are not able to preload (precache) all the content, making them unreliable and unsafy for many use cases.

I am in a situation where I need to load/import some already existing yum repositories and to allow few people to upload new artefacts in them, or even to restore them to a previous state if necessary.

1

1 Answers

6
votes

You can do the following in order to import a Yum repo:

  1. Create a local Yum repository in Artifactory. Make sure to configure "YUM Metadata Folder Depth" to match the layout of the imported repository
  2. Download the content of the external Yum repository you wish to import. Make sure you keep the original repository layout. Copy the content of the repository to the server running Artifactory
  3. Goto Admin > Import & Export > Repositories > Import Repository from Path
  4. Select the repository you created in step 1 as target local repository
  5. Fill in the path of the repository content to be imported and click "Import"
  6. Wait for Artifactory to calculate the Yum metadata or actively browse to the root of the repository and choose "Recalculate Index" for the right context menu