Commit 558106ee authored by Łukasz Nowak's avatar Łukasz Nowak

Prepare backend templating.

parent 4ef9c28f
[apache-zope-backend-instance] [apache-%(backend_name)s]
recipe = slapos.cookbook:apache.zope.backend recipe = slapos.cookbook:apache.zope.backend
backend = http://$${zope-instance:ip}:$${zope-instance:port}/ backend = http://$${haproxy-%(backend_name)s:ip}:$${haproxy-%(backend_name)s:port}/
ip = $${slap-network-information:global-ipv6} ip = $${slap-network-information:global-ipv6}
port = 16001 port = %(apache_port)s
wrapper = $${rootdirectory:bin}/apache wrapper = $${rootdirectory:bin}/apache-%(backend_name)s
key-file = $${directory:apache-conf}/apache.key key-file = $${directory:apache-conf}/apache-%(backend_name)s.key
cert-file = $${directory:apache-conf}/apache.crt cert-file = $${directory:apache-conf}/apache-%(backend_name)s.crt
configuration-file = $${directory:apache-conf}/apache.conf configuration-file = $${directory:apache-conf}/apache-%(backend_name)s.conf
access-control-string = $${slap-parameter:access-control-string} access-control-string = %(access_control_string)s
pid-file = $${basedirectory:run}/apache.pid pid-file = $${basedirectory:run}/apache-%(backend_name)s.pid
lock-file = $${basedirectory:run}/apache.lock lock-file = $${basedirectory:run}/apache-%(backend_name)s.lock
error-log = $${basedirectory:log}/apache-error.log error-log = $${basedirectory:log}/apache-%(backend_name)s-error.log
access-log = $${basedirectory:log}/apache-access.log access-log = $${basedirectory:log}/apache-%(backend_name)s-access.log
apache-binary = ${apache:location}/bin/httpd apache-binary = ${apache:location}/bin/httpd
[ca-apache-zope-backend] [ca-apache-%(backend_name)s]
<= certificate-authority <= certificate-authority
recipe = slapos.cookbook:certificate_authority.request recipe = slapos.cookbook:certificate_authority.request
key-file = $${apache-zope-backend-instance:key-file} key-file = $${apache-%(backend_name)s:key-file}
cert-file = $${apache-zope-backend-instance:cert-file} cert-file = $${apache-%(backend_name)s:cert-file}
executable = $${apache-zope-backend-instance:wrapper} executable = $${apache-%(backend_name)s:wrapper}
wrapper = $${basedirectory:services}/apache wrapper = $${basedirectory:services}/apache-%(backend_name)s
[logrotate-entry-apache-zope-backend] [logrotate-entry-apache-%(backend_name)s]
<= logrotate <= logrotate
recipe = slapos.cookbook:logrotate.d recipe = slapos.cookbook:logrotate.d
name = zope name = zope
log = $${apache-zope-backend-instance:error-log} $${apache-zope-backend-instance:access-log} log = $${apache-%(backend_name)s:error-log} $${apache-%(backend_name)s:access-log}
frequency = daily frequency = daily
rotate-num = 30 rotate-num = 30
post = ${buildout:bin-directory}/killpidfromfile $${apache-zope-backend-instance:pid-file} SIGUSR1 post = ${buildout:bin-directory}/killpidfromfile $${apache-%(backend_name)s:pid-file} SIGUSR1
sharedscripts = true sharedscripts = true
notifempty = true notifempty = true
create = true create = true
[haproxy-instance] [haproxy-%(backend_name)s]
recipe = slapos.cookbook:haproxy recipe = slapos.cookbook:haproxy
name = $${slap-parameter:haproxy-id} name = %(backend_name)s
conf-path = $${rootdirectory:etc}/haproxy-$${slap-parameter:haproxy-id}.cfg conf-path = $${rootdirectory:etc}/haproxy-%(backend_name)s.cfg
ip = $${slap-network-information:local-ipv4} ip = $${slap-network-information:local-ipv4}
port = $${slap-parameter:haproxy-port} port = %(haproxy_port)s
maxconn = $${slap-parameter:maxconn} maxconn = %(maxconn)s
server-check-path = /$${slap-parameter:site-id}/getId server-check-path = %(server_check_path)s
wrapper-path = $${basedirectory:services}/haproxy-%(backend_name)s
wrapper-path = $${basedirectory:services}/haproxy_$${slap-parameter:haproxy-id} binary-path = ${haproxy:location}/sbin/haproxy
binary-path = ${memcached:location}/bin/memcached
...@@ -102,7 +102,7 @@ mode = 0644 ...@@ -102,7 +102,7 @@ mode = 0644
[template-snippet-backend] [template-snippet-backend]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/snippet-backend.cfg url = ${:_profile_base_location_}/snippet-backend.cfg
md5sum = 50963d43711c1f928841b844d38b7286 md5sum = 28357b5a1490fc715869b79b6d1bdb8c
output = ${buildout:directory}/template-snippet-backend.cfg output = ${buildout:directory}/template-snippet-backend.cfg
mode = 0644 mode = 0644
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment