Commit 31483f38 authored by Łukasz Nowak's avatar Łukasz Nowak

Move execute to librecipe.

parent 6e9166d1
...@@ -312,7 +312,7 @@ class Recipe(BaseSlapRecipe): ...@@ -312,7 +312,7 @@ class Recipe(BaseSlapRecipe):
self._createDirectory(cron_d) self._createDirectory(cron_d)
self._createDirectory(crontabs) self._createDirectory(crontabs)
wrapper = zc.buildout.easy_install.scripts([('crond', wrapper = zc.buildout.easy_install.scripts([('crond',
__name__ + '.execute', 'execute')], self.ws, sys.executable, 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.wrapper_directory, arguments=[ self.wrapper_directory, arguments=[
self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs, self.options['dcrond_binary'].strip(), '-s', cron_d, '-c', crontabs,
'-t', timestamps, '-f', '-l', '5', '-M', catcher] '-t', timestamps, '-f', '-l', '5', '-M', catcher]
...@@ -417,7 +417,7 @@ class Recipe(BaseSlapRecipe): ...@@ -417,7 +417,7 @@ class Recipe(BaseSlapRecipe):
conversion_server_dict)) conversion_server_dict))
self.path_list.append(config_file) self.path_list.append(config_file)
self.path_list.extend(zc.buildout.easy_install.scripts([(name, self.path_list.extend(zc.buildout.easy_install.scripts([(name,
__name__ + '.execute', 'execute_with_signal_translation')], self.ws, 'slapos.recipe.librecipe.execute', 'execute_with_signal_translation')], self.ws,
sys.executable, self.wrapper_directory, sys.executable, self.wrapper_directory,
arguments=[self.options['ooo_paster'].strip(), 'serve', config_file])) arguments=[self.options['ooo_paster'].strip(), 'serve', config_file]))
return { return {
...@@ -441,7 +441,7 @@ class Recipe(BaseSlapRecipe): ...@@ -441,7 +441,7 @@ class Recipe(BaseSlapRecipe):
config)) config))
self.path_list.append(haproxy_conf_path) self.path_list.append(haproxy_conf_path)
wrapper = zc.buildout.easy_install.scripts([('haproxy_%s' % name, wrapper = zc.buildout.easy_install.scripts([('haproxy_%s' % name,
__name__ + '.execute', 'execute')], self.ws, sys.executable, 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.wrapper_directory, arguments=[ self.wrapper_directory, arguments=[
self.options['haproxy_binary'].strip(), '-f', haproxy_conf_path] self.options['haproxy_binary'].strip(), '-f', haproxy_conf_path]
)[0] )[0]
...@@ -547,7 +547,7 @@ class Recipe(BaseSlapRecipe): ...@@ -547,7 +547,7 @@ class Recipe(BaseSlapRecipe):
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_%s' % zeo_number, wrapper = zc.buildout.easy_install.scripts([('zeo_%s' % zeo_number,
__name__ + '.execute', 'execute')], self.ws, sys.executable, 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.wrapper_directory, arguments=[ self.wrapper_directory, arguments=[
self.options['runzeo_binary'].strip(), '-C', zeo_conf_path] self.options['runzeo_binary'].strip(), '-C', zeo_conf_path]
)[0] )[0]
...@@ -593,7 +593,7 @@ class Recipe(BaseSlapRecipe): ...@@ -593,7 +593,7 @@ class Recipe(BaseSlapRecipe):
))) )))
# TID server # TID server
tidstorage_server = zc.buildout.easy_install.scripts([('tidstoraged', tidstorage_server = zc.buildout.easy_install.scripts([('tidstoraged',
__name__ + '.execute', 'execute')], self.ws, sys.executable, 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.wrapper_directory, arguments=[ self.wrapper_directory, arguments=[
self.options['tidstoraged_binary'], '--nofork', '--config', self.options['tidstoraged_binary'], '--nofork', '--config',
tidstorage_config])[0] tidstorage_config])[0]
...@@ -604,7 +604,7 @@ class Recipe(BaseSlapRecipe): ...@@ -604,7 +604,7 @@ class Recipe(BaseSlapRecipe):
# repozo wrapper # repozo wrapper
tidstorage_repozo = zc.buildout.easy_install.scripts([('tidstorage_repozo', tidstorage_repozo = zc.buildout.easy_install.scripts([('tidstorage_repozo',
__name__ + '.execute', 'execute')], self.ws, sys.executable, 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.bin_directory, arguments=[ self.bin_directory, arguments=[
self.options['tidstorage_repozo_binary'], '--config', tidstorage_config, self.options['tidstorage_repozo_binary'], '--config', tidstorage_config,
'--repozo', self.options['repozo_binary'], '-z'])[0] '--repozo', self.options['repozo_binary'], '-z'])[0]
...@@ -692,7 +692,7 @@ class Recipe(BaseSlapRecipe): ...@@ -692,7 +692,7 @@ class Recipe(BaseSlapRecipe):
self.path_list.append(zope_conf_path) self.path_list.append(zope_conf_path)
# Create init script # Create init script
wrapper = zc.buildout.easy_install.scripts([(name, wrapper = zc.buildout.easy_install.scripts([(name,
__name__ + '.execute', 'execute')], self.ws, sys.executable, 'slapos.recipe.librecipe.execute', 'execute')], self.ws, sys.executable,
self.wrapper_directory, arguments=[ self.wrapper_directory, arguments=[
self.options['runzope_binary'].strip(), '-C', zope_conf_path] self.options['runzope_binary'].strip(), '-C', zope_conf_path]
)[0] )[0]
...@@ -907,13 +907,13 @@ class Recipe(BaseSlapRecipe): ...@@ -907,13 +907,13 @@ class Recipe(BaseSlapRecipe):
'--socket=%s' %mysql_conf['socket'].strip(), '--user=root'] '--socket=%s' %mysql_conf['socket'].strip(), '--user=root']
environment = dict(PATH='%s' % self.bin_directory) environment = dict(PATH='%s' % self.bin_directory)
innobackupex_incremental = zc.buildout.easy_install.scripts([( innobackupex_incremental = zc.buildout.easy_install.scripts([(
'innobackupex_incremental', __name__ + '.execute', 'executee')], 'innobackupex_incremental','slapos.recipe.librecipe.execute', 'executee')],
self.ws, sys.executable, self.bin_directory, arguments=[ self.ws, sys.executable, self.bin_directory, arguments=[
innobackupex_argument_list + ['--incremental'], innobackupex_argument_list + ['--incremental'],
environment])[0] environment])[0]
self.path_list.append(innobackupex_incremental) self.path_list.append(innobackupex_incremental)
innobackupex_full = zc.buildout.easy_install.scripts([('innobackupex_full', innobackupex_full = zc.buildout.easy_install.scripts([('innobackupex_full',
__name__ + '.execute', 'executee')], self.ws, 'slapos.recipe.librecipe.execute', 'executee')], self.ws,
sys.executable, self.bin_directory, arguments=[ sys.executable, self.bin_directory, arguments=[
innobackupex_argument_list, innobackupex_argument_list,
environment])[0] environment])[0]
......
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