Commit 224c7d98 authored by Marco Mariani's avatar Marco Mariani

add option to enable/disable bully

parent 44a20bdf
......@@ -37,7 +37,7 @@ class Recipe(GenericSlapRecipe):
def _install(self):
path_list = []
confpath = os.path.join(self.options['script'], 'bully.conf')
confpath = os.path.join(self.options['etc'], 'bully.conf')
ip_list = self.parameter_dict['ip-list']
print 'Creating bully configuration with ips : %s\n' % ip_list
......@@ -54,9 +54,13 @@ class Recipe(GenericSlapRecipe):
slap_connection = self.buildout['slap-connection']
# XXX use the bin directory, do not run automatically yet
if self.optionIsTrue('enable-bully-service', default=False):
wrapper_dir = self.options['services']
else:
wrapper_dir = self.options['bin']
wrapper = self.createPythonScript(
name=os.path.join(self.options['bin'], self.parameter_dict['wrapper']),
name=os.path.join(wrapper_dir, self.parameter_dict['wrapper']),
absolute_function='slapos.recipe.addresiliency.bully.run',
arguments={
'confpath': confpath,
......
......@@ -22,7 +22,7 @@ parts =
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready.cfg.in
output = ${buildout:directory}/pbsready.cfg
md5sum = 0e6a383849840419ce767325f5a368a4
md5sum = b6102416d000cae81dd2b06268946ea9
mode = 0644
[pbsready-import]
......
......@@ -24,7 +24,6 @@ parts =
#-- Creation of all needed directories.
[basedirectory]
script = $${rootdirectory:etc}/script
services = $${rootdirectory:etc}/run
cache = $${rootdirectory:var}/cache
notifier = $${rootdirectory:etc}/notifier
......@@ -35,26 +34,25 @@ ssh = $${rootdirectory:etc}/ssh/
sshkeys = $${rootdirectory:srv}/sshkeys
notifier-feeds = $${basedirectory:notifier}/feeds
notifier-callbacks = $${basedirectory:notifier}/callbacks
script = $${basedirectory:script}
#----------------
#--
#-- resiliency script for the bully algorithm
#-- Resiliency script for the bully algorithm
[resiliency]
# XXX The bully script is not run automatically, at the moment.
# For testing, run bin/bully for all the PBSReady instances.
# To enable automatic running, change the recipe and create the wrapper under "script" instead of "bin"
# If enable-bully-service is true, the scripts will be run automatically.
# If false, they can be run with bin/bullly for all the PBSReady instances.
enable-bully-service = False
recipe = slapos.cookbook:addresiliency
script = $${basedirectory:script}
run = $${basedirectory:services}
services = $${basedirectory:services}
bin = $${rootdirectory:bin}
etc = $${rootdirectory:etc}
#----------------
#--
#-- sets up an rdiff-backup server (with a dropbear server for ssh)
#-- Sets up an rdiff-backup server (with a dropbear server for ssh)
[urls]
ssh-public-key = $${sshkeys-dropbear:public-key-value}
......
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