Commit c28aba3c authored by Łukasz Nowak's avatar Łukasz Nowak

- remove Zeo configuration from global dict


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44135 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent baa447ba
...@@ -51,11 +51,6 @@ CONFIG = dict( ...@@ -51,11 +51,6 @@ CONFIG = dict(
mysql_user='user', mysql_user='user',
mysql_test_database='test_erp5', mysql_test_database='test_erp5',
mysql_test_user='test_user', mysql_test_user='test_user',
# Zeo
zodb_data_prefix='zodb',
zodb_root_filename='root.fs',
zeo_port=22001,
zeo_storagename='root',
# Kumofs # Kumofs
kumo_manager_port=13101, kumo_manager_port=13101,
kumo_server_port=13201, kumo_server_port=13201,
...@@ -101,15 +96,14 @@ class Recipe(BaseSlapRecipe): ...@@ -101,15 +96,14 @@ class Recipe(BaseSlapRecipe):
self.installConversionServer() self.installConversionServer()
self.installMysqlServer() self.installMysqlServer()
self.installERP5() self.installERP5()
zodb_dir = os.path.join(self.data_root_directory, zodb_dir = os.path.join(self.data_root_directory, 'zodb')
CONFIG['zodb_data_prefix'])
self._createDirectory(zodb_dir) self._createDirectory(zodb_dir)
CONFIG['zodb_root_path'] = os.path.join(zodb_dir, zodb_root_path = os.path.join(zodb_dir, 'root.fs')
CONFIG['zodb_root_filename'])
url_list = [] url_list = []
if 'activity_node_amount' in self.parameter_dict or \ if 'activity_node_amount' in self.parameter_dict or \
'login_node_amount' in self.parameter_dict: 'login_node_amount' in self.parameter_dict:
self.zeo_address, self.zeo_storagename = self.installZeo() self.zeo_address, self.zeo_storagename = self.installZeo(
self.getLocalIPv4Address(), 22001, 'root', zodb_root_path)
common_kw = dict( common_kw = dict(
zeo_address=self.zeo_address, zeo_address=self.zeo_address,
zeo_storagename=self.zeo_storagename, zeo_storagename=self.zeo_storagename,
...@@ -417,22 +411,24 @@ class Recipe(BaseSlapRecipe): ...@@ -417,22 +411,24 @@ class Recipe(BaseSlapRecipe):
return [] return []
def installZeo(self): def installZeo(self, ip, port, name, path):
CONFIG.update( config = dict(
zeo_ip=ip,
zeo_port=port,
zeo_storagename=name,
zeo_event_log=os.path.join(self.log_directory, 'zeo.log'), zeo_event_log=os.path.join(self.log_directory, 'zeo.log'),
zeo_ip=self.getLocalIPv4Address(), zeo_pid=os.path.join(self.run_directory, 'zeo.pid'),
zeo_zodb=CONFIG['zodb_root_path'], zeo_zodb=path
zeo_pid=os.path.join(self.run_directory, 'zeo.pid')
) )
zeo_conf_path = self.createConfigurationFile('zeo.conf', zeo_conf_path = self.createConfigurationFile('zeo.conf',
self.substituteTemplate(self.getTemplateFilename('zeo.conf.in'), CONFIG)) self.substituteTemplate(self.getTemplateFilename('zeo.conf.in'), config))
self.path_list.append(zeo_conf_path) self.path_list.append(zeo_conf_path)
wrapper = zc.buildout.easy_install.scripts([('zeo', __name__ + '.execute', wrapper = zc.buildout.easy_install.scripts([('zeo', __name__ + '.execute',
'execute')], self.ws, sys.executable, self.wrapper_directory, arguments=[ 'execute')], self.ws, sys.executable, self.wrapper_directory, arguments=[
self.options['runzeo_binary'].strip(), '-C', zeo_conf_path] self.options['runzeo_binary'].strip(), '-C', zeo_conf_path]
)[0] )[0]
self.path_list.append(wrapper) self.path_list.append(wrapper)
return '%s:%s' % (CONFIG['zeo_ip'], CONFIG['zeo_port']), CONFIG['zeo_storagename'] return '%s:%s' % (config['zeo_ip'], config['zeo_port']), config['zeo_storagename']
def installZope(self, ip, port, name, zeo_address=None, zeo_storagename=None, def installZope(self, ip, port, name, zeo_address=None, zeo_storagename=None,
zodb_root_path=None, with_timerservice=False, timeserver_interval=5): zodb_root_path=None, with_timerservice=False, timeserver_interval=5):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment