Revert "mysql-url etc. don't exist when this template is evaluated."
[slapos.git] / software / erp5 / snippet-master.cfg
1 #############################
2 #
3 # Instanciate zeo
4 #
5 # zeo-id -- local id of the requested zeo (1,2,3,...)
6 #
7 # zeo-port -- ip port to use to run the process
8 #
9 # storage_list -- string with list of all resquested storage
10 #    Example: event_module person_module
11 #
12 #############################
13 [buildout]
14 parts =
15   logrotate
16   cron
17   cron-entry-logrotate
18   certificate-authority
19   erp5-certificate-authority
20   tidstorage
21   cron-entry-tidstorage-backup
22   logrotate-entry-tidstorage
23   binary-link
24   erp5-update
25   %(part_list)s
26
27 eggs-directory = ${buildout:eggs-directory}
28 develop-eggs-directory = ${buildout:develop-eggs-directory}
29 offline = true
30
31 [tidstorage]
32 recipe = slapos.cookbook:tidstorage
33 known-tid-storage-identifier-dict = %(known_tid_storage_identifier_dict)s
34 base-url = http://$${%(haproxy_section)s:ip}:$${%(haproxy_section)s:port}/%%s/serialize
35 configuration-path = $${rootdirectory:etc}/tidstorage.py
36 ip = $${slap-network-information:local-ipv4}
37 port = 6001
38 timestamp-file-path = $${directory:tidstorage}/repozo_tidstorage_timestamp.log
39 logfile-name = $${basedirectory:log}/tidstorage.log
40 pidfile-name = $${basedirectory:run}/tidstorage.pid
41 status-file = $${directory:tidstorage}/tidstorage.tid
42 tidstorage-repozo-binary = ${buildout:bin-directory}/tidstorage_repozo
43 tidstoraged-binary = ${buildout:bin-directory}/tidstoraged
44 repozo-binary = ${buildout:bin-directory}/repozo
45 tidstorage-wrapper = $${basedirectory:services}/tidstoraged
46 repozo-wrapper = $${buildout:bin-directory}/tidstorage-repozo
47
48 [cron-entry-tidstorage-backup]
49 <= cron
50 recipe = slapos.cookbook:cron.d
51 name = tidstorage
52 frequency = 0 0 * * *
53 command = $${tidstorage:repozo-wrapper}
54
55 [logrotate-entry-tidstorage]
56 <= logrotate
57 recipe = slapos.cookbook:logrotate.d
58 name = tidstorage
59 log = $${tidstorage:logfile-name}
60 post = ${buildout:bin-directory}/killpidfromfile $${tidstorage:pidfile-name} SIGHUP
61
62 [directory]
63 recipe = slapos.cookbook:mkdirectory
64 cron-entries = $${rootdirectory:etc}/cron.d
65 crontabs = $${rootdirectory:etc}/crontabs
66 cronstamps = $${rootdirectory:etc}/cronstamps
67 logrotate-backup = $${basedirectory:backup}/logrotate
68 logrotate-entries = $${rootdirectory:etc}/logrotate.d
69
70 [cron]
71 recipe = slapos.cookbook:cron
72 dcrond-binary = ${dcron:location}/sbin/crond
73 cron-entries = $${directory:cron-entries}
74 crontabs = $${directory:crontabs}
75 cronstamps = $${directory:cronstamps}
76 catcher = $${cron-simplelogger:wrapper}
77 binary = $${basedirectory:services}/crond
78
79 [cron-simplelogger]
80 recipe = slapos.cookbook:simplelogger
81 wrapper = $${rootdirectory:bin}/cron_simplelogger
82 log = $${basedirectory:log}/cron.log
83
84 [cron-entry-logrotate]
85 <= cron
86 recipe = slapos.cookbook:cron.d
87 name = logrotate
88 frequency = 0 0 * * *
89 command = $${logrotate:wrapper}
90
91 # rest of parts are candidates for some generic stuff
92
93 [logrotate]
94 recipe = slapos.cookbook:logrotate
95 # Binaries
96 logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
97 gzip-binary = ${gzip:location}/bin/gzip
98 gunzip-binary = ${gzip:location}/bin/gunzip
99 # Directories
100 wrapper = $${rootdirectory:bin}/logrotate
101 conf = $${rootdirectory:etc}/logrotate.conf
102 logrotate-entries = $${directory:logrotate-entries}
103 backup = $${directory:logrotate-backup}
104 state-file = $${rootdirectory:srv}/logrotate.status
105
106 [zeo-instance-entry-common]
107 recipe = slapos.cookbook:zeo
108 ip = $${slap-network-information:local-ipv4}
109 binary-path = ${buildout:bin-directory}/runzeo
110
111 [erp5-certificate-authority]
112 recipe = slapos.cookbook:certificate_authority
113 openssl-binary = ${openssl:location}/bin/openssl
114 ca-dir = $${directory:erp5-ca-dir}
115 requests-directory = $${erp5-cadirectory:requests}
116 wrapper = $${basedirectory:services}/erp5-ca
117 ca-private = $${erp5-cadirectory:private}
118 ca-certs = $${erp5-cadirectory:certs}
119 ca-newcerts = $${erp5-cadirectory:newcerts}
120 ca-crl = $${erp5-cadirectory:crl}
121
122 [erp5-cadirectory]
123 recipe = slapos.cookbook:mkdirectory
124 requests = $${directory:erp5-ca-dir}/requests
125 private = $${directory:erp5-ca-dir}/private
126 certs = $${directory:erp5-ca-dir}/certs
127 newcerts = $${directory:erp5-ca-dir}/newcerts
128 crl = $${directory:erp5-ca-dir}/crl
129
130 [certificate-authority]
131 recipe = slapos.cookbook:certificate_authority
132 openssl-binary = ${openssl:location}/bin/openssl
133 ca-dir = $${directory:ca-dir}
134 requests-directory = $${cadirectory:requests}
135 wrapper = $${basedirectory:services}/ca
136 ca-private = $${cadirectory:private}
137 ca-certs = $${cadirectory:certs}
138 ca-newcerts = $${cadirectory:newcerts}
139 ca-crl = $${cadirectory:crl}
140
141 [cadirectory]
142 recipe = slapos.cookbook:mkdirectory
143 requests = $${directory:ca-dir}/requests
144 private = $${directory:ca-dir}/private
145 certs = $${directory:ca-dir}/certs
146 newcerts = $${directory:ca-dir}/newcerts
147 crl = $${directory:ca-dir}/crl
148
149 [rootdirectory]
150 recipe = slapos.cookbook:mkdirectory
151 etc = $${buildout:directory}/etc
152 var = $${buildout:directory}/var
153 srv = $${buildout:directory}/srv
154 bin = $${buildout:directory}/bin
155 tmp = $${buildout:directory}/tmp
156
157 [basedirectory]
158 recipe = slapos.cookbook:mkdirectory
159 log = $${rootdirectory:var}/log
160 services = $${rootdirectory:etc}/run
161 run = $${rootdirectory:var}/run
162 backup = $${rootdirectory:srv}/backup
163
164 [directory]
165 recipe = slapos.cookbook:mkdirectory
166 tidstorage = $${rootdirectory:srv}/tidstorage
167 zodb = $${rootdirectory:srv}/zodb
168 zodb-backup = $${basedirectory:backup}/zodb
169 instance = $${rootdirectory:srv}/erp5shared
170 instance-etc = $${:instance}/etc
171 apache-conf = $${rootdirectory:etc}/apache
172 instance-etc-package-include = $${:instance}/etc/package-include
173 # because of bug in slapos.recipe.template keys are lowercased
174 instance-document = $${:instance}/Document
175 instance-propertysheet = $${:instance}/PropertySheet
176 instance-products = $${:instance}/Products
177 instance-extensions = $${:instance}/Extensions
178 instance-constraint = $${:instance}/Constraint
179 instance-import = $${:instance}/import
180 instance-lib = $${:instance}/lib
181 instance-tests = $${:instance}/tests
182 erp5-ca-dir = $${rootdirectory:srv}/erp5-ssl
183 ca-dir = $${rootdirectory:srv}/ssl
184 cron-entries = $${rootdirectory:etc}/cron.d
185 crontabs = $${rootdirectory:etc}/crontabs
186 cronstamps = $${rootdirectory:etc}/cronstamps
187 logrotate-backup = $${basedirectory:backup}/logrotate
188 logrotate-entries = $${rootdirectory:etc}/logrotate.d
189
190 [binary-link]
191 recipe = slapos.cookbook:symbolic.link
192 target-directory = $${rootdirectory:bin}
193 link-binary = 
194   ${coreutils:location}/bin/basename
195   ${coreutils:location}/bin/cat
196   ${coreutils:location}/bin/cp
197   ${coreutils:location}/bin/ls
198   ${coreutils:location}/bin/tr
199   ${coreutils:location}/bin/uname
200   ${git:location}/bin/git
201   ${graphviz:location}/bin/dot
202   ${grep:location}/bin/grep
203   ${imagemagick:location}/bin/convert
204   ${imagemagick:location}/bin/identify
205   ${mariadb:location}/bin/mysql
206   ${mariadb:location}/bin/mysqldump
207   ${pdftk:location}/bin/pdftk
208   ${sed:location}/bin/sed
209   ${tesseract:location}/bin/tesseract
210   ${w3m:location}/bin/w3m
211   ${poppler:location}/bin/pdfinfo
212   ${poppler:location}/bin/pdftotext
213   ${poppler:location}/bin/pdftohtml
214
215 [erp5-update]
216 recipe = slapos.cookbook:erp5.update
217
218 # Configuration
219 url = http://$${%(zope_section)s:user}:$${%(zope_section)s:password}@$${%(zope_section)s:ip}:$${%(zope_section)s:port}/
220 mysql-url = %(mysql-url)s
221 kumofs-url = %(kumofs-url)s
222 memcached-url = %(memcached-url)s
223 cloudooo-url = %(cloudooo-url)s
224 site-id = %(site_id)s
225 openssl-binary = ${openssl:location}/bin/openssl
226 cadir-path = $${erp5-certificate-authority:ca-dir}
227
228 # Paths
229 update-wrapper = $${basedirectory:services}/erp5-update
230
231 # Defaults
232 configurator-bt5-list = erp5_full_text_myisam_catalog erp5_configurator_standard erp5_configurator_maxma_demo erp5_configurator_ung erp5_configurator_ung erp5_configurator_run_my_doc
233 bt5-repository-list = $${%(zope_section)s:bt5-repository-list}