Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
224c7d98
Commit
224c7d98
authored
Nov 16, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add option to enable/disable bully
parent
44a20bdf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
13 deletions
+15
-13
slapos/recipe/addresiliency/__init__.py
slapos/recipe/addresiliency/__init__.py
+7
-3
stack/resilient/buildout.cfg
stack/resilient/buildout.cfg
+1
-1
stack/resilient/pbsready.cfg.in
stack/resilient/pbsready.cfg.in
+7
-9
No files found.
slapos/recipe/addresiliency/__init__.py
View file @
224c7d98
...
...
@@ -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
,
...
...
stack/resilient/buildout.cfg
View file @
224c7d98
...
...
@@ -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]
...
...
stack/resilient/pbsready.cfg.in
View file @
224c7d98
...
...
@@ -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}
#----------------
#--
#--
r
esiliency script for the bully algorithm
#--
R
esiliency script for the bully algorithm
[resiliency]
#
XXX The bully script is not run automatically, at the moment
.
#
For testing, run bin/bu
lly 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/bul
lly 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}
#----------------
#--
#--
s
ets up an rdiff-backup server (with a dropbear server for ssh)
#--
S
ets up an rdiff-backup server (with a dropbear server for ssh)
[urls]
ssh-public-key = $${sshkeys-dropbear:public-key-value}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment