誰ãæ¬åã§å¼ãã§ãããªãã®ã§ç¤¾å
ã§ããã³ãã«ã§éãã㨠ymmt ã¨å¼ã¶ãã社å
ã«æ¬é¨é·å½ä»¤ãåºãããé¡ããã¦ãã @ymmt2005 ã§ãã
ä»åã¯ãµã¤ãã¦ãºç¤¾å ã§ã©ã®ããã«ã¢ã¼ãã£ãã¡ã¯ãã管çãã¦ãããç´¹ä»ãã¾ããã¢ã¼ãã£ãã¡ã¯ãã¨ããã®ã¯ã½ããã¦ã§ã¢éçºã§ã¯ææç©ã®ãã¨ãæãã¾ããææç©ãããããããã¾ããããã£ã±ãèå³ã®å¯¾è±¡ã«ãªãã®ã¯ãã¼ã¿ã»ã³ã¿ã¼ã«ãããã¤ãããã客æ§ã«é å¸ããããã JAR ãå®è¡ãã¡ã¤ã«ãã¢ã¼ã«ã¤ãã§ãã
å¿ãã人ã®ããã« 4 è¡ã§ã¾ã¨ãã¦ããã¾ãã
- JFrog Artifactory ãã¢ã¼ãã£ãã¡ã¯ã管çã«å©ç¨ãã¦ãã
- Debian ããã±ã¼ã¸(deb)ãä½æã»ç®¡çããä»çµã¿ããã
- åå°ã®ãã¼ã¿ã»ã³ã¿ã¼ã§å©ç¨ãããã go-apt-cacher / go-apt-mirror ãä½ã£ã
- æ¢åã® apt-mirror ã apt-cacher-ng ã®åé¡ã解æ¶ãã¦ããã®ã§è©¦ãã¦ã¿ã¦ã
JFrog Artifactory ã¨ã¯
JFrog Artifactory (ä»¥ä¸ Artifactory)㯠JFrog 社ãæä¾ãã¦ããã¢ã¼ãã£ãã¡ã¯ã管çç¨ã® Web ã¢ããªã±ã¼ã·ã§ã³ã§ããç¡åã®ãªã¼ãã³ã½ã¼ã¹çã§ã¯ Maven ãªãã¸ããªã®æ©è½ã ã使ãã¾ãããåç¨çã§ã¯ Debian/Ubuntu ã§ä½¿ããã APT, Node.js ã§ä½¿ããã NPM, Python ã§ä½¿ããã PyPI ãªã©å¤æ°ã®ãªãã¸ããªããµãã¼ãããã¦ãã¾ãã
ãµã¤ãã¦ãºã§ã¯ Artifactory åç¨çã®ä¸çªå®ãã¨ãã£ã·ã§ã³ãä¸ã¤å°å ¥ãã¦ãã¾ããä¸çªå®ããã®ã§ããªãã¸ããªã®æ©è½æ°ã«éãã¯ãªããé«ãã¨ãã£ã·ã§ã³ã¯åé·åã主ãªå·®ç°ãªã®ã§ãèªç¤¾æè¡ã§ããåé·åã¹ãã¬ã¼ã¸ square ãèªåé害å復ã·ã¹ãã æèªãå©ç¨ãã¦ç¯ç´ã¨ããããã§ãã
Debian/Ubuntu ããã±ã¼ã¸ã®å©ç¨
ãµã¤ãã¦ãºç¤¾å ã§ã¯é常ã«å¤ãã® Ubuntu ãµã¼ãã¼ãåä½ãã¦ãã¾ããVMã»å®æ©åãããã¨æ°åå°ã¨ããã¨ããã§ãããããDebian/Ubuntu ã§ã¯ deb ã¨ãããã¡ã¤ã«å½¢å¼ã§å種ããã°ã©ã ãããã±ã¼ã¸ã³ã°ããã¦ãã¾ããã¤ã³ã¹ãã¼ã«æãã»ãã¥ãªãã£ããããªã©ã®éã«ã¯ãã®æ°åå°ã®ãµã¼ãã¼ãå¤æ°ã® deb ãã¡ã¤ã«ããã¦ã³ãã¼ããããã¨ã«ãªãã¾ãã
deb ãã¡ã¤ã«ã®ãªãã¸ããªã¯ APT ã¨ãããã¼ã«ããµãã¼ãããå½¢å¼ã§ç®¡çããã¾ãããArtifactory ãå©ç¨ããã¨ç¬èªã® APT ãªãã¸ããªãæ§ç¯ãã¦ãREST API 㧠Jenkins ã Drone ã®ãã㪠CI ãµã¼ãã¹ããèªåçã«ã¢ãããã¼ããããã¨ãç°¡åã«å®ç¾ã§ãã¾ããCI ãã Artifactory ã«èªåãããã¤ããã¨ç¶ç¶çããªããªã¼ã®å®æã£ã¦ãªããã§ã(ããããå ã®éç¨ãã¾ã ããã¾ãã)ã
ãµã¤ãã¦ãºã§ã¯èªç¤¾è£½ã®ããã°ã©ã ãç°¡æã« deb ããã±ã¼ã¸åããä»çµã¿ãèæ¡ãã¦ãArtifactory ã«èªåã¢ãããã¼ãããããã«ãã¦ãã¾ããä»çµã¿ã«ã¤ãã¦ã¯ã社å å©ç¨ã®ããã® deb ããã±ã¼ã¸ã³ã°å ¥éããã覧ãã ããã
Artifactory 㯠Ubuntu ã®å ¬å¼ APT ãªãã¸ããªããã£ãã·ã¥ããä»çµã¿ã¯ããã®ã§ããããã©ã¼ããä»çµã¿ã¯æã£ã¦ãã¾ãããå½ç¤¾ã§ã¯å®æçã«ã»ãã¥ãªãã£æ´æ°ãé©ç¨ããããã«ãã¦ããããããã£ãã·ã¥ã§ã¯é½åãæªãã®ã§å¿ è¦ãªã¿ã¤ãã³ã°ã§å¥ã®ãã¼ã«ã使ã£ã¦ãã©ã¼ããããã«ãã¦ãã¾ãã
ãã£ãã·ã¥ã¨ãã©ã¼
Artifactory 㯠1 å°ãããªããããå°ççã«é¢ããåæ ç¹ã»ãã¼ã¿ã»ã³ã¿ã¼ã§ã¯ããããã®ãªã¼ã¸ã§ã³å 㧠deb ãã¡ã¤ã«ããã£ãã·ã¥ããããã©ã¼ããå¿ è¦ãããã¾ãããããªãã¨æ ç¹éã®ãããã¯ã¼ã¯å¸¯åã®æµªè²»ããã¤ã³ã¹ãã¼ã«ããããé©ç¨ã«é·æéãè¦ããã¨ãããã¨ã«ãªãããã§ãã
é »ç¹ã«æ´æ°ããããªãã¸ããªã¯ãã£ãã·ã¥ãå®æçã«æ´æ°ããããªãã¸ããªã¯ãã©ã¼ããã®ãé©åã§ããåè ã«ãããã®ã社å ã¢ã¼ãã£ãã¡ã¯ãç¨ APT ãªãã¸ããªãå¾è ã«ãããã®ã Ubuntu å ¬å¼ãªãã¸ããªã§ãã
ãã£ãã·ã¥ã¯ Squid ã®ãããªé常㮠HTTP ãããã·ãå©ç¨ã§ããªããã¨ã¯ãªãã®ã§ãããAPT ã®ã¤ã³ããã¯ã¹ãã¡ã¤ã«ãå種ãã¡ã¤ã«ã®æ´æ°ã¯ç¬èªã®ä»çµã¿ã¨ãªã£ã¦ãããããHTTP ã®ãã£ãã·ã¥ã®ä»çµã¿ã¯ç¸æ§ãè¯ããªãã§ããããã§ãAPT å°ç¨ã®ãã£ãã·ã¥ãµã¼ãã¼ã§ãã apt-cacher-ng ãå½åã¯å©ç¨ãã¦ãã¾ããã
ãã©ã¼ã«ã¤ãã¦ã¯å¿ è¦ãªã¢ã¼ããã¯ãã£ã®ãµãã»ããã®ã¿ãã©ã¼ã§ãã apt-mirror ãå©ç¨ãã¦ãã¾ããã
go-apt-cacher / go-apt-mirror
ããããæ¬é¡ã§ãããapt-cacher-ng 㨠apt-mirror ã«ã¯ãããã解æ¶ãå°é£ãªèª²é¡ããã£ããããåé¡ã解æ¶ããèªç¤¾è£½ã® APT å°ç¨ãã£ãã·ã¥/ãã©ã¼ãã¼ã« go-apt-cacher / go-apt-mirror ãä½æãã¾ããã
apt-cacher-ng ã®åé¡ã¯ãHTTPS ãªä¸æµãµã¼ãã¼ã«å¤æ°ã®åææ¥ç¶ãããã¨ã¯ã©ãã·ã¥ãããã¨ã§ããããããã°ã試ã¿ãã®ã§ãããå é¨æ§é ãè¤éãªããæéãããã諦ãã¾ãããèªä½ãªãæ°æ¥ã§ä½ãããã¨è¸ãã§å®éã«ä½ã£ãã®ã go-apt-cacher ã¨ãªãã¾ãã
go-apt-cacher ã®ç¹é·ã¯ä»¥ä¸ã®éãã§ãã
- Release ã Packages ãèªèããã§ãã¯ãµã æ å ±ãæ½åº
- ãã§ãã¯ãµã ã«åè´ããªããã¡ã¤ã«ã¯ç ´æ£ãã¦ãã£ãã·ã¥ããªã
- Release ã¯èªåå®ææ´æ°
- ãã§ãã¯ãµã ãæ´æ°ãããã該å½ãã¡ã¤ã«ã¯ãã£ãã·ã¥ããç ´æ£
- LRU ãªãã£ã¹ã¯ãã£ãã·ã¥
- åå°åä½ã®åæã¯ã©ã¤ã¢ã³ãæ¥ç¶ããµãã¼ã
- é«é(ãã£ãã·ã¥æ¸ã¿ãã¡ã¤ã«ãªã 1 ms 以ä¸ã§å¦ç)
apt-mirror ã®åé¡ã¯ãã©ã¼çµæãå£ãã¦ãããã¨ãããã¨ãããã®ã§ããä»ã«ããã¼ãçªå·ãä»ãã URL ãé©åã«æ±ããªãçã®åé¡ãããã®ã§ãããéçºãæ´»çºã§ãªãææ¡ããã¦ããä¿®æ£ããã¼ã¸ãããæ¾ç½®ããã¦ããç¶æ³ã§ããããã㧠go-apt-cacher ã®ææãæµç¨ãã¦ãã¡ããç¬èªã«éçºããã®ã go-apt-mirror ã¨ãªãã¾ãã
go-apt-mirror ã®ç¹é·ã¯ä»¥ä¸ã®éãã§ãã
- å¿ è¦ãªã¢ã¼ããã¯ãã£çãæå®ãã¦é¨åçãªãã©ã¼ãæ§ç¯å¯è½
- rsync ããé«éãªæ´æ°å¦ç
- ä¸å®å ¨ãªãã©ã¼ã¯æ±ºãã¦ä½ããªã
- ãã©ã¼ã®æ´æ°ãã¢ãããã¯ã§ãæ´æ°éä¸ã®ãã©ã¼ã¯ã¯ã©ã¤ã¢ã³ãã«è¦ããªã
詳ããã¯å æ¥ã®æ±äº¬ Debian åå¼·ä¼ã§ååã®æ¹¯è°·ãçºè¡¨ããè³æãã覧ãã ããã
ã¾ã¨ã
ãµã¤ãã¦ãºç¤¾å ã®ã¢ã¼ãã£ãã¡ã¯ã管çã®ä»çµã¿ãç´¹ä»ãã¾ããã
go-apt-cacher / go-apt-mirror ã¯ãªãªã¼ã¹ããã°ããã§ããããã§ã«ãµã¤ãã¦ãºç¤¾å ã® apt-cacher-ng / apt-mirror ã¯ç½®ãæãæ¸ã¿ã§ããåæ§ã®èª²é¡ã«ãæ©ã¿ã®ããã¯æ¯éã試ããã ããã
ã½ã¼ã¹ã¯ https://github.com/cybozu-go/aptutil ã§å ¬éãã¦ãã¾ãã