buildout.cfg 3.52 KB
Newer Older
1
[buildout]
2
extends =
3
  buildout.hash.cfg
4
  ../../component/bash/buildout.cfg
5
  ../../component/dropbear/buildout.cfg
6
  ../../component/openssh/buildout.cfg
7
  ../../component/rdiff-backup/buildout.cfg
8
  ../../component/rsync/buildout.cfg
9
  ../monitor/buildout.cfg
10 11

parts =
12
  pbs-recipe-egg
13 14 15
  pbsready
  pbsready-import
  pbsready-export
16
  notifier-feed-promise-template
17 18
  template-replicated
  template-parts
19
  instance-frozen
20

21 22
  # needed tools for resiliency
  gzip
23
  dash
24

25
[pbs-recipe-egg]
26
recipe = zc.recipe.egg
27 28
eggs =
  collective.recipe.template
29

Marco Mariani's avatar
Marco Mariani committed
30 31 32 33 34
#----------------
#--
#-- Profiles needed to setup automated backup and recovery.
#--

35
[pbsready]
Marco Mariani's avatar
Marco Mariani committed
36 37
# Common parts for pbsready-import and pbsready-export.
# Provides rdiff-backup, notification queue, ssh authentication,
38
# dropbear server, and the takeover script.
39
recipe = slapos.recipe.template
40 41
url = ${:_profile_base_location_}/pbsready.cfg.in
output = ${buildout:directory}/pbsready.cfg
42 43
mode = 0644

44
[pbsready-import]
Marco Mariani's avatar
Marco Mariani committed
45 46
# An import instance has an importer script, which is called
# by the parent PBS instance when the dump content is propagated.
47
recipe = slapos.recipe.template
48 49
url = ${:_profile_base_location_}/pbsready-import.cfg.in
output = ${buildout:directory}/pbsready-import.cfg
50 51
mode = 0644

52
[pbsready-export]
Marco Mariani's avatar
Marco Mariani committed
53 54
# An export instance has an exporter script, and communicates
# to parent PBS instances to deliver the exported dump.
55
recipe = slapos.recipe.build:download
56
url = ${:_profile_base_location_}/pbsready-export.cfg.in
57
filename = pbsready-export.cfg.in
58 59 60 61
mode = 0644

[template-pull-backup]
recipe = slapos.recipe.template
62 63
url = ${:_profile_base_location_}/instance-pull-backup.cfg.in
output = ${buildout:directory}/instance-pull-backup.cfg
64 65 66
mode = 0644

[template-replicated]
67
recipe = slapos.recipe.build:download
68
url = ${:_profile_base_location_}/template-replicated.cfg.in
69 70 71
mode = 0644

[template-parts]
72
recipe = slapos.recipe.build:download
73
url = ${:_profile_base_location_}/template-parts.cfg.in
74 75
mode = 0644

76 77 78 79 80 81 82
[template-resilient-templates]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}.in
output = ${buildout:directory}/${:filename}
mode = 0644
filename = template-resilient-templates.cfg

83
[instance-frozen]
Marco Mariani's avatar
Marco Mariani committed
84 85 86
# 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.
87
recipe = slapos.recipe.template
88 89
url = ${:_profile_base_location_}/instance-frozen.cfg.in
output = ${buildout:directory}/instance-frozen.cfg
90

91
[resilient-web-takeover-cgi-script-download]
92
recipe = slapos.recipe.build:download
93
url = ${:_profile_base_location_}/resilient-web-takeover-cgi-script.py.in
94
filename = resilient-web-takeover-cgi-script.py.in
95 96
mode = 0644

97 98 99 100 101 102 103
# Provide an empty wrapper
[template-wrapper]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/templates/wrapper.in
output = ${buildout:directory}/template-wrapper.cfg
mode = 0644

104 105 106
[notifier-feed-promise-template]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/templates/notifier-feed-promise.py.in
107
filename = notifier-feed-promise.py.in
108 109
mode = 0644

110 111 112 113 114 115
##################
# Monitor element
#

[template-monitor-check-resilient-feed]
recipe = hexagonit.recipe.download
116
ignore-existing = true
117 118 119 120 121
url = ${:_profile_base_location_}/templates/monitor-check-resilient-feed.in
download-only = true
filename = monitor-check-resilient-feed.in
mode = 0644

122 123 124
[exporter-default-configuration]
# Time in minutes to wait for the backup to finish
backup_wait_time = 10