Difference between revisions of "How to cache openSUSE repositories with Squid"

From Perswiki
Jump to: navigation, search
(Created page with "How to set up a local squid webcache that works with openSUSE repositories and the openSUSE network installation process. In effect, a fully autonomous local mirror. == Backgro...")
 
(Background)
Line 10: Line 10:
 
Especially when testing installation, I (and/or my colleagues) end up repeating the process many times on different machines.  
 
Especially when testing installation, I (and/or my colleagues) end up repeating the process many times on different machines.  
 
Sometimes virtual machines, sometimes desktop, sometimes
 
Sometimes virtual machines, sometimes desktop, sometimes
servers in our downstairs datacentre. A local copy of the repository would seem to be the right thing, and it requires just a tiny a bit of manual interaction
+
servers in our downstairs datacentre. A local copy of the repository would seem to be the right thing, but it does require a tiny a bit of manual interaction
 
(specifying the URL when installing). Instead I thought of using squid - managing a local cache of downloaded objects is exactly what squid is good at.  
 
(specifying the URL when installing). Instead I thought of using squid - managing a local cache of downloaded objects is exactly what squid is good at.  
  
 
Alas, squid and the openSUSE network installation process don't work together very well. Not out-of-the-box anyway.  
 
Alas, squid and the openSUSE network installation process don't work together very well. Not out-of-the-box anyway.  
The repositories at [http://download.opensuse.org download.opensuse.org] are served by a load-distribution system combining mirrorbrain and metalinks. For the moment I won't
+
The repository at [http://download.opensuse.org download.opensuse.org] is served by a load-distribution system combining mirrorbrain and metalinks. For the moment I won't
go into any further detail, suffice to say that this means packages are downloaded using [http://en.wikipedia.org/wiki/Segmented_downloading segmented downloading] spread over multiple mirrors.
+
go into any further detail, suffice to say that this means packages are downloaded using [http://en.wikipedia.org/wiki/Segmented_downloading segmented downloading] spread over multiple mirrors, which makes it impossible for squid to do much cacheing.

Revision as of 09:48, 12 November 2011

How to set up a local squid webcache that works with openSUSE repositories and the openSUSE network installation process. In effect, a fully autonomous local mirror.

Background

I do a lot of testing of openSUSE, and more and more often, I install over the network. I used to keep the SuSE Linux and openSUSE DVDs available over NFS on a local server, but over last couple of years, I've been working a lot more with Factory and the many snap-shots that lead up to a final/gold release. With those it is much easier to just point the installation process to the right URL.

Especially when testing installation, I (and/or my colleagues) end up repeating the process many times on different machines. Sometimes virtual machines, sometimes desktop, sometimes servers in our downstairs datacentre. A local copy of the repository would seem to be the right thing, but it does require a tiny a bit of manual interaction (specifying the URL when installing). Instead I thought of using squid - managing a local cache of downloaded objects is exactly what squid is good at.

Alas, squid and the openSUSE network installation process don't work together very well. Not out-of-the-box anyway. The repository at download.opensuse.org is served by a load-distribution system combining mirrorbrain and metalinks. For the moment I won't go into any further detail, suffice to say that this means packages are downloaded using segmented downloading spread over multiple mirrors, which makes it impossible for squid to do much cacheing.