1 |
On Sun, Aug 03, 2003 at 02:50:11AM +1000, Troy Dack wrote: |
2 |
> Definitions |
3 |
> =========== |
4 |
*Web Application Instance* |
5 |
An apparent install of the Web Application that is served up via the |
6 |
webserver. There may be any number of instances per Web Application. |
7 |
This is a major use for web applications. Our Gentoo Zope setup |
8 |
already provides instances and can be used for some concepts on this |
9 |
matter. |
10 |
*Web Application Setup Program* |
11 |
A script similar in function to zope-config that sets up instances. |
12 |
|
13 |
> Rationale |
14 |
> ========= |
15 |
2b. Web Application must be slotted by their major version numbers to |
16 |
further avoid downtime when true configuration changes are required. |
17 |
6. It should be easily possible to have multiple instances of a web |
18 |
application without any duplication of source files. |
19 |
7. It should be immediately apparent how to control instances of a web |
20 |
application. |
21 |
|
22 |
> 2. Application Location |
23 |
> ----------------------- |
24 |
> * for files to be served to clients:: |
25 |
> /usr/share/webapps/<application>/files/ |
26 |
Why the /files/ on the end, why not just leave it out? |
27 |
Also, for compatibility and ease of upgrade (stay with me on this until |
28 |
later) the actual install location should have several symlinks to it, |
29 |
so that instances can change their version by updating a symlink, |
30 |
instead of having to re-write their .htaccess files. |
31 |
As such, we have the package actually installed at with it's full |
32 |
version string, and a symlink with it's major version as the SLOT value |
33 |
present. |
34 |
/usr/share/webapps/${PF} |
35 |
/usr/share/webapps/${PN}-${SLOT} |
36 |
|
37 |
> * for documentation files (not served to clients):: |
38 |
> /usr/share/doc/webapps/<application>/ |
39 |
What is different about this documentation compared to any existing |
40 |
package documentation in /usr/share/doc/${PF}/ ? |
41 |
Care must also be taken here as many web-apps ship documentation that is |
42 |
referenced from inside the application as help, so should be installed |
43 |
in such a location that it is still accessible. |
44 |
|
45 |
> 3. Application Configuration |
46 |
> ---------------------------- |
47 |
> * install configuration files in:: |
48 |
> /etc/webapps/<application>/ |
49 |
First the initial copy of the configuration files, eg their base setup |
50 |
for Gentoo should be installed to a directory (the _default name could |
51 |
be changed): |
52 |
/etc/webapps/${PN}-${SLOT}/_default/ |
53 |
|
54 |
As needed, the webapp setup program copies and modifies the contents of |
55 |
the default settings for each instance. |
56 |
/etc/webapps/${PN}-${SLOT}/${INSTANCENAME}/ |
57 |
|
58 |
> * Apache configuration directives: |
59 |
> - install a sample file in:: |
60 |
> /usr/share/doc/webapps/<application>/conf/ |
61 |
> the ebuild should inform the user how to include this |
62 |
> information in their Apache configuration. |
63 |
See my notes about documentation install location on this. |
64 |
|
65 |
> - alternatively the configuration directives could be placed in:: |
66 |
> /etc/apache{1,2}/conf/webapps/<application> |
67 |
> this directory and the files in it should be included by the |
68 |
> main Apache configuration file. |
69 |
The webapp setup program should create these as needed, possibly: |
70 |
/etc/apache{1,2}/conf/webapps/${PN}-${SLOT}/${INSTANCENAME}.conf |
71 |
|
72 |
> 4. Application Permissions |
73 |
> -------------------------- |
74 |
No changes needed here at all. |
75 |
|
76 |
5. Instances of Web Applications |
77 |
-------------------------------- |
78 |
In a similar vein to Gentoo's Zope scripts, namely zope-config, we |
79 |
should be able to have multiple instances of a single web application |
80 |
without duplicating all of the files. |
81 |
|
82 |
This also allows system administrators to control where web applications |
83 |
will appear on their system, as well as to customize a file in a single |
84 |
instance of a web application without effecting the original material. |
85 |
|
86 |
webapp-config ${PN}-${SLOT} ${INSTANCENAME} \ |
87 |
/home/httpd/htdocs/..some-path-where-admin-wants-it.. (more options) |
88 |
(or zope-config has a ncurses interface for this IIRC) |
89 |
|
90 |
This is easily acheived thru use of Apache configuration directivies and symlinks. |
91 |
For PHP instances, see http://tavi.sourceforge.net/VirtualHosts as for |
92 |
some details. |
93 |
|
94 |
The primary details here is that to the web-application, it appears that |
95 |
all of it's configuration and files are in the instance directory, but |
96 |
the files are physicalled located elsewhere. |
97 |
|
98 |
> Implementation |
99 |
> ============== |
100 |
> Max Kalika <max@g.o> stated that he has a preliminary eclass that |
101 |
> implements a good deal of this GLEP. |
102 |
I've also got some experience with setting up instances of web |
103 |
applications already as I have needed them for work. Previously I was |
104 |
doing it by hand, but I am willing to be the main author of the tools |
105 |
needed. |
106 |
|
107 |
> Backwards Compatibility |
108 |
> ======================= |
109 |
> There may be some issues regarding compatibility with existing installs of |
110 |
> web applications. This is particularly true if the default Document Root is |
111 |
> moved from what is accepted as the current standard (/home/httpd). |
112 |
There will with a doubt be very little backwards compatibility between |
113 |
installs, however as the old /home/httpd/htdocs/${PN} is not being |
114 |
overwritten, this allows admins time to migrate. |
115 |
|
116 |
> Credits |
117 |
> ======= |
118 |
Robin Johnson <robbat2@g.o> also make several initial comments on |
119 |
the mailing lists as to web applications and instancing. |
120 |
|
121 |
-- |
122 |
Robin Hugh Johnson |
123 |
E-Mail : robbat2@××××××××××××××.net |
124 |
Home Page : http://www.orbis-terrarum.net/?l=people.robbat2 |
125 |
ICQ# : 30269588 or 41961639 |
126 |
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85 |