如何使用Artifactory镜像Linux发行版? [英] How do I use Artifactory to mirror linux distributions?

查看:121
本文介绍了如何使用Artifactory镜像Linux发行版?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Artifactory,CentOS,Debian和Ubuntu配置了外部yum和apt仓库,这似乎可以正常工作,但是Artifactory并未预先缓存/镜像它们.似乎是在第一次请求工件时对它们进行了缓存,我确实希望确保预先缓存了它们.

I configured external yum and apt repositories for Artifactory, for CentOS, Debian and Ubuntu and it seems as working but Artifactory does not cache/mirror them in advance. It seems that the artifacts are cached the first time they are requested and I do want to be sure that I pre-cache them.

我想象这将通过复制选项来完成,但是以某种方式看来,该选项在另一端需要一个Artifactory服务器,我显然没有,因为它们只是公共http镜像,例如:

I imagined that this would be done by replication option but somehow it seems that this option require an Artifactory server on the other side, which I obviously do not have as these are just public http mirrors, like:

  • http://mirror.bytemark.co.uk/centos/
  • http://ftp.uk.debian.org/debian/
  • http://mirror.bytemark.co.uk/ubuntu/

如何执行缓存/镜像?

推荐答案

您所有的观察和假设都是正确的. Arifactory远程存储库是懒惰的代理,仅在需要时才下载工件. 复制可以预填充缓存,但是它需要双方都配备Artifactory实例(因为它使用的是基于校验和的复制算法).

All your observations and assumptions are correct. Arifactory remote repositories are lazy proxies and download the artifacts only on demand. Replication can pre-populate the caches, but it requires Artifactory instances on both sides (because of the checksum-based replication algorithm it uses).

如果您确定要使用来自这些存储库的所有工件来预填充Artifactory(我们通常认为这种需求是不合理的),那么最简单的方法是使用网络爬虫构建所有对象的列表包装,然后通过Artifactory向这些包装发出HEAD请求.

If you're sure you want to pre-populate Artifactory with all the artifacts from those repositories (we don't see this demand justified usually), the easiest way will be to use a web crawler on build the list of all the packages and then issue a HEAD request to those packages via Artifactory.

这篇关于如何使用Artifactory镜像Linux发行版?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆