instance-zope.cfg 8.38 KB
Newer Older
1 2
[buildout]
parts =
Łukasz Nowak's avatar
Łukasz Nowak committed
3 4
  certificate-authority
  publish-apache-zope-backend-connection-string
5
  zope-instance
Łukasz Nowak's avatar
Łukasz Nowak committed
6 7
  apache-zope-backend-instance
  ca-apache-zope-backend
8
  logrotate
9
  erp5-certificate-authority
10 11 12
  logrotate-entry-zope
  cron
  cron-entry-logrotate
13
  binary-link
14
  bt5-erp5-link
15 16 17 18 19

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true

Łukasz Nowak's avatar
Łukasz Nowak committed
20
[slap-parameter]
21 22
# By default, if no white list is specified, backend allows access to everyone
access-control-string = all
Łukasz Nowak's avatar
Łukasz Nowak committed
23

Łukasz Nowak's avatar
Łukasz Nowak committed
24
[publish-apache-zope-backend-connection-string]
Łukasz Nowak's avatar
Łukasz Nowak committed
25
recipe = slapos.cookbook:publish
Łukasz Nowak's avatar
Łukasz Nowak committed
26
url = https://$${zope-instance:user}:$${zope-instance:password}@[$${apache-zope-backend-instance:ip}]:$${apache-zope-backend-instance:port}
Łukasz Nowak's avatar
Łukasz Nowak committed
27
url-deadlock = $${:url}/$${zope-instance:deadlock-path}?$${zope-instance:deadlock-password}
28

Łukasz Nowak's avatar
Łukasz Nowak committed
29 30 31 32 33 34 35 36 37
[apache-zope-backend-instance]
recipe = slapos.cookbook:apache.zope.backend
backend = http://$${zope-instance:ip}:$${zope-instance:port}/
ip = $${slap-network-information:global-ipv6}
port = 16001
wrapper = $${rootdirectory:bin}/apache
key-file = $${directory:apache-conf}/apache.key
cert-file = $${directory:apache-conf}/apache.crt
configuration-file = $${directory:apache-conf}/apache.conf
38
access-control-string = $${slap-parameter:access-control-string}
Łukasz Nowak's avatar
Łukasz Nowak committed
39 40
pid-file = $${basedirectory:run}/apache.pid
lock-file = $${basedirectory:run}/apache.lock
41
ssl-session-cache = $${basedirectory:log}/apache-ssl-session-cache
Łukasz Nowak's avatar
Łukasz Nowak committed
42 43 44
error-log = $${basedirectory:log}/apache-error.log
access-log = $${basedirectory:log}/apache-access.log
apache-binary = ${apache:location}/bin/httpd
45
scheme = https
Łukasz Nowak's avatar
Łukasz Nowak committed
46 47 48 49 50 51 52 53 54

[ca-apache-zope-backend]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
key-file = $${apache-zope-backend-instance:key-file}
cert-file = $${apache-zope-backend-instance:cert-file}
executable = $${apache-zope-backend-instance:wrapper}
wrapper = $${basedirectory:services}/apache

55
[zope-instance]
56 57
recipe = slapos.cookbook:generic.zope

Łukasz Nowak's avatar
Łukasz Nowak committed
58 59 60 61 62
# XXX: products won't be needed as soon as all ERP5 (and products-deps)
# products will be eggified so then it will be possible to use them thanks to
# availability in software's eggs
products = ${products:list}

63 64 65 66 67 68
# Options
user = zope
port = 12001
ip = $${slap-network-information:local-ipv4}
zodb-cache-size = 5000
thread-amount = 4
69
zodb-path = $${directory:zodb}/main.fs
70 71 72
deadlock-path = /manage_debug_threads

# Paths
Łukasz Nowak's avatar
Łukasz Nowak committed
73
wrapper = $${basedirectory:services}/zope-development
74 75
instance-path = $${directory:instance}
instance-etc = $${directory:instance-etc}
76
instance-products = $${directory:instance-products}
Łukasz Nowak's avatar
Łukasz Nowak committed
77
bt5-repository = $${rootdirectory:var}/bt5_repository
78 79 80 81 82
tmp-path = $${rootdirectory:tmp}
bin-path = $${rootdirectory:bin}
site-zcml = $${:instance-etc}/site.zcml
logrotate-post = $${rootdirectory:bin}/zope-post-logrotate
pid-file = $${basedirectory:run}/zope.pid
Łukasz Nowak's avatar
Łukasz Nowak committed
83
lock-file = $${basedirectory:run}/zope.lock
84 85
event-log = $${basedirectory:log}/zope-event.log
z2-log = $${basedirectory:log}/zope-Z2.log
Łukasz Nowak's avatar
Łukasz Nowak committed
86
configuration-file = $${rootdirectory:etc}/zope.conf
Łukasz Nowak's avatar
Łukasz Nowak committed
87
inituser = $${:instance-path}/inituser
88 89 90
# Binary information
runzope-binary = ${buildout:bin-directory}/runzope

Łukasz Nowak's avatar
Łukasz Nowak committed
91 92 93
# Defaults
bt5-repository-list =

94 95 96 97
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
98
gzip-binary = ${gzip:location}/bin/gzip
99 100 101 102 103 104 105 106 107 108 109 110
gunzip-binary = ${gzip:location}/bin/gunzip
# Directories
wrapper = $${rootdirectory:bin}/logrotate
conf = $${rootdirectory:etc}/logrotate.conf
logrotate-entries = $${directory:logrotate-entries}
backup = $${directory:logrotate-backup}
state-file = $${rootdirectory:srv}/logrotate.status

[logrotate-entry-zope]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = zope
111
log = $${zope-instance:event-log} $${zope-instance:z2-log}
112 113
frequency = daily
rotate-num = 30
114
post = ${buildout:bin-directory}/killpidfromfile $${zope-instance:pid-file} SIGUSR2
115 116 117 118
sharedscripts = true
notifempty = true
create = true

Łukasz Nowak's avatar
Łukasz Nowak committed
119 120 121 122 123 124 125 126 127 128 129 130
[logrotate-entry-apache-zope-backend]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = zope
log = $${apache-zope-backend-instance:error-log} $${apache-zope-backend-instance:access-log}
frequency = daily
rotate-num = 30
post = ${buildout:bin-directory}/killpidfromfile $${apache-zope-backend-instance:pid-file} SIGUSR1
sharedscripts = true
notifempty = true
create = true

131 132 133 134 135 136
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = ${dcron:location}/sbin/crond
cron-entries = $${directory:cron-entries}
crontabs = $${directory:crontabs}
cronstamps = $${directory:cronstamps}
137
catcher = $${cron-simplelogger:wrapper}
138 139 140 141
binary = $${basedirectory:services}/crond

[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
142 143
wrapper = $${rootdirectory:bin}/cron_simplelogger
log = $${basedirectory:log}/cron.log
144 145 146 147 148 149 150 151

[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = $${logrotate:wrapper}

152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
[binary-link]
recipe = slapos.cookbook:symbolic.link
target-directory = $${rootdirectory:bin}
link-binary = 
  ${coreutils:location}/bin/basename
  ${coreutils:location}/bin/cat
  ${coreutils:location}/bin/cp
  ${coreutils:location}/bin/ls
  ${coreutils:location}/bin/tr
  ${coreutils:location}/bin/uname
  ${git:location}/bin/git
  ${graphviz:location}/bin/dot
  ${grep:location}/bin/grep
  ${imagemagick:location}/bin/convert
  ${imagemagick:location}/bin/identify
  ${mariadb:location}/bin/mysql
  ${mariadb:location}/bin/mysqldump
  ${pdftk:location}/bin/pdftk
  ${sed:location}/bin/sed
  ${tesseract:location}/bin/tesseract
  ${w3m:location}/bin/w3m
  ${poppler:location}/bin/pdfinfo
  ${poppler:location}/bin/pdftotext
  ${poppler:location}/bin/pdftohtml
Łukasz Nowak's avatar
Łukasz Nowak committed
176 177 178 179 180 181 182 183 184 185 186
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
ca-dir = $${directory:ca-dir}
requests-directory = $${cadirectory:requests}
wrapper = $${basedirectory:services}/ca
ca-private = $${cadirectory:private}
ca-certs = $${cadirectory:certs}
ca-newcerts = $${cadirectory:newcerts}
ca-crl = $${cadirectory:crl}

187 188 189 190 191 192 193
[bt5-erp5-link]
recipe = slapos.cookbook:symbolic.link
target-directory = $${basedirectory:bt5-erp5}
link-binary =
  ${erp5:location}/product/ERP5/bootstrap
  ${erp5:location}/bt5

Łukasz Nowak's avatar
Łukasz Nowak committed
194 195
[cadirectory]
recipe = slapos.cookbook:mkdirectory
Romain Courteaud's avatar
Romain Courteaud committed
196 197 198 199 200
requests = $${directory:ca-dir}/requests
private = $${directory:ca-dir}/private
certs = $${directory:ca-dir}/certs
newcerts = $${directory:ca-dir}/newcerts
crl = $${directory:ca-dir}/crl
Łukasz Nowak's avatar
Łukasz Nowak committed
201

202 203
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
Romain Courteaud's avatar
Romain Courteaud committed
204 205 206 207 208
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
209 210 211

[basedirectory]
recipe = slapos.cookbook:mkdirectory
Romain Courteaud's avatar
Romain Courteaud committed
212 213 214 215
log = $${rootdirectory:var}/log
services = $${rootdirectory:etc}/run
run = $${rootdirectory:var}/run
backup = $${rootdirectory:srv}/backup
216
bt5-erp5 = $${rootdirectory:var}/bt5_erp5
217

218 219 220 221 222 223 224 225 226 227 228 229 230
[erp5-certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
ca-dir = $${directory:erp5-ca-dir}
requests-directory = $${erp5-cadirectory:requests}
wrapper = $${basedirectory:services}/erp5-ca
ca-private = $${erp5-cadirectory:private}
ca-certs = $${erp5-cadirectory:certs}
ca-newcerts = $${erp5-cadirectory:newcerts}
ca-crl = $${erp5-cadirectory:crl}

[erp5-cadirectory]
recipe = slapos.cookbook:mkdirectory
231 232 233 234 235
requests = $${directory:erp5-ca-dir}/requests
private = $${directory:erp5-ca-dir}/private
certs = $${directory:erp5-ca-dir}/certs
newcerts = $${directory:erp5-ca-dir}/newcerts
crl = $${directory:erp5-ca-dir}/crl
236

237 238
[directory]
recipe = slapos.cookbook:mkdirectory
Romain Courteaud's avatar
Romain Courteaud committed
239 240
zodb = $${rootdirectory:srv}/zodb
instance = $${rootdirectory:srv}/erp5shared
241
instance-etc = $${:instance}/etc
Łukasz Nowak's avatar
Łukasz Nowak committed
242
apache-conf = $${rootdirectory:etc}/apache
243
instance-etc-package-include = $${:instance}/etc/package-include
244 245 246 247 248 249
# because of bug in slapos.recipe.template keys are lowercased
instance-document = $${:instance}/Document
instance-propertysheet = $${:instance}/PropertySheet
instance-products = $${:instance}/Products
instance-extensions = $${:instance}/Extensions
instance-constraint = $${:instance}/Constraint
250 251 252
instance-import = $${:instance}/import
instance-lib = $${:instance}/lib
instance-tests = $${:instance}/tests
253
erp5-ca-dir = $${rootdirectory:srv}/erp5-ca
Romain Courteaud's avatar
Romain Courteaud committed
254 255 256 257 258 259
ca-dir = $${rootdirectory:srv}/ssl
cron-entries = $${rootdirectory:etc}/cron.d
crontabs = $${rootdirectory:etc}/crontabs
cronstamps = $${rootdirectory:etc}/cronstamps
logrotate-backup = $${basedirectory:backup}/logrotate
logrotate-entries = $${rootdirectory:etc}/logrotate.d