Gentoo Archives: gentoo-user

From: hydra <hydrapolic@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Distfiles cache setup
Date: Sat, 19 Sep 2015 04:39:48
Message-Id: CAG6MAzRHAb==SHxBoO8wWHcrRRFUZo0HZbiLEigS+SNe-WiS=A@mail.gmail.com
In Reply to: [gentoo-user] Distfiles cache setup by Daniel Frey
1 On Fri, Sep 18, 2015 at 7:02 PM, Daniel Frey <djqfrey@×××××.com> wrote:
2
3 > Hi all,
4 >
5 > I have been running several Gentoo machines here at my house, and am
6 > currently up to 7 (or was it 8?) installs.
7 >
8 > I have been trying to reduce my resource consumption and set up an rsync
9 > mirror long ago, so my [acting] server only syncs to the internet and
10 > all other devices point to it. That part is working fine, I've already
11 > moved it to the repos.conf configuration.
12 >
13 > Whenever I search for running a local distfiles mirror (on this list and
14 > on the web) it gets a bit murky.
15 >
16 > The way I see it is this can be done a couple of ways:
17 >
18 > 1. Set up a lighttpd server to serve the distfiles directory.
19 >
20 > This has the benefit of being able to sync machines outside my network,
21 > although I don't know if I'd expose it to the internet.
22 >
23 > The major issue I can see with this is that if the file doesn't exist,
24 > portage will crap out saying it's not available. What I don't know is if
25 > there's an easy way to "get around" this issue.
26 >
27 > </1.>
28 >
29 > 2. Export the distfiles directory.
30 >
31 > This seems to be a bit better of a solution, other than not being able
32 > to use it outside the LAN. However, cleaning this directory becomes a
33 > lot less trivial as tools used to clean it will assume that the current
34 > machine is the only machine using it and clobber other workstation's
35 > required distfiles.
36 >
37 > I suppose the easiest way to sync is to wipe it completely out and run
38 > `emerge -fe world` on all machines to rebuild it, but this would be a
39 > fair bit of work as well.
40 >
41 > </2.>
42 >
43 > With those two options, neither being perfect - it made me wonder if
44 > there's a Better Way(tm) to do this.
45 >
46 > In the case of a shared distfiles, it would be best if something was one
47 > the machine hosting the distfiles monitoring what workstation needed
48 > what file and only removing a file when no workstations request it.
49 > Alas, I don't think a tool such as that exists (although I didn't really
50 > look that hard.)
51 >
52 > Ideally, it would be nice to have some sort of caching proxy that could
53 > fetch the file as it was needed, but in searching for this I encountered
54 > so much noise in the search results I gave up for the time being.
55 >
56 > Anyone have any suggestions?
57 >
58 > Dan
59 >
60 >
61 >
62 >
63
64 You can export distfiles via glusterfs. A single machine holds the data
65 while the others can fetch / upload files. Glusterfs needs to be installed
66 on each machine and fuse enabled in the kernel.

Replies

Subject Author
Re: [gentoo-user] Distfiles cache setup "J. Roeleveld" <joost@××××××××.org>