Opinions wanted: clean distribution
I'm experimenting with a few ideas for a "clean distribution" of Zope; i.e. one that builds on the INSTANCE_HOME concept to produce a production-ready layout for UNIX-like systems. My hope is that it will someday make life a hell of a lot easier for Zope packagers (such as myself) as well as end-users. I'd love for the Zope install script to create this layout by default, and am certainly willing to dedicate code to the effort. I'm looking at a software home directory like this: BINDIR zopectl zopeinst LIBEXECDIR pcgi-wrapper LIBDIR zope (eveything from lib/python) Products Extensions [1] ZServer [1] inst [1] utilities [1] ETCDIR zope access inituser instances [2] VARDIR zope INSTANCE [2] db [3] Data.fs (et al.) run [4] *.pid gadfly [3] [5] [1] I am not sure if putting these folders here clashes with anything. Extensions, especially, I am worried about. [2] Instances should be named and built by 'zopeinst', which takes care of reasonably secure default permissions. The 'instances' file would list these along with start parameters and flags that zopectl understands; zopectl could be used to shutdown/startup zope instances in system startup/shutdown scripts this way. [3] These directories should be readable and writable only by the user who runs Zope. [4] This directory, if Zope is started as root, should be writable only by root. [5] Other instance-specific files such as Zope.cgi would live here. start/stop duties would be taken over by zopectl. The top level directories (BINDIR, LIBEXECDIR, LIBDIR, ETCDIR, VARDIR) would be configured at install time but would probably default to /usr/local/bin, /usr/local/libexec (or sbin for non-BSDers), /usr/local/lib, /usr/local/etc, /usr/local/var. I'm really looking for compatibility issues that anyone has or any suggestions for improvement. I plan to make a proposal out of this eventually. Please make sure you cc me at home (matt@zigg.com) on replies. -- Matt Behrens <matt.behrens@kohler.com> System Analyst, Baker Furniture
You have Products under the same grouping as the main zope source. This makes it difficult for different instances to run different products, or different versions of the same product. My current layout (which is inferior to what you propose in every other respect) has two product directories: LIBDIR/ZopeProducts : storing all zope products. ETCDIR/Products: contains symlinks into ZopeProducts for each product that this instance should use I think Extensions need to be in the ETCDIR too On Mon, 05 Nov 2001 15:33:20 -0500, Behrens Matt - Grand Rapids <Matt.Behrens@Kohler.Com> wrote:
BINDIR zopectl zopeinst
LIBEXECDIR pcgi-wrapper
LIBDIR zope (eveything from lib/python) Products Extensions [1] ZServer [1] inst [1] utilities [1]
ETCDIR zope access inituser instances [2]
VARDIR zope INSTANCE [2] db [3] Data.fs (et al.) run [4] *.pid gadfly [3] [5]
[1] I am not sure if putting these folders here clashes with anything. Extensions, especially, I am worried about.
[2] Instances should be named and built by 'zopeinst', which takes care of reasonably secure default permissions. The 'instances' file would list these along with start parameters and flags that zopectl understands; zopectl could be used to shutdown/startup zope instances in system startup/shutdown scripts this way.
[3] These directories should be readable and writable only by the user who runs Zope.
[4] This directory, if Zope is started as root, should be writable only by root.
[5] Other instance-specific files such as Zope.cgi would live here. start/stop duties would be taken over by zopectl.
The top level directories (BINDIR, LIBEXECDIR, LIBDIR, ETCDIR, VARDIR) would be configured at install time but would probably default to /usr/local/bin, /usr/local/libexec (or sbin for non-BSDers), /usr/local/lib, /usr/local/etc, /usr/local/var.
I'm really looking for compatibility issues that anyone has or any suggestions for improvement. I plan to make a proposal out of this eventually. Please make sure you cc me at home (matt@zigg.com) on replies.
Toby Dickenson tdickenson@geminidataloggers.com
On Tue, Nov 06, 2001 at 10:14:48AM +0000, Toby Dickenson wrote:
You have Products under the same grouping as the main zope source. This makes it difficult for different instances to run different products, or different versions of the same product.
You know, I realized that in the shower this morning. Funny what ideas come to you there, eh? :-) Actually what we really need is per-instance Products directories. That way both global and per-instance products can be installed. VARDIR/zope/INSTANCE/Products is probably the most sane place.
ETCDIR/Products: contains symlinks into ZopeProducts for each product that this instance should use
Actually, you don't have to do this, even now! :-) Check out http://www.zope.org/Members/4am/instancehome. I use this setup currently with my OpenBSD Zope port.
I think Extensions need to be in the ETCDIR too
VARDIR/zope/INSTANCE/Extensions, I'm thinking. The other thing to go into INSTANCE that is not currently addressed by instancehome is probably python code that isn't a Product or an Extension, for example ZTUtils and TAL from ZPT.
On Tue, 6 Nov 2001 07:03:49 -0500, Matt Behrens <matt@zigg.com> wrote:
On Tue, Nov 06, 2001 at 10:14:48AM +0000, Toby Dickenson wrote:
Matt: VARDIR/zope/INSTANCE/Products is probably the most sane place.
Toby: ETCDIR/Products: contains symlinks into ZopeProducts
Matt: VARDIR/zope/INSTANCE/Extensions, I'm thinking. The other thing to
Toby I think Extensions need to be in the ETCDIR too
Do you really want products and extensions in VARDIR? To me they feel more like configuration, and less like data. My preference: XXX/etc/zope/INSTANCE/Products : containing symlinks to XXX/lib/zope/AllZopeProducts : containing products My second preference: XXX/lib/zope/INSTANCE/Products : containing products But I really dont like: XXX/var/zope/INSTANCE/Products : containing products
I use this setup currently with my OpenBSD Zope port.
Me too. Toby Dickenson tdickenson@geminidataloggers.com
Toby Dickenson wrote:
Do you really want products and extensions in VARDIR? To me they feel more like configuration, and less like data.
My preference:
XXX/etc/zope/INSTANCE/Products : containing symlinks to XXX/lib/zope/AllZopeProducts : containing products
My second preference:
XXX/lib/zope/INSTANCE/Products : containing products
But I really dont like:
XXX/var/zope/INSTANCE/Products : containing products
I think the biggest problem with this setup is that installation of additional products should be able to be done without permission to modify the base installation. There is work afoot to make products installable TTW, too, so the running user must have permission to install his own products for this to work properly. Given this, VARDIR is really the only hierarchy we can count on to be writable at all (BINDIR/LIBDIR should be writable only at OS-level package installation time, and ETCDIR can be locked down by the sysadmin for normal operation). I got to thinking a little bit more, too, regarding running multiple versions of Zope on the same system (hell, I do it!), plus an oversight with ETCDIR... Also, I missed import and doc entirely :-) So, revised: BINDIR/ zopectl zopeinst LIBEXECDIR/ pcgi-wrapper LIBDIR/ zope/ VERSION/ (lib/python contents) Products Extensions ZServer inst utilities SHAREDIR/ doc/ zope/ *.txt zope/ import/ (import contents) ETCDIR/ zope/ INSTANCE/ access inituser config VARDIR/ zope/ INSTANCE/ db/ run/ gadfly Zope.cgi I've run out of horizontal room, but VARDIR/zope/INSTANCE/db/ is the home of Data.fs and friends; VARDIR/zope/INSTANCE/run/ is the home of the pid files. -- Matt Behrens <matt.behrens@kohler.com> System Analyst, Baker Furniture
It's an excellent idea. I only had time to skim over it but I don't see anything wrong with your proposed layout. You should definitely make a proposal. seb * Behrens Matt - Grand Rapids <Matt.Behrens@Kohler.Com> [011105 20:38]:
I'm experimenting with a few ideas for a "clean distribution" of Zope; i.e. one that builds on the INSTANCE_HOME concept to produce a production-ready layout for UNIX-like systems. My hope is that it will someday make life a hell of a lot easier for Zope packagers (such as myself) as well as end-users. I'd love for the Zope install script to create this layout by default, and am certainly willing to dedicate code to the effort.
One little note: Only people with their noses deep down in Unix will understand concepts like 'etc' and 'var'. Remoddeling the distribution may be a good idea, but it should then be made more obvious to everybody. It must be possible to find names that are easy to understand even for Windows-damaged people like me. Maybe call var 'data' instead? In /etc the suggestions so far only seem to want to put inituser, access and config, which would leave that empty for many, or most, installations. :-) And also, I too would want to put all the standard stuff that comes with Zope into $HOME/lib, but have a $HOME/products or somesuch for user installed products.
Lennart Regebro wrote:
One little note: Only people with their noses deep down in Unix will understand concepts like 'etc' and 'var'. Remoddeling the distribution may be a good idea, but it should then be made more obvious to everybody. It must be possible to find names that are easy to understand even for Windows-damaged people like me. Maybe call var 'data' instead?
I think my idea here is to make a UNIX installation of Zope look more like any other respectable UNIX program. This is really an issue for documentation. OTOH, don't worry about being forced to run it this way -- my quest is just to make it the default for a new install, not a requirement. I think running Zope inside the source tree is valuable for development (i.e. non-production) environments and I'd like to keep that ability.
In /etc the suggestions so far only seem to want to put inituser, access and config, which would leave that empty for many, or most, installations. :-)
You would always have a config, actually. You'd need it, so your z2.py startup options could be specified (the start/stop scripts would be replaced by zopectl start and zopectl stop, much like a lot of other programs that run as daemons these days).
And also, I too would want to put all the standard stuff that comes with Zope into $HOME/lib, but have a $HOME/products or somesuch for user installed products.
The idea here is to certainly permit you to do that (VARDIR/zope/INSTANCE/Products, or some such), but when products are packaged by the OS packager or perhaps by the new product installation system, they get installed into LIBDIR/zope/site-products and are symlinked into VARDIR/zope/INSTANCE/Products by the installation scripts. (Toby, the more coffee I have, the better I like the symlink idea.) :-) That way you can also pick and choose the products you want out of the machine installation into each of your instances. -- Matt Behrens <matt.behrens@kohler.com> System Analyst, Baker Furniture
participants (6)
-
Behrens Matt - Grand Rapids -
Lennart Regebro -
Matt Behrens -
Matt Behrens -
seb bacon -
Toby Dickenson