(Re?)Announcing an easy way to mirror the Ubuntu archives
Chris Glass
chris.glass at canonical.com
Tue May 16 15:01:24 UTC 2017
Hi list,
I thought you might be interested to see what we (the Public Cloud team and
Web Operations team at Canonical) developed over the years to mirror the
Ubuntu archives for our cloud partners (taking a hybrid cache approach):
https://launchpad.net/ubuntu-repository-cache
It's been available as free software from the start but perhaps lacked a
little bit of visibility/"advertisement"/discoverability, not being a
top-level project in launchpad.
Being a Juju charm (https://jujucharms.com/ubuntu-repository-cache), and
thanks to the hybrid cache approach, it is very easy to deploy, use, and
scale. To get started:
juju deploy ubuntu-repository-cache # On your favorite cloud/substrate
For a production deployment we use about 3 instances of those (juju deploy
-n 3) behind 2 haproxy instances (juju deploy -n 2 haproxy) that are DNS
round-robined (more info about machine sizes in the project's README).
A note about the inner workings of the charm: instead of being a full
mirror, it instead syncs the metadata from the archive (roughly everything
but pool/) on a schedule, verifies its integrity, and starts serving it all
if consistent. The pool/ part of the archive is then cached using squid3.
This means that with default settings disk space requirements are much
lower than a full mirror (only about 2Gb of disk space is used per version
of the metadata, and the rest is cache space).
Hoping that some of you find this code useful,
Happy hacking!
- Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-mirrors/attachments/20170516/5b98d869/attachment.html>
More information about the ubuntu-mirrors
mailing list