JP Vossen on 3 May 2008 15:34:53 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PLUG] apt-proxy vs. apt-cacher vs. approx


A while ago I asked the list for a replacement for apt-proxy, which has 
been *very* unstable for me for some time.  I finally got around to 
doing something about it.  I ended up going with approx, though some 
list members spoke well of apt-cacher.  Here's why I chose it.

Criteria
--------
* Stable!
* Maintained in both Debian and Ubuntu repos
* Easy to use config file
* Ability to have more than one repo (simple failover) = neither :-(
* Cache cleanup! (set it and forget it)
* Fewest changes on the client-side


approx
	+ Used port 9999 (same as apt-proxy)
	+ Config file is really simple [1]
	+ cache cleanup via cron and gc_approx
	- No fail-over
	- Config file subject to collisions


apt-cacher
	- Uses port 3142 (!= 9999, but easy to change)
	- Config file is long [2]
	- No simple fail-over
	- Clunky client-side setup
	+ Does clean up cache
	+ Perl
	-+ More reporting


The killer for me was how much simpler the approx config appears. 
apt-cacher's config isn't bad at all, but there are a lot more options 
and stuff I just didn't feel like reading.  To me, it seems that approx 
is simpler and more like apt-proxy (which I am familiar with and liked a 
lot until it got so unstable).

One catch with approx is that the really simple resource scheme in the 
config file is subject to collisions.  That is, you can't have:
	security	http://security.debian.org/
	security	http://security.ubuntu.com/ubuntu

So I renamed them dsecurity and usecurity, tweaked my sources.lists, and 
I'm good to go.


One thing I haven't mentioned is that apt supports a proxy setting 
itself, in apt.conf, called "Acquire::http::Proxy".  Apparently you 
leave sources.list file(s) alone and just add or tweak that line.  That 
probably would have been the right way to go if I was starting fresh, 
but it was unclear how that would work with apt-cacher or approx and I 
already had my sources.list more-or-less tweaked anyway.

________________________
Footnotes

[1] Sample approx config

# This goes in /etc/approx/approx.conf, server-side
# Commented stuff here is for manual fail-over if needed
##### Debian #####
debian		http://ftp.us.debian.org/debian
#debian		http://ftp.de.debian.org/debian
#debian		http://ftp2.de.debian.org/debian
#debian		ftp://ftp.uk.debian.org/debian
dsecurity	http://security.debian.org/
#security	http://ftp2.de.debian.org/debian-security

##### Ubuntu-ish #####
ubuntu		http://us.archive.ubuntu.com/ubuntu
usecurity	http://security.ubuntu.com/ubuntu
medibuntu	http://packages.medibuntu.org
partner		http://archive.canonical.com/ubuntu

##### Other #####
zapgroup	http://www.zap.org.au/debian
wine		http://wine.budgetdedicated.com/apt
google		http://dl.google.com/linux/deb

# Sample apt.sources lines
# These go in /etc/apt.sources.list, on all clients, edited as needed

# Debian
#deb http://aptproxy.company.com:9999/debian/   etch         main 
contrib non-free
#deb http://aptproxy.company.com:9999/dsecurity/ etch/updates main 
contrib non-free
#
# Ubuntu
#deb http://aptproxy.company.com:9999/ubuntu/    hardy           main 
restricted universe multiverse
#deb http://aptproxy.company.com:9999/ubuntu/    hardy-updates   main 
restricted universe multiverse
#deb http://aptproxy.company.com:9999/usecurity/ hardy-security  main 
restricted universe multiverse
##deb http://aptproxy.company.com:9999/ubuntu/    hardy-backports main 
restricted universe multiverse
#deb http://aptproxy.company.com:9999/medibuntu/ hardy           free 
non-free
	# https://help.ubuntu.com/community/Medibuntu
	# aptitude install medibuntu-keyring
#deb http://aptproxy.company.com:9999/partner/   hardy           partner
#
#deb http://aptproxy.company.com:9999/zapgroup/ zapgroup-hardy  main 
restricted
#deb http://aptproxy.company.com:9999/wine/     hardy           main
#deb http://aptproxy.company.com:9999/google/   stable          non-free


[2] apt-cacher has /usr/share/apt-cacher/apt-proxy-to-apt-cacher which 
builds an apt-cacher config file out of an apt-proxy config.  Nice.


Thanks to everyone for their help way back when,
JP
----------------------------|:::======|-------------------------------
JP Vossen, CISSP            |:::======|        jp{at}jpsdomain{dot}org
My Account, My Opinions     |=========|      http://www.jpsdomain.org/
----------------------------|=========|-------------------------------
"Microsoft Tax" = the additional hardware & yearly fees for the add-on
software required to protect Windows from its own poorly designed and
implemented self, while the overhead incidentally flattens Moore's Law.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug