Re: [Zope] Same product in multiple instances automatically?
Kirk Strauser wrote: OH! I see what you mean. $ZOPE is defined in $INSTANCE/etc/zope.conf. In my case, it's set to /usr/local/www/Zope, and there's a Products directory inside it. FreeBSD installs new products to that directory. I hadn't noticed that there was also a /usr/local/www/Zope/lib/python/Products directory with different contents. *sigh* Yet another OS distro that "does the wrong thing"... If I were you, I'd just build from source ;-) Problem solved, although I'm not sure why /usr/local/www/Zope/Products exists in the first place; maybe it was meant to be a symlink to ./lib/python/Products? It's probably just bogus, it seems that most of the OS distros have warts like this, like the debian one's very low limit on response length :-( cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
Paul Winkler wrote: JCC wrote: If you want your instances to use Products from some other directory, name it here. The one possible "gotcha", dating back to the Zope 2.6.x / CMF 1.3.x days, is that CMF (and Plone) would not work properly if installed somewhere other than $INSTANCE_HOME/Products. The skins directories wouldn't work for some reason having to do with DirectoryView.py. I don't remember the details and hopefully this has been fixed since then; I haven't tried that particular scenario in a looong time. I remember this being fixed a long long time ago... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
On Friday 09 September 2005 15:59, J Cameron Cooper wrote: > Thus was created the instance/software distinction. Everything needed to > run Zope goes into the SOFTWARE_HOME; everything that defines a specific > distinct instance goes into INSTANCE_HOME (3rd party Products, Data.fs, > config files, logs, etc). ...and on FreeBSD, everything you install through the ports system gets put in a second directory inside SOFTWARE_HOME, distinct from the ones in INSTANCE_HOME, and is not included in running instances by default (regardless of what the 00readme-freebsd.txt in that directory says). In other words, it seems to be a FreeBSD bug rather than a Zope bug, and I'm off to file a problem report so that it'll hopefully get fixed. Thanks for the information that led to uncovering this little surprise. -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
Kirk Strauser wrote: On Friday 09 September 2005 15:37, J Cameron Cooper wrote: Anything in $SOFTWARE_HOME/lib/python/Products is available in any instances that use that SOFTWARE_HOME. You can see this quite easily by looking at the /Control_Panel/Products of an instance with nothing in its $INSTANCE_HOME/Products. I'm not sure what you mean by $ZOPE/Products. OH! I see what you mean. $ZOPE is defined in $INSTANCE/etc/zope.conf. In my case, it's set to /usr/local/www/Zope, and there's a Products directory inside it. FreeBSD installs new products to that directory. I hadn't noticed that there was also a /usr/local/www/Zope/lib/python/Products directory with different contents. Problem solved, although I'm not sure why /usr/local/www/Zope/Products exists in the first place; maybe it was meant to be a symlink to ./lib/python/Products? Anyway, I think I can figure it out from here. Thanks! In the beginning, there was only one Products directory; this was in lib/python/ along with the rest of the software defining Zope. If you wanted to have, say, two or more running distinct instances of Zope you would have to copy the whole thing. Plus, with third-party products co-mingling with default products, upgrading became difficult. Thus was created the instance/software distinction. Everything needed to run Zope goes into the SOFTWARE_HOME; everything that defines a specific distinct instance goes into INSTANCE_HOME (3rd party Products, Data.fs, config files, logs, etc). You can thus manage (move, upgrade, etc) instances and software separately, and don't have to copy the whole thing to run many instances. (On my dev box, I may have 4-5 running at one time, and maybe 20 total!) This should explain why there are two such directories, and how they should be used. Short version: do not touch the SOFTWARE_HOME after it has been installed. In fact, it might be a good idea to remove all write permissions from that directory. You can co-mingle, of course, but be aware of what advantages you are losing. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
On Friday 09 September 2005 15:37, J Cameron Cooper wrote: > Anything in $SOFTWARE_HOME/lib/python/Products is available in any > instances that use that SOFTWARE_HOME. You can see this quite easily by > looking at the /Control_Panel/Products of an instance with nothing in > its $INSTANCE_HOME/Products. > > I'm not sure what you mean by $ZOPE/Products. OH! I see what you mean. $ZOPE is defined in $INSTANCE/etc/zope.conf. In my case, it's set to /usr/local/www/Zope, and there's a Products directory inside it. FreeBSD installs new products to that directory. I hadn't noticed that there was also a /usr/local/www/Zope/lib/python/Products directory with different contents. Problem solved, although I'm not sure why /usr/local/www/Zope/Products exists in the first place; maybe it was meant to be a symlink to ./lib/python/Products? Anyway, I think I can figure it out from here. Thanks! -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
> On Friday 09 September 2005 13:56, J Cameron Cooper wrote: > >> I don't know why, either. That simply says that there is a default >> Products directory ($SOFTWARE_HOME/lib/python/Products), you can't get >> rid of it, and you shouldn't try to configure it here. > > The problem I'm having, though, is that those products don't seem to be > present in instances by default, which is the opposite of what I'd > expect. For example, I'd think that ZPsycopgDA would be available > inside each instance since it's present in $ZOPE/Products. I'm not sure what you mean by $ZOPE, since that's not an environment variable that means anything to Zope. > Yep. I'm wondering if I should create a $ZOPE/CommonProducts directory > and add "products $ZOPE/CommonProducts" to every instance's zope.conf. That's the idea, yeah. -PW ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
Kirk Strauser wrote: On Friday 09 September 2005 13:56, J Cameron Cooper wrote: I don't know why, either. That simply says that there is a default Products directory ($SOFTWARE_HOME/lib/python/Products), you can't get rid of it, and you shouldn't try to configure it here. The problem I'm having, though, is that those products don't seem to be present in instances by default, which is the opposite of what I'd expect. For example, I'd think that ZPsycopgDA would be available inside each instance since it's present in $ZOPE/Products. Anything in $SOFTWARE_HOME/lib/python/Products is available in any instances that use that SOFTWARE_HOME. You can see this quite easily by looking at the /Control_Panel/Products of an instance with nothing in its $INSTANCE_HOME/Products. I'm not sure what you mean by $ZOPE/Products. If you want your instances to use Products from some other directory, name it here. Yep. I'm wondering if I should create a $ZOPE/CommonProducts directory and add "products $ZOPE/CommonProducts" to every instance's zope.conf. You can. I typically do the symlink thing, as I can just copy them from an existing instance with a similar or identical setup. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
On Friday 09 September 2005 13:56, J Cameron Cooper wrote: > I don't know why, either. That simply says that there is a default > Products directory ($SOFTWARE_HOME/lib/python/Products), you can't get > rid of it, and you shouldn't try to configure it here. The problem I'm having, though, is that those products don't seem to be present in instances by default, which is the opposite of what I'd expect. For example, I'd think that ZPsycopgDA would be available inside each instance since it's present in $ZOPE/Products. > If you want your instances to use Products from some other directory, > name it here. Yep. I'm wondering if I should create a $ZOPE/CommonProducts directory and add "products $ZOPE/CommonProducts" to every instance's zope.conf. -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
JCC wrote: > If you want your instances to use Products from some other directory, > name it here. The one possible "gotcha", dating back to the Zope 2.6.x / CMF 1.3.x days, is that CMF (and Plone) would not work properly if installed somewhere other than $INSTANCE_HOME/Products. The skins directories wouldn't work for some reason having to do with DirectoryView.py. I don't remember the details and hopefully this has been fixed since then; I haven't tried that particular scenario in a looong time. -PW ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
Kirk Strauser wrote: On Friday 09 September 2005 10:25, Paul Winkler wrote: To be honest, I'd expect something a little different, namely that each instance would automatically pull in all the products in the site installation (like [1] and [2] above), but that doesn't seem to be the case. Is that a configuration issue, by design, or by accident? It's a configuration issue. Check out the "products" directive in zope.conf. The one that says: "The master Products directory exists in Zope's software home, and cannot be removed from the products path (and should not be added to it here)." ? That seemed to me that I shouldn't be adding /usr/local/www/Zope/Products to the search path, although I'm unsure of the reasons. I don't know why, either. That simply says that there is a default Products directory ($SOFTWARE_HOME/lib/python/Products), you can't get rid of it, and you shouldn't try to configure it here. The more interesting part is:: Name of a directory that contains additional Product packages. This directive may be used as many times as needed to add additional collections of products. Each directory identified will be added to the __path__ of the Products package. If you want your instances to use Products from some other directory, name it here. --jcc -- "Building Websites with Plone" http://plonebook.packtpub.com ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
On Friday 09 September 2005 10:25, Paul Winkler wrote: > > To be honest, I'd expect something a little different, namely that each > > instance would automatically pull in all the products in the site > > installation (like [1] and [2] above), but that doesn't seem to be the > > case. Is that a configuration issue, by design, or by accident? > > It's a configuration issue. Check out the "products" directive > in zope.conf. The one that says: "The master Products directory exists in Zope's software home, and cannot be removed from the products path (and should not be added to it here)." ? That seemed to me that I shouldn't be adding /usr/local/www/Zope/Products to the search path, although I'm unsure of the reasons. -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Same product in multiple instances automatically?
> To be honest, I'd expect something a little different, namely that each > instance would automatically pull in all the products in the site > installation (like [1] and [2] above), but that doesn't seem to be the > case. Is that a configuration issue, by design, or by accident? It's a configuration issue. Check out the "products" directive in zope.conf. -PW ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Same product in multiple instances automatically?
I'm running multiple instances of Zope 2.7.7 on a FreeBSD server. Each of those instances uses the same products, which I handle by making symlinks from the site's Products directory to that instance's Products directory: [1] /usr/local/www/Zope/Products/ZPsycopgDA [2] /usr/local/www/Zope/Products/exUserFolder /usr/local/www/Zope/instance1/Products/ZPsycopgDA -> [1] /usr/local/www/Zope/instance1/Products/exUserFolder -> [2] /usr/local/www/Zope/instance2/Products/ZPsycopgDA -> [1] /usr/local/www/Zope/instance2/Products/exUserFolder -> [2] ... To be honest, I'd expect something a little different, namely that each instance would automatically pull in all the products in the site installation (like [1] and [2] above), but that doesn't seem to be the case. Is that a configuration issue, by design, or by accident? It's not that I mind making a symlink here or there, but it's one more thing to remember when making a new instance and just "feels wrong". -- Kirk Strauser The Day Companies ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )