snippet-backend.cfg 3.33 KB
Newer Older
1 2
[apache-public-%(backend_name)s]
recipe = slapos.cookbook:apache.zope.backend
Romain Courteaud's avatar
Typo  
Romain Courteaud committed
3
backend = http://$${haproxy-%(backend_name)s:ip}:$${haproxy-%(backend_name)s:port}/
4 5 6 7 8 9 10 11 12 13 14 15
ip = $${slap-network-information:global-ipv6}
port = %(apache_public_port)s
scheme = http
wrapper = $${basedirectory:services}/apache-public-%(backend_name)s
configuration-file = $${directory:apache-conf}/apache-public-%(backend_name)s.conf
access-control-string = %(access_control_string)s
pid-file = $${basedirectory:run}/apache-public-%(backend_name)s.pid
lock-file = $${basedirectory:run}/apache-public-%(backend_name)s.lock
error-log = $${basedirectory:log}/apache-public-%(backend_name)s-error.log
access-log = $${basedirectory:log}/apache-public-%(backend_name)s-access.log
apache-binary = ${apache:location}/bin/httpd

Łukasz Nowak's avatar
Łukasz Nowak committed
16
[apache-%(backend_name)s]
Łukasz Nowak's avatar
Łukasz Nowak committed
17
recipe = slapos.cookbook:apache.zope.backend
18
backend = http://$${haproxy-%(backend_name)s:ip}:$${haproxy-%(backend_name)s:port}
Łukasz Nowak's avatar
Łukasz Nowak committed
19
ip = $${slap-network-information:global-ipv6}
Łukasz Nowak's avatar
Łukasz Nowak committed
20 21
port = %(apache_port)s
wrapper = $${rootdirectory:bin}/apache-%(backend_name)s
22
scheme = https
Łukasz Nowak's avatar
Łukasz Nowak committed
23 24 25 26 27 28
key-file = $${directory:apache-conf}/apache-%(backend_name)s.key
cert-file = $${directory:apache-conf}/apache-%(backend_name)s.crt
configuration-file = $${directory:apache-conf}/apache-%(backend_name)s.conf
access-control-string = %(access_control_string)s
pid-file = $${basedirectory:run}/apache-%(backend_name)s.pid
lock-file = $${basedirectory:run}/apache-%(backend_name)s.lock
29
ssl-session-cache = $${basedirectory:log}/apache-ssl-session-cache
Łukasz Nowak's avatar
Łukasz Nowak committed
30 31
error-log = $${basedirectory:log}/apache-%(backend_name)s-error.log
access-log = $${basedirectory:log}/apache-%(backend_name)s-access.log
Łukasz Nowak's avatar
Łukasz Nowak committed
32
apache-binary = ${apache:location}/bin/httpd
33
ssl-authentication = %(ssl_authentication)s
34
backend-path = %(backend_path)s
35 36 37
# Note: Without erp5-certificate-authority main certificate have to be hardcoded
ssl-authentication-certificate = $${erp5-certificate-authority:ca-dir}/cacert.pem
ssl-authentication-crl = $${erp5-certificate-authority:ca-crl}
Łukasz Nowak's avatar
Łukasz Nowak committed
38

Łukasz Nowak's avatar
Łukasz Nowak committed
39
[ca-apache-%(backend_name)s]
Łukasz Nowak's avatar
Łukasz Nowak committed
40 41
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
Łukasz Nowak's avatar
Łukasz Nowak committed
42 43 44 45
key-file = $${apache-%(backend_name)s:key-file}
cert-file = $${apache-%(backend_name)s:cert-file}
executable = $${apache-%(backend_name)s:wrapper}
wrapper = $${basedirectory:services}/apache-%(backend_name)s
Łukasz Nowak's avatar
Łukasz Nowak committed
46

47 48 49 50 51 52 53
[logrotate-entry-apache-public-%(backend_name)s]
<= logrotate
recipe = slapos.cookbook:logrotate.d
name = apache-public-%(backend_name)s
log = $${apache-public-%(backend_name)s:error-log} $${apache-public-%(backend_name)s:access-log}
post = ${buildout:bin-directory}/killpidfromfile $${apache-public-%(backend_name)s:pid-file} SIGUSR1

Łukasz Nowak's avatar
Łukasz Nowak committed
54
[logrotate-entry-apache-%(backend_name)s]
Łukasz Nowak's avatar
Łukasz Nowak committed
55 56
<= logrotate
recipe = slapos.cookbook:logrotate.d
57
name = apache-%(backend_name)s
Łukasz Nowak's avatar
Łukasz Nowak committed
58 59
log = $${apache-%(backend_name)s:error-log} $${apache-%(backend_name)s:access-log}
post = ${buildout:bin-directory}/killpidfromfile $${apache-%(backend_name)s:pid-file} SIGUSR1
60

Łukasz Nowak's avatar
Łukasz Nowak committed
61
[haproxy-%(backend_name)s]
62
recipe = slapos.cookbook:haproxy
Łukasz Nowak's avatar
Łukasz Nowak committed
63 64
name = %(backend_name)s
conf-path = $${rootdirectory:etc}/haproxy-%(backend_name)s.cfg
65
ip = $${slap-network-information:local-ipv4}
Łukasz Nowak's avatar
Łukasz Nowak committed
66 67 68 69 70
port = %(haproxy_port)s
maxconn = %(maxconn)s
server-check-path = %(server_check_path)s
wrapper-path = $${basedirectory:services}/haproxy-%(backend_name)s
binary-path = ${haproxy:location}/sbin/haproxy
Łukasz Nowak's avatar
Łukasz Nowak committed
71
backend-list = %(haproxy_backend_list)s