Gentoo Archives: gentoo-dev

From: Donny Davies <woodchip@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] [GLEP] Web Application Installation
Date: Tue, 05 Aug 2003 02:30:11
Message-Id: 20030805023012.GB10932@breccia.escarpment
In Reply to: Re: [gentoo-dev] [GLEP] Web Application Installation by Stuart Herbert
1 On Tue, Aug 05, 2003 at 01:14:26AM +0100, Stuart Herbert wrote:
2 [...]
3 >On Tuesday 05 August 2003 12:16 am, Max Kalika wrote:
4 [...]
5 >> Ok, this is debatable, but I'm willing to change the eclass to take
6 >> -apache2 into effect.
7 >
8 >[OT, but interesting] How is this debatable?
9
10 I think it's clear distinct support for both Apache-1.x and Apache-2.x
11 is needed as the software is just so pervasively deployed on so many
12 different sites and configurations. I think we can support both.
13
14 >> Here's the problem. First of all, SLOTing won't help that because it
15 >> assumes that the versions of the packages *and* the files you are
16 >> installing are _different_. I.e. db4 and db3 are SLOTted: they install
17 >> libdb-4.so and libdb-3.so respectively and thus can run simultaneously.
18 >
19 >I must be missing something. Why won't SLOTing help? The behaviour you've
20 >described is *exactly* the behaviour that I want. Why can't phpBB-2.0.4 and
21 >phpBB-2.0.5 run at the same time on the same box, but under different virtual
22 >domains?
23
24 SLOT was certainly forseen to be destined primarily for use in the ebuilds
25 of shared libraries although it's now used in many different places
26 including the Apache ebuilds. SLOTing webapps sounds great to me.
27
28 >> Now, wrt to the whole virtual server thing. Personally if I was running a
29 >> server with, as you say, a non-trivial number of virtual domains who have
30 >> different needs, I probably wouldn't use a package management system to
31 >> begin with, or truly virtualize everything and use something like
32 >> user-mode-linux in which case we're back to single-domain installs.
33 >
34 >UML is one solution, but the overhead is not insignificant.
35 >
36 >If the package management system provided a viable solution, don't you think
37 >that people would use it?
38
39 Sure they will. The #1 reason it seems to me people would change --datadir
40 and/or DocumentRoot from their defaults isnt because you really want
41 them to be floating around, is it? I'd say it's because /home/httpd
42 simply doesn't work for them.
43
44 This discussion has come a fair ways now, and proposes some very cool
45 or should I say "strong" ideas for solving a much richer variety of
46 problems and scenarios. You'll recall I asked for what other highly
47 desirable features developers wanted to see supported were. I'm pleased
48 to see the discussion of the *-config toolset approach, I foresaw
49 multiple instances and mass virtual hosting as eventually going to
50 be discussed.
51
52 >
53 >> Going along with your example, how can you do an 'emerge -u phpBB' _for a
54 >> particular domain_?
55 >
56 >Like this.
57 >
58 >a) emerge -u 'webapp' installs the master copy of 'webapp' in /usr/webapps.
59 >If the webapp is SLOT'ed, none of the domains are upgraded at this point.
60 >b) Then, run 'webapp-config --upgrade <webapp> /path/to/domain/directories' to
61 >upgrade the specific domain.
62 >
63 >Two stage process. Finally, once all domains are upgraded, you can simply do
64 >an 'emerge -C webapp-old-version' to remove the old SLOT'ed version that is
65 >no longer required.
66 >
67 >What's wrong with this as a solution?
68 >
69 >> You're telling portage to maintain a package, and
70 >> upgrade parts of it randomly.
71 >
72 >Nope. I'm telling Portage to maintain the master copy of a package, and to
73 >upgrade that master copy only.
74
75 It looks to me as if he's exactly answered the question. The *-config
76 toolset is if you ask me, a perfectly natural progression here. Pretty
77 slick for webapps, which if this work continues to persist in the
78 direction of solving easily for everybody, would be maybe the
79 best out-of-the-box setup I've seen anyway.
80
81 [...]
82
83 >> The most robust solution would be to create a new group (web?) and make all
84 >> the webserver users be a part of that group and make these directory
85 >> group-owned by said group. (Similar to the "mail" group for many
86 >> mail-related services)
87 >
88 >Why is that robust?
89 >
90 >> Which takes me back to
91 >> wanting to support a single instance install of an app that an admin has to
92 >> copy in place if the default location is unacceptable.
93 >
94 >It's one solution, sure. I think we can do better, and I'm willing to write
95 >the code to do it if necessary.
96 >
97 >> > * /usr/webapps/<app-name> as the main directory.
98 >> > * /usr/webapps/<app-name>/public_html/ for files served by the web server
99 >> > * /usr/webapps/<app-name>/cgi-bin/ for CGI-BIN files
100 >> > * /etc/webapps/<app-name>/ to hold the box-default config files
101 >> > * <app-name> is ${PN} for non-slotted packages
102 >> > * <app-name> is ${P} for slotted packages
103 >>
104 >> I'd say <app-name> should just be ${PF} for both and not worry about what
105 >> is SLOTed and what is not -- it works itself out.
106 >
107 >(thinks about this) I'd want to test it to be sure, but I think ${PF} would
108 >work out okay. Depends whether having the -rX part of the package name is
109 >really important or not.
110 >
111 >> Otherwise, this seems ok to me and is easy to implement in the eclass.
112 >
113 >Good-o. So the two of us (ominously quiet in here ;-) are in agreement then?
114 >Oh, thought it was too good to be true ;-)
115 >
116 >> The only thing I would
117 >> change is the names public_html and cgi-bin. There may be no html and not
118 >> binary files in them (respectively). How's about 'public' and 'cgi'? (I
119 >> know, I know, nitpicking).
120 >
121 >Shrugs. I just picked 'public_html' because it's a recognised convention
122 >(although not the only one I'm sure). 'public' is too generic for my liking.
123 >'cgi-bin' *is* a recognised convention, and one we shouldn't break.
124
125 Please, public_html and cgi-bin are very fine suggestions I think.
126
127 [...]
128
129 Cool developments here, I'm of course following and enjoying; Good Work.
130
131 Donny

Replies

Subject Author
Re: [gentoo-dev] [GLEP] Web Application Installation Stuart Herbert <stuart@g.o>