do not fail when generating documentation
[slapos.git] / stack / resilient / pbsready.cfg.in
1 [buildout]
2
3 parts =
4   resiliency
5   logrotate
6   logrotate-entry-cron
7   logrotate-entry-equeue
8   cron
9   cron-entry-logrotate
10   sshkeys-authority
11   dropbear-server
12   sshkeys-dropbear
13   dropbear-server-pbs-authorized-key
14   notifier
15
16
17 #----------------
18 #--
19 #-- Creation of all needed directories.
20
21 [rootdirectory]
22 recipe = slapos.cookbook:mkdirectory
23 etc = $${buildout:directory}/etc
24 var = $${buildout:directory}/var
25 srv = $${buildout:directory}/srv
26 bin = $${buildout:directory}/bin
27
28 [basedirectory]
29 recipe = slapos.cookbook:mkdirectory
30 log = $${rootdirectory:var}/log
31 services = $${rootdirectory:etc}/service
32 run = $${rootdirectory:var}/run
33 script = $${rootdirectory:etc}/script
34 backup = $${rootdirectory:srv}/backup
35 promises = $${rootdirectory:etc}/promise
36 services = $${rootdirectory:etc}/service
37 cache = $${rootdirectory:var}/cache
38 notifier = $${rootdirectory:etc}/notifier
39
40 [directory]
41 recipe = slapos.cookbook:mkdirectory
42 backup = $${basedirectory:backup}/$${slap-parameter:namebase}
43 ssh = $${rootdirectory:etc}/ssh/
44 sshkeys = $${rootdirectory:srv}/sshkeys
45 notifier-feeds = $${basedirectory:notifier}/feeds
46 notifier-callbacks = $${basedirectory:notifier}/callbacks
47 cron-entries = $${rootdirectory:etc}/cron.d
48 crontabs = $${rootdirectory:etc}/crontabs
49 cronstamps = $${rootdirectory:etc}/cronstamps
50 logrotate-entries = $${rootdirectory:etc}/logrotate.d
51 logrotate-backup = $${basedirectory:backup}/logrotate
52
53 #----------------
54 #--
55 #-- Deploy cron.
56
57 [cron]
58 recipe = slapos.cookbook:cron
59 dcrond-binary = ${dcron:location}/sbin/crond
60 cron-entries = $${directory:cron-entries}
61 crontabs = $${directory:crontabs}
62 cronstamps = $${directory:cronstamps}
63 catcher = $${cron-simplelogger:wrapper}
64 binary = $${basedirectory:services}/crond
65
66 [cron-simplelogger]
67 recipe = slapos.cookbook:simplelogger
68 wrapper = $${rootdirectory:bin}/cron_simplelogger
69 log = $${basedirectory:log}/crond.log
70
71
72 #----------------
73 #--
74 #-- Deploy logrotate.
75
76 [cron-entry-logrotate]
77 <= cron
78 recipe = slapos.cookbook:cron.d
79 name = logrotate
80 frequency = 0 0 * * *
81 command = $${logrotate:wrapper}
82
83 [logrotate]
84 recipe = slapos.cookbook:logrotate
85 # Binaries
86 logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
87 gzip-binary = ${gzip:location}/bin/gzip
88 gunzip-binary = ${gzip:location}/bin/gunzip
89 # Directories
90 wrapper = $${rootdirectory:bin}/logrotate
91 conf = $${rootdirectory:etc}/logrotate.conf
92 logrotate-entries = $${directory:logrotate-entries}
93 backup = $${directory:logrotate-backup}
94 state-file = $${rootdirectory:srv}/logrotate.status
95
96 [logrotate-entry-mariadb]
97 <= logrotate
98 recipe = slapos.cookbook:logrotate.d
99 name = mariadb
100 log = $${mariadb:error-log}
101 frequency = daily
102 rotate-num = 30
103 post = $${mariadb:logrotate-post}
104 sharedscripts = true
105 notifempty = true
106 create = true
107
108 [logrotate-entry-cron]
109 <= logrotate
110 recipe =slapos.cookbook:logrotate.d
111 name = crond
112 log = $${cron-simplelogger:log}
113 frequency = daily
114 rotate-num = 30
115 notifempty = true
116 create = true
117
118 [logrotate-entry-equeue]
119 <= logrotate
120 recipe = slapos.cookbook:logrotate.d
121 name = equeue
122 log = $${equeue:log}
123 frequency = daily
124 rotate-num = 30
125
126
127 #----------------
128 #--
129 #-- Resiliency script for the bully algorithm
130
131 [resiliency]
132 # If enable-bully-service is true, the scripts will be run automatically.
133 # If false, they can be run with bin/bullly for all the PBSReady instances.
134 enable-bully-service = False
135 recipe = slapos.cookbook:addresiliency
136 wrapper-bully = bully
137 wrapper-takeover = takeover
138 services = $${basedirectory:services}
139 bin = $${rootdirectory:bin}
140 etc = $${rootdirectory:etc}
141
142
143 #----------------
144 #--
145 #-- Sets up an rdiff-backup server (with a dropbear server for ssh)
146
147 [rdiff-backup-server]
148 recipe = slapos.cookbook:pbs
149 client = false
150 path = $${directory:backup}
151 wrapper = $${rootdirectory:bin}/rdiffbackup-server
152 rdiffbackup-binary = ${buildout:bin-directory}/rdiff-backup
153
154
155 #----------------
156 #--
157 #-- Set up the equeue and notifier.
158
159 [equeue]
160 recipe = slapos.cookbook:equeue
161 socket = $${basedirectory:run}/equeue.sock
162 log = $${basedirectory:log}/equeue.log
163 database = $${rootdirectory:srv}/equeue.db
164 wrapper = $${basedirectory:services}/equeue
165 equeue-binary = ${buildout:bin-directory}/equeue
166
167 # notifier.notify adds the [exporter, notifier] to the execution queue
168 # notifier.notify.callback sets up a callback
169 [notifier]
170 recipe = slapos.cookbook:notifier
171 feeds = $${directory:notifier-feeds}
172 callbacks = $${directory:notifier-callbacks}
173 id-file = $${rootdirectory:etc}/notifier.id
174 equeue-socket = $${equeue:socket}
175 host = $${slap-network-information:global-ipv6}
176 port = 65534
177 wrapper = $${basedirectory:services}/notifier
178 server-binary = ${buildout:bin-directory}/pubsubserver
179 notifier-binary = ${buildout:bin-directory}/pubsubnotifier
180
181
182 #----------------
183 #--
184 #-- sshkeys
185
186 [sshkeys-directory]
187 recipe = slapos.cookbook:mkdirectory
188 requests = $${directory:sshkeys}/requests
189 keys = $${directory:sshkeys}/keys
190
191 [sshkeys-authority]
192 recipe = slapos.cookbook:sshkeys_authority
193 request-directory = $${sshkeys-directory:requests}
194 keys-directory = $${sshkeys-directory:keys}
195 wrapper = $${basedirectory:services}/sshkeys_authority
196 keygen-binary = ${dropbear:location}/bin/dropbearkey
197
198 [sshkeys-dropbear]
199 <= sshkeys-authority
200 recipe = slapos.cookbook:sshkeys_authority.request
201 name = dropbear
202 type = rsa
203 executable = $${dropbear-server:wrapper}
204 public-key = $${dropbear-server:rsa-keyfile}.pub
205 private-key = $${dropbear-server:rsa-keyfile}
206 wrapper = $${basedirectory:services}/sshd
207
208
209 #----------------
210 #--
211 #-- Dropbear.
212
213 [dropbear-server]
214 recipe = slapos.cookbook:dropbear
215 host = $${slap-network-information:global-ipv6}
216 port = 2222
217 home = $${directory:ssh}
218 wrapper = $${rootdirectory:bin}/raw_sshd
219 shell = $${rdiff-backup-server:wrapper}
220 rsa-keyfile = $${directory:ssh}/server_key.rsa
221 dropbear-binary = ${dropbear:location}/sbin/dropbear
222
223 [dropbear-server-pbs-authorized-key]
224 <= dropbear-server
225 recipe = slapos.cookbook:dropbear.add_authorized_key
226 key = $${slap-parameter:authorized-key}
227
228
229 #----------------
230 #--
231 #-- Conncetion informations to re-use.
232 # XXX-Cedric: when "aggregation" system is done in libslap, directly publish.
233 [resilient-publish-connection-parameter]
234 recipe = slapos.cookbook:publish
235 ssh-public-key = $${sshkeys-dropbear:public-key-value}
236 ssh-url = ssh://nobody@[$${dropbear-server:host}]:$${dropbear-server:port}/$${rdiff-backup-server:path}
237 ip = $${slap-network-information:global-ipv6}