Release Party Ubuntu Mirror

Our Ubuntu LoCo release parties always end up being part-install-fest. Even when we used to meet at pubs in the early days, people would pull out laptops to burn ISOs for each other and get assistance with upgrades.

As the maintainer of a local university mirror, I took along a mini-mirror to our Lucid Release party and will be doing it for the Maverick party tomorrow. If anyone wants to do this at future events, it's really not that hard to organise, you just need the bandwidth to create the mirror. Disk space requirements (very rough, per architecture, per release): package mirror 50GiB, Ubuntu/Kubuntu CDs 5GiB, Xubuntu/Mythbuntu/UbuntuStudio CDs 5GiB, Ubuntu/Kubuntu/Edubuntu DVDs: 10GiB.

I took the full contents of our ubuntu-archive mirror, but you can probably get away with only i386 and amd64 for the new release people are installing and any old ones they might be upgrading from. You can easily create a partial (only selected architectures and releases) Ubuntu mirror using apt-mirror or debmirror. It takes a while on the first run, but once you have a mirror, updating it is quite efficient.

The CD and DVD repos can easily be mirrored with rsync. Something like --include '*10.04*'.iso' --exclude '*.iso' will give you a quick and dirty partial mirror.

As to the network. I took a 24port switch and a pile of flyleads. A laptop with 1TB external hard drive ran the mirror. At this point, you pick between providing Internet access as well (which may result in some poorly-configured machines upgrading over the Internet) or doing it all offline (which makes sense in bandwidth-starved South Africa). For lucid, I chose to run this on a private network - there was a separate WiFi network for Internet access. This slightly complicates upgrades because update-manager only shows the update button when it can connect to changelogs.ubuntu.com, but that's easily worked around:

cd /var/www
for file in meta-release meta-release-development meta-release-lts meta-release-lts-development meta-release-lts-proposed meta-release-proposed meta-release-unit-testing; do
    wget -nv -N "http://changelogs.ubuntu.com/$file"

Instead of getting people to reconfigure their APT sources (and having to modify those meta-release files), we set our DNS server (dnsmasq) to point all the mirrors that people might be using to itself. In /etc/hosts:        mirror za.archive.ubuntu.com archive.ubuntu.com security.ubuntu.com mirror.is.co.za ubuntu.saix.net ftp.leg.uct.ac.za ftp.sun.ac.za ubuntu.mirror.ac.za changelogs.ubuntu.com

Dnsmasq must be told to provide DHCP leases /etc/dnsmasq.conf: :


Then we ran an Apache (all on the default virtualhost) serving the Ubuntu archive mirror as /ubuntu, the meta-release files in the root, and CDs / DVDs in /ubuntu-releases, /ubuntu-cdimage. There were a couple of other useful extras thrown in.

We could have also run ftp and rsync servers, and provided a netboot environment. But there was a party to be had :)

For the maverick party, I used this script to prepare the mirror. It's obviously very specific to my local mirror. Tweak to taste:

set -e
set -u


export GNUPGHOME="$MEDIA/gnupg"
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5 2EBC26B60C5A2783

debmirror --host $MIRROR --root ubuntu --method rsync \
    --rsync-options="-aIL --partial --no-motd" -p --i18n --getcontents \
    --section main,universe,multiverse,restricted \
    --dist $(echo {lucid,maverick}{,-security,-updates,-backports,-proposed} | tr ' ' ,) \
    --arch i386,amd64 \

debmirror --host $MIRROR --root medibuntu --method rsync \
    --rsync-options="-aL --partial --no-motd" -p --i18n --getcontents \
    --section free,non-free \
    --dist lucid,maverick \
    --arch i386,amd64 \

rsync -aHvP --no-motd --delete \
    rsync://$MIRROR/pub/packages/corefonts/ \

rsync -aHvP --no-motd --delete \
    rsync://$MIRROR/pub/linux/ubuntu-changelogs/ \

rsync -aHvP --no-motd \
    rsync://$MIRROR/pub/linux/ubuntu-releases/ \
    --include 'ubuntu-10.10*' --include 'ubuntu-10.04*' \
    --exclude '*.iso' --exclude '*.template' --exclude '*.jigdo' --exclude '*.list' --exclude '*.zsync' --exclude '*.img' --exclude '*.manifest' \

rsync -aHvP --no-motd \
    rsync://$MIRROR/pub/linux/ubuntu-dvd/ \
    --exclude 'gutsy' --exclude 'hardy' --exclude 'jaunty' --exclude 'karmic' \

We'll see how it works out tomorrow. Looking forward to a good party.

And I thought our Ubuntu mirroring was a success

Due to archive.ubuntu.com’s saturated links atm, I switched to using mirror.ac.za as our upstream, but forgot to take their different URL scheme into account. We don’t use rsync’s —max-delete option on debian mirrors, so voom, our entire ubuntu archive mirror vanished. I’m resyncing it UWC, who we have a 10Mbps wireless link to…

Disk Usage Graph

Congratulations on Ubuntu 7.10

Congratulations to the Ubuntu team, on a successful gutsy release. While gutsy is currently a little buggy for me, the millions of eyes will hopefully find all the bugs responsible… (and I must get around to filing the relevant launchpad bugs)

I run a teeny weeny little mirror (by International standards, for South Africa, it’s OK), so I’ve followed the release process, and been hanging out on #ubuntu-mirrors since last night. Preparing an Ubuntu release is quite an undertaking. In total, each mirror needs to carry around 20-30 CD images, and 4 DVD images. That’s reasonable chunk of data, and it takes a lot of coordination for everybody to get it.

I see many distros release, we normally pick them up automatically, and notice their presence the next day. But there’s definitely something special about Ubuntu releases. They have the feel of a release. The tension builds up the night before, and the #ubuntu-release-party channel fills up (when I popped in, around 500 people). Then, a few hours before the release is announced, people start noticing that it’s on the mirrors. Pointing this out on the release-party channel is not allowed (it would disturb the otherwise rowdy party of 500 users pressing F5 every 10 seconds), but pretty quickly, before the release is even announced, all the mirrors that carry Ubuntu CDs get flat-lined. If they don’t, then it’s a sign that their hardware isn’t up to scratch, and they have to find & fix their bottlenecks. On the #ubuntu-mirrors channel, you can see sysadmins from around the world showing off graphs of flat-lined, multi-gigabit links and sharing server tuning tips. If you want any experience in widely-distributing large files, run an ubuntu mirror at release-time, you’ll gain the experience fast.

I don’t know if this massive assault means Ubuntu is the most popular distribution out there. Most Ubuntu users don’t need the new ISO. They rather need click the big “upgrade” button, and hammer their local mirror to the tune of about a gigabyte. Ubuntu is based on Debian’s awesome package management system, that (if used correctly) should never require a re-install. There are Debian systems out there that were installed once, back in the 90s, and have been upgraded (both distro versions and hardware) continuously since then. Do people not know that, or do they want the thrill of booting up with the new Gutsy CD? Debian is widely considered to be the most popular distribution, and a Debian release hardly raises eyebrows (other than somebody saying “Debian released? Has hell frozen over?”, and scheduling an upgrade for some time in the next 6 months). If nothing else, this shows how different distributions’ user-base can be, while being technically very similar.

I’ve done my bit to help out the Ubuntu release:

  • I’ve been running Gutsy since it’s fork, and filed god only knows how many bugs on launchpad.
  • I’ve created my unofficial package DVDs, for people without Internet connections.
  • My mirror & toaster had the CD images in advance, and we’ll have the DVDs by tomorrow morning.
  • I’ve got a UK server with a 100Mbps link seeding Ubuntu DVD torrents. I was the sole seed for many hours, and have uploaded over 200GB, so at least I did some good ;-)

Now, as the release traffic dies down again (i.e. heavy but not quite flat-lining), I hope the sysadmins and release-party-goers sleep well, you all deserve it.

Syndicate content