Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fully import yum repository into Artifactory?

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.

like image 790
sorin Avatar asked Nov 26 '15 13:11

sorin


People also ask

How do I import a repository into Artifactory?

Repositories Import and Export. Note: Importing repositories is supported for all users whereas exporting repositories is only available for non-SaaS users. To access import and export of repositories, in the Administration module, select Artifactory | Import & Export | Repositories.

How do you deploy packages to Artifactory?

Deploying According to Layout The Deploy dialog displays the repository package type and layout configured. To deploy your package according to the configured layout, check Deploy According to Layout. Artifactory displays entry fields corresponding to the layout tokens for you to fill in.


1 Answers

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
like image 157
Dror Bereznitsky Avatar answered Nov 29 '22 22:11

Dror Bereznitsky