[Erp5-report] r32510 luke - in /erp5/trunk/buildout: ./ recipes/erp5.recipe.standaloneinsta...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Feb 12 17:33:48 CET 2010
Author: luke
Date: Fri Feb 12 17:33:47 2010
New Revision: 32510
URL: http://svn.erp5.org?rev=32510&view=rev
Log:
- merge instance and site creation in one step
Work in progress.
Zope and site are controlled by common set of parameters. It is understood that
Zeo will behave slightly different but in case of standalone instance it is
better to not have two different steps to do one thing. Zeo support shall be
plugged between creation of instance and site itself.
Modified:
erp5/trunk/buildout/development.cfg
erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/setup.py
erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/__init__.py
erp5/trunk/buildout/zope-instance/buildout.cfg
Modified: erp5/trunk/buildout/development.cfg
URL: http://svn.erp5.org/erp5/trunk/buildout/development.cfg?rev=32510&r1=32509&r2=32510&view=diff
==============================================================================
--- erp5/trunk/buildout/development.cfg [utf8] (original)
+++ erp5/trunk/buildout/development.cfg [utf8] Fri Feb 12 17:33:47 2010
@@ -8,14 +8,15 @@
products-other
products-erp5
zope-instance
- create_erp5_site
# use locally developed recipe
-develop = recipes/erp5.recipe.standaloneinstance
[zope-instance]
recipe = erp5.recipe.standaloneinstance
+zope2-location = ${software_definition:zope_software}
+debug-mode = on
location = ${buildout:var-directory}/zope-instance
+
eggs +=
ipdb
pysvn
@@ -31,7 +32,6 @@
${products-other:location}
${products-development:location}
-[create_erp5_site]
# modify this to reflect your local mysql configuration
# Format:
# database[@host[:port]] [user [password [unix_socket]]]
@@ -39,11 +39,10 @@
mysql_database_name = development_site
erp5_sql_connection_string = ${:mysql_database_name}@${configuration:mysql_host}:${configuration:mysql_port} root
+bt5-path = ${bt5-erp5:location}
bt5 =
erp5_base
erp5_forge
-# for now override control script
-control-script = ${zope-instance:location}/bin/zopectl
[requirements]
binary +=
Modified: erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/setup.py
URL: http://svn.erp5.org/erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/setup.py?rev=32510&r1=32509&r2=32510&view=diff
==============================================================================
--- erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/setup.py [utf8] (original)
+++ erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/setup.py [utf8] Fri Feb 12 17:33:47 2010
@@ -32,6 +32,7 @@
namespace_packages = ['erp5', 'erp5.recipe'],
install_requires = [
'erp5.recipe.zope2instance',
+ 'erp5.recipe.createsite',
],
zip_safe=False,
entry_points = {'zc.buildout': ['default = %s:Recipe' % name]},
Modified: erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/__init__.py
URL: http://svn.erp5.org/erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/__init__.py?rev=32510&r1=32509&r2=32510&view=diff
==============================================================================
--- erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/__init__.py [utf8] (original)
+++ erp5/trunk/buildout/recipes/erp5.recipe.standaloneinstance/src/erp5/recipe/standaloneinstance/__init__.py [utf8] Fri Feb 12 17:33:47 2010
@@ -2,16 +2,20 @@
import os
import zc.buildout
import erp5.recipe.zope2instance
+import erp5.recipe.createsite
-class Recipe(erp5.recipe.zope2instance.Recipe):
+class Recipe(erp5.recipe.zope2instance.Recipe, erp5.recipe.createsite.Recipe):
def __init__(self, buildout, name, options):
+ standalone_location = options.get('location')
+ if not standalone_location:
+ raise zc.buildout.UserError('Location have to be specified')
+ options['control-script'] = options.get('control-script',
+ os.path.join(standalone_location, 'bin', 'zopectl'))
+ erp5.recipe.createsite.Recipe.__init__(self, buildout, name, options)
self.egg = zc.recipe.egg.Egg(buildout, options['recipe'], options)
self.buildout, self.options, self.name = buildout, options, name
self.zope2_location = options.get('zope2-location', '')
- standalone_location = options.get('location')
- if not standalone_location:
- raise zc.buildout.UserError('Location have to be specified')
options['bin-directory'] = os.path.join(standalone_location, 'bin')
options['scripts'] = '' # suppress script generation.
options['file-storage'] = options.get('file-storage',
@@ -30,10 +34,17 @@
assert relative_paths == 'false'
def install(self):
+ # initalise zope instance
erp5.recipe.zope2instance.Recipe.install(self)
+
+ # initialise ERP5 part
+ erp5.recipe.createsite.Recipe.install(self)
# we return nothing, as this is totally standalone installation
return []
def build_zope_conf(self):
# preparation for further fixing (chroot everything inside instance, etc)
erp5.recipe.zope2instance.Recipe.build_zope_conf(self)
+
+ def update(self):
+ return erp5.recipe.zope2instance.Recipe.update(self)
Modified: erp5/trunk/buildout/zope-instance/buildout.cfg
URL: http://svn.erp5.org/erp5/trunk/buildout/zope-instance/buildout.cfg?rev=32510&r1=32509&r2=32510&view=diff
==============================================================================
--- erp5/trunk/buildout/zope-instance/buildout.cfg [utf8] (original)
+++ erp5/trunk/buildout/zope-instance/buildout.cfg [utf8] Fri Feb 12 17:33:47 2010
@@ -1,11 +1,15 @@
# adapt https://svn.erp5.org/repos/public/experimental/erp5.buildout
+[buildout]
+develop = recipes/erp5.recipe.standaloneinstance
+parts = zope-instance
+
[zope-instance]
-recipe = erp5.recipe.zope2instance
+depends = ${create_mysql_database:command}
+recipe = erp5.recipe.standaloneinstance
zope2-location = ${software_definition:zope_software}
user = zope:zope
http-address = 18080
debug-mode = off
-control-script = zopectl
#Only for zope2.8
default-zpublisher-encoding =
zope-conf-additional=
@@ -36,20 +40,15 @@
${products-erp5:location}
${products-other:location}
+portal_id = erp5
+bt5-path = ${bt5-erp5:location}
+bt5 =
+
[create_mysql_database]
# XXX: This have to be converted into recipe
recipe = plone.recipe.command
command =
- echo "CREATE DATABASE IF NOT EXISTS ${create_erp5_site:mysql_database_name} DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci" | ${buildout:data-bin-directory}/mysql -u root
-
-[create_erp5_site]
-depends = ${create_mysql_database:command}
-recipe = erp5.recipe.createsite
-portal_id = erp5
-control-script = ${zope-instance:control-script}
-user = ${zope-instance:user}
-bt5-path = ${bt5-erp5:location}
-bt5 =
+ echo "CREATE DATABASE IF NOT EXISTS ${zope-instance:mysql_database_name} DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci" | ${buildout:data-bin-directory}/mysql -u root
[bt5list]
recipe = erp5.recipe.genbt5list
More information about the Erp5-report
mailing list