Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joanne Hugé
slapos
Commits
44a20bdf
Commit
44a20bdf
authored
Nov 16, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comments
parent
9e118e67
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
47 additions
and
40 deletions
+47
-40
stack/lamp/buildout.cfg
stack/lamp/buildout.cfg
+1
-1
stack/lamp/template-resilient.cfg.in
stack/lamp/template-resilient.cfg.in
+3
-3
stack/resilient/buildout.cfg
stack/resilient/buildout.cfg
+19
-8
stack/resilient/pbsready-export.cfg.in
stack/resilient/pbsready-export.cfg.in
+4
-2
stack/resilient/pbsready-import.cfg.in
stack/resilient/pbsready-import.cfg.in
+2
-1
stack/resilient/pbsready.cfg.in
stack/resilient/pbsready.cfg.in
+9
-7
stack/resilient/template-replicated.cfg.in
stack/resilient/template-replicated.cfg.in
+9
-18
No files found.
stack/lamp/buildout.cfg
View file @
44a20bdf
...
...
@@ -97,7 +97,7 @@ context = key templateapache instance-apache-php:output
import-list = file parts template-parts:destination
file replicated template-replicated:destination
md5sum =
d96890f5cde5a6db3a71926002000082
md5sum =
5151295af3994499e2be6d68938787d3
mode = 0644
...
...
stack/lamp/template-resilient.cfg.in
View file @
44a20bdf
...
...
@@ -44,8 +44,8 @@ slave = false
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = ${directory:sshkeys}/requests
/
keys = ${directory:sshkeys}/keys
/
requests = ${directory:sshkeys}/requests
keys = ${directory:sshkeys}/keys
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
...
...
@@ -168,5 +168,5 @@ sla-instance_guid = ${request-pull-backup-server:instance_guid}
[directory]
ssh = ${rootdirectory:etc}/ssh
/
ssh = ${rootdirectory:etc}/ssh
sshkeys = ${rootdirectory:srv}/sshkeys
stack/resilient/buildout.cfg
View file @
44a20bdf
[buildout]
parts =
#Templates needed to setup automatic backup
pbsready
pbsready-import
pbsready-export
template-replicated
template-parts
#Frozen is the state used to not destroy a broken instance's content
instance-frozen
template-resilient
#----------------
#--
#-- Profiles needed to setup automated backup and recovery.
#--
[pbsready]
# Common parts for pbsready-import and pbsready-export.
# Provides rdiff-backup, notification queue, ssh authentication,
# dropbear server, and the bully script.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready.cfg.in
output = ${buildout:directory}/pbsready.cfg
md5sum =
d001110c9860b31ca8b01d9a37b8ecfa
md5sum =
0e6a383849840419ce767325f5a368a4
mode = 0644
[pbsready-import]
# An import instance has an importer script, which is called
# by the parent PBS instance when the dump content is propagated.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-import.cfg.in
output = ${buildout:directory}/pbsready-import.cfg
md5sum =
0c63d9202426c257576c14113614942d
md5sum =
eda0c1574d8991f4f9e08e3707c2b04b
mode = 0644
[pbsready-export]
# An export instance has an exporter script, and communicates
# to parent PBS instances to deliver the exported dump.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/pbsready-export.cfg.in
output = ${buildout:directory}/pbsready-export.cfg
md5sum =
a82c4551efdb000dc1db18adb5b64754
md5sum =
dd56f9c74e580475a17a9afb1d220390
mode = 0644
[template-pull-backup]
...
...
@@ -45,7 +53,7 @@ mode = 0644
[template-replicated]
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-replicated.cfg.in
md5sum = 1
40beeb9193e0580e42a6004b9e3821f
md5sum = 1
017d919dbf41904f04f5c17dcb574fa
mode = 0644
destination = ${buildout:directory}/template-replicated.cfg.in
...
...
@@ -57,6 +65,9 @@ mode = 0644
destination = ${buildout:directory}/template-parts.cfg.in
[instance-frozen]
# When an instance is detected as broken, its software type is changed to "frozen".
# On the next run of slapgrid-cp, the buildout profile is replaced by instance-frozen.cfg,
# which will run without removing any content because it raises an error.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-frozen.cfg.in
output = ${buildout:directory}/instance-frozen.cfg
...
...
stack/resilient/pbsready-export.cfg.in
View file @
44a20bdf
...
...
@@ -7,8 +7,9 @@ parts += cron-entry-backup
[urls]
notification-id = http://[$${notifier:host}]:$${notifier:port}/get/$${notifier-exporter:name}
#notify launches executable, and once it's done, notifies the pull-backup-servers.
[notifier-exporter]
# notifier.notify launches an (exporter) executable, and when finished,
# notifies the the pull-backup-servers.
<= notifier
recipe = slapos.cookbook:notifier.notify
name = exporter
...
...
@@ -17,8 +18,9 @@ executable = $${exporter:wrapper}
wrapper = $${rootdirectory:bin}/exporter
notify = $${slap-parameter:notify}
#adds the exporter to cron
[cron-entry-backup]
# Schedule the periodic database dump.
# Through notifications, this triggers (one or more) incremental backups on PBS instances.
<= cron
recipe = slapos.cookbook:cron.d
name = backup
...
...
stack/resilient/pbsready-import.cfg.in
View file @
44a20bdf
...
...
@@ -7,8 +7,9 @@ parts += import-on-notification
[urls]
notification-url = http://[$${notifier:host}]:$${notifier:port}/notify
#Launches callback, when a notification is received
[import-on-notification]
# notifier.callback runs a script when a notification (sent by a parent PBS)
# is received
<= notifier
recipe = slapos.cookbook:notifier.callback
on-notification-id = $${slap-parameter:on-notification}
...
...
stack/resilient/pbsready.cfg.in
View file @
44a20bdf
...
...
@@ -24,17 +24,17 @@ parts =
#-- Creation of all needed directories.
[basedirectory]
script = $${rootdirectory:etc}/script
/
services = $${rootdirectory:etc}/run
/
cache = $${rootdirectory:var}/cache
/
notifier = $${rootdirectory:etc}/notifier
/
script = $${rootdirectory:etc}/script
services = $${rootdirectory:etc}/run
cache = $${rootdirectory:var}/cache
notifier = $${rootdirectory:etc}/notifier
[directory]
backup = $${basedirectory:backup}/$${slap-parameter:namebase}
ssh = $${rootdirectory:etc}/ssh/
sshkeys = $${rootdirectory:srv}/sshkeys
notifier-feeds = $${basedirectory:notifier}/feeds
/
notifier-callbacks = $${basedirectory:notifier}/callbacks
/
notifier-feeds = $${basedirectory:notifier}/feeds
notifier-callbacks = $${basedirectory:notifier}/callbacks
script = $${basedirectory:script}
...
...
@@ -43,11 +43,13 @@ script = $${basedirectory:script}
#-- 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"
recipe = slapos.cookbook:addresiliency
script = $${basedirectory:script}
run = $${basedirectory:services}
bin = $${rootdirectory:bin}
# XXX don't run bully automatically, yet
#----------------
...
...
stack/resilient/template-replicated.cfg.in
View file @
44a20bdf
...
...
@@ -16,13 +16,10 @@ name = {{namebase}}0
return = url ssh-public-key ssh-url notification-id ip
config = number script wrapper authorized-key notify ip-list namebase
config-number = 0
config-authorized-key = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}{% endfor %}
config-notify = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-notification-url}{% endfor %}
config-ip-list =
config-number = 0
{% for id in range(1,nbbackup|int) %}
...
...
@@ -37,14 +34,13 @@ software-url = ${slap-connection:software-release-url}
software-type = {{typeimport}}
return = url ssh-public-key ssh-url notification-url ip
config = number script wrapper authorized-key on-notification ip-list namebase
pbs-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-push
config = number script wrapper authorized-key on-notification ip-list namebase
config-number = {{id}}
config-authorized-key = ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}
config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url}${:pbs-notification-id}
pbs-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-push
config-ip-list =
config-number = {{id}}
{% endfor %}
...
...
@@ -60,19 +56,15 @@ config-ip-list = ${request-{{namebase}}:connection-ip}{% for j in range(1,nbback
recipe = slapos.cookbook:request
name = {{namebase}}0
config = number script wrapper authorized-key notify ip-list namebase
software-url = ${slap-connection:software-release-url}
software-type = {{typeexport}}
return = url ssh-public-key ssh-url notification-id ip
config = number script wrapper authorized-key notify ip-list namebase
config-number = 0
config-authorized-key = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}{% endfor %}
config-notify = {% for id in range(1,nbbackup|int) %} ${request-pbs-{{namebase}}-{{id}}:connection-notification-url}{% endfor %}
config-number=0
{% for id in range(1,nbbackup|int) %}
[request-{{namebase}}-pseudo-replicating-{{id}}-2]
<= slap-connection
...
...
@@ -87,14 +79,13 @@ software-url = ${slap-connection:software-release-url}
software-type = {{typeimport}}
return = url ssh-public-key ssh-url notification-url
config = number script wrapper authorized-key on-notification ip-list namebase
pbs-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-push
config = number script wrapper authorized-key on-notification ip-list namebase
config-number = {{id}}
config-authorized-key = ${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}
config-on-notification = ${request-pbs-{{namebase}}-{{id}}:connection-feeds-url}${:pbs-notification-id}
pbs-notification-id = ${slap-connection:computer-id}-${slap-connection:partition-id}-{{namebase}}-push
config-number = {{id}}
{% endfor %}
...
...
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