Zope 2.12 from buildout with no funky recipes: success!
Hi All, I've committed the tiny change necessary to be able to run Zope 2.12 from a (relatively) simple buildout. I've attached the buildout.cfg, zope.conf.in and zeo.conf.in I've been using to this message. It would be nicer if the initialization bits could go away and the Zope2 egg could declare the runzope and zopectl scripts. Where do the runzeo and zeoctl entry points belong? I'd guess in the ZODB egg, but would they get built when specifying just the zope2 egg? The above may be problematic: how would we pass the location of zeo.conf and zope.conf to the start scripts? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Chris Withers wrote:
I've attached the buildout.cfg, zope.conf.in and zeo.conf.in I've been using to this message.
*sigh*, lets try that again... I should also point out that, until a new Zope2 egg is released, you'll need to have a Zope 2 trunk checkout as a develop egg (called Zope in the attached buildout.cfg) in order for the control scripts generated to work. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk [buildout] parts = zeo zeo.conf instance zope.conf test extends = http://svn.zope.org/*checkout*/Zope/tags/2.12.0a1/versions-zope2.cfg versions = versions zeo_address = 127.0.0.1:2000 develop = Zope [versions] Zope2 = [zeo] recipe = zc.recipe.egg interpreter = py eggs = ZODB3 entry-points= runzeo=ZEO.runzeo:main zeoctl=ZEO.zeoctl:main scripts = runzeo zeoctl initialization = import sys sys.argv[1:1] = ['-C','${buildout:directory}/etc/zeo.conf'] [instance] recipe = zc.recipe.egg interpreter = py eggs = zope2 entry-points= runzope=Zope2.Startup.run:run zopectl=Zope2.Startup.zopectl:main scripts = runzope zopectl initialization = import sys sys.argv[1:1] = ['-C','${buildout:directory}/etc/zope.conf'] [zeo.conf] recipe = collective.recipe.template input = etc/zeo.conf.in output = etc/zeo.conf [zope.conf] recipe = collective.recipe.template input = etc/zope.conf.in output = etc/zope.conf %define INSTANCE ${buildout:directory} <zeo> address ${buildout:zeo_address} </zeo> <filestorage 1> path $INSTANCE/var/Data.fs </filestorage> <eventlog> level info <logfile> path $INSTANCE/log/zeo.log </logfile> </eventlog> <runner> python $INSTANCE/bin/py program $INSTANCE/bin/runzeo daemon true forever false backoff-limit 10 directory $INSTANCE default-to-interactive true </runner> %define INSTANCE ${buildout:directory} instancehome $INSTANCE python $INSTANCE/bin/py <eventlog> level info <logfile> path $INSTANCE/log/zope.log level info </logfile> </eventlog> <http-server> address 8080 </http-server> <zodb_db main> <zeoclient> server ${buildout:zeo_address} storage 1 var $INSTANCE/var </zeoclient> mount-point / </zodb_db> <zodb_db temporary> <temporarystorage> name temporary storage for sessioning </temporarystorage> mount-point /temp_folder container-class Products.TemporaryFolder.TemporaryContainer </zodb_db>
Chris Withers wrote:
Chris Withers wrote:
I've attached the buildout.cfg, zope.conf.in and zeo.conf.in I've been using to this message.
*sigh*, lets try that again...
I should also point out that, until a new Zope2 egg is released, you'll need to have a Zope 2 trunk checkout as a develop egg (called Zope in the attached buildout.cfg) in order for the control scripts generated to work.
Your buildout is missing the [test] part. I got it working with this buildout: [buildout] parts = zeo zeo.conf instance zope.conf test extends = http://svn.zope.org/*checkout*/Zope/tags/2.12.0a1/versions-zope2.cfg versions = versions zeo_address = 127.0.0.1:2000 develop = src/Zope2 [versions] Zope2 = [zeo] recipe = zc.recipe.egg interpreter = py eggs = ZODB3 entry-points= runzeo=ZEO.runzeo:main zeoctl=ZEO.zeoctl:main scripts = runzeo zeoctl initialization = import sys sys.argv[1:1] = ['-C','${buildout:directory}/etc/zeo.conf'] [instance] recipe = zc.recipe.egg interpreter = py eggs = zope2 entry-points= runzope=Zope2.Startup.run:run zopectl=Zope2.Startup.zopectl:main scripts = runzope zopectl initialization = import sys sys.argv[1:1] = ['-C','${buildout:directory}/etc/zope.conf'] [zeo.conf] recipe = collective.recipe.template input = etc/zeo.conf.in output = etc/zeo.conf [zope.conf] recipe = collective.recipe.template input = etc/zope.conf.in output = etc/zope.conf [test] recipe = zc.recipe.testrunner eggs = ${instance:eggs} defaults = ['-v', '--exit-with-status', '--auto-color', '--auto-progress'] I also had to create the log and var directories. Martin -- Author of `Professional Plone Development`, a book for developers who want to work with Plone. See http://martinaspeli.net/plone-book
Martin Aspeli wrote:
Your buildout is missing the [test] part.
Indeed, it's not supposed to be in the instance buildout, I was just doing some testing ;-)
I also had to create the log and var directories.
Yep, I'd imagine a downloadable "skeleton" for the instance which included the folders and the buildout. I even have dreams of writing a package that will take an empty skeleton and turn it into a single .py file that when run with create an "instance home" with a buildout .cfg in it, the .conf files, and the right folders to "just work" once bin/buildout has been run. I'll let you know if I ever make progress on that ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
participants (2)
-
Chris Withers -
Martin Aspeli