buildout.cfg 3.81 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 24
  rdiff-backup
  dash
25

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

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

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

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

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

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

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

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

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

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

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

99 100 101 102 103 104 105
# 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

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

112 113 114 115 116 117
##################
# Monitor element
#

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

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

128 129 130
[rdiff-backup]
eggs =
  ${rdiff-backup-build-1.3.4:egg}
131

132
[versions]
133 134 135
# 1.3.4nxd4 is invalid version string, thus pached version string is not '1.3.4nxd2+SlapOSPatched001'
# but '1.3.4nxd4-SlapOSPatched001'.
rdiff-backup = 1.3.4nxd4-SlapOSPatched001