Zope 2.7 on CD-ROM
Hi, I'm trying to create a ZOPE cdrom (not a bootable one) to run demo under windows or linux. I found the following doc http://www.zope.org/Members/jens/docs/zope_on_cdrom but it reffers to old versions. Everything relative to the ZODB still works but I have a problem with zope.conf. The INSTANCE and ZOPE variable are hard coded and I didn't found a way to dynamically change them, nothing on the command-line nor in the environment variable. Did I miss something ? I could create a temporary file contaning a goog configuration, but there may be a better solution. thx.
Sébastien Georget wrote:
The INSTANCE and ZOPE variable are hard coded and I didn't found a way to dynamically change them, nothing on the command-line nor in the environment variable. Did I miss something ?
I think you're supposed to customise Zope.conf to your needs, that said, I may be misunderstanding the question... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote:
Sébastien Georget wrote:
The INSTANCE and ZOPE variable are hard coded and I didn't found a way to dynamically change them, nothing on the command-line nor in the environment variable. Did I miss something ?
I think you're supposed to customise Zope.conf to your needs, that said, I may be misunderstanding the question...
Chris
The problem occurs if I want to distribute my demo on a cdrom, I don't know the value of INSTANCE so I can't set it in zope.conf. For example under windows it could be : d:\instance, e:\instance, ... I can solve the problem setting INSTANCE to \instance Under linux it could be : /mnt/cdrom/instance, /cdrom/instance, ... Does anybody have a solution ?
Sebastien Georget wrote:
The problem occurs if I want to distribute my demo on a cdrom, I don't know the value of INSTANCE so I can't set it in zope.conf. For example under windows it could be : d:\instance, e:\instance, ... I can solve the problem setting INSTANCE to \instance
Under linux it could be : /mnt/cdrom/instance, /cdrom/instance, ... Does anybody have a solution ?
Can't you make the instance home relative to the start script, eg: ../instance? If not, you can set the instance home by passing it through to the startup. You'd have to fiddle I cant remember the exact syntax but you can use -X to set any variable eg: runzope -X "debug-mode=on" To have zope run in debug mode. So in theory if you could figure out in the starting script what drive the starting script was run on you could pass that through to your instance home. -- Andy McKay ClearWind Consulting http://www.clearwind.ca
Andy McKay a écrit :
Sebastien Georget wrote:
Under linux it could be : /mnt/cdrom/instance, /cdrom/instance, ... Does anybody have a solution ?
Can't you make the instance home relative to the start script, eg: ../instance? I tried it but it seems to break some products (PortalTransforms/utils.py/skins_dir).
If not, you can set the instance home by passing it through to the startup. You'd have to fiddle I cant remember the exact syntax but you can use -X to set any variable eg:
runzope -X "debug-mode=on" I will look at this, thanks.
Hi Sebastien, we did creat a Zope 2.7 running from a CD Rom. You have to do a couple of things: - do not use any drive letters neither in zope.conf nor in runzope.bat Just use sommething like \zope_instance\bin\... - you have to set the database to read only - turn off all logging - and then we had to patch Zope so it does not actually tries to write anything to the databse. otherwise some of the programs still were not working. I can send you our patches and zope.conf I you like to Robert On Friday 26 March 2004 19:05, Sébastien Georget wrote:
Andy McKay a écrit :
Sebastien Georget wrote:
Under linux it could be : /mnt/cdrom/instance, /cdrom/instance, ... Does anybody have a solution ?
Can't you make the instance home relative to the start script, eg: ../instance? I tried it but it seems to break some products (PortalTransforms/utils.py/skins_dir).
If not, you can set the instance home by passing it through to the startup. You'd have to fiddle I cant remember the exact syntax but you can use -X to set any variable eg:
runzope -X "debug-mode=on" I will look at this, thanks.
_______________________________________________ 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 )
robert wrote:
Hi Sebastien, we did creat a Zope 2.7 running from a CD Rom. You have to do a couple of things: - do not use any drive letters neither in zope.conf nor in runzope.bat Just use sommething like \zope_instance\bin\... - you have to set the database to read only - turn off all logging - and then we had to patch Zope so it does not actually tries to write anything to the databse. otherwise some of the programs still were not working.
I can send you our patches and zope.conf I you like to
Robert
Thanks, but too late :) I managed to create my demo CD. I wrote a small howto eplaining how I have done : http://georget.sebastien.free.fr/projets/zope/zope-on-cdrom.en.html
Sébastien Georget wrote at 2004-3-25 20:36 +0100:
I'm trying to create a ZOPE cdrom (not a bootable one) to run demo under windows or linux. I found the following doc http://www.zope.org/Members/jens/docs/zope_on_cdrom but it reffers to old versions. Everything relative to the ZODB still works but I have a problem with zope.conf.
The INSTANCE and ZOPE variable are hard coded and I didn't found a way to dynamically change them, nothing on the command-line nor in the environment variable. Did I miss something ?
I posted ZConfig extensions to "zope-dev@zope.org" that allows configuration files to reference the "environment". It is not sure that these extension will ever land in the official ZConfig code. Usually, ZC is very reluctant to include enhancements... -- Dieter
Dieter Maurer wrote:
I posted ZConfig extensions to "zope-dev@zope.org" that allows configuration files to reference the "environment".
It is not sure that these extension will ever land in the official ZConfig code. Usually, ZC is very reluctant to include enhancements...
I mentioned somethign similar to Fred, his response was along the lines of "over my dead bleeding corpse" ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (5)
-
Andy McKay -
Chris Withers -
Dieter Maurer -
robert -
Sébastien Georget