1 {% set tcpv4_port = slapparameter_dict.get('tcpv4_port', 6001) -%}
2 {% set ip = (ipv4_set | list)[0] %}
5 publish-varnish-connection-information
9 {# When web_checker related parameter is given, web_checker will be enabled.-#}
10 {% set web_checker_dict = slapparameter_dict.get('web-checker', {}) -%}
11 {% if web_checker_dict -%}
13 cron-entry-web-checker
14 logrotate-entry-web-checker
16 [cron-entry-web-checker]
18 recipe = slapos.cookbook:cron.d
21 command = ${varnish-instance:web-checker} ${web-checker:web-checker-config}
24 recipe = slapos.cookbook:webchecker
25 web-checker-config = ${rootdirectory:etc}/web_checker.cfg
26 web-checker-working-directory = ${directory:web-checker}
27 frontend-url = {{ web_checker_dict.get('frontend-url', 'http://%(ip)s:%(port)s/') % {
31 mail-address = {{ web_checker_dict['mail-address'] }}
32 smtp-host = {{ web_checker_dict['smtp-host'] }}
33 wget-binary-path = {{ parameter_dict['wget'] }}/bin/wget
34 varnishlog-binary-path = ${varnish-instance:varnishlog-wrapper}
35 web-checker-log = ${basedirectory:log}/web-checker.log
37 [logrotate-entry-web-checker]
39 recipe = slapos.cookbook:logrotate.d
41 log = ${web-checker:web-checker-log}
49 eggs-directory = {{ eggs_directory }}
50 develop-eggs-directory = {{ develop_eggs_directory }}
53 [publish-varnish-connection-information]
54 recipe = slapos.cookbook:publish.serialised
55 url = http://${varnish-instance:ip}:${varnish-instance:server-port}/
58 recipe = slapos.cookbook:generic.varnish
59 backend-url = {{ slapparameter_dict['backend-url'] }}
63 server-port = {{ tcpv4_port }}
64 manager-port = {{ tcpv4_port + 1 }}
65 stunnel-port = {{ tcpv4_port + 2}}
67 # Paths: Running wrappers
68 varnishd-wrapper = ${basedirectory:services}/varnishd
69 varnishlog-wrapper = ${rootdirectory:bin}/varnishlog
70 stunnel-wrapper = ${basedirectory:services}/stunnel
73 varnishd-binary = {{ parameter_dict['varnish'] }}/sbin/varnishd
74 varnishlog-binary = {{ parameter_dict['varnish'] }}/bin/varnishlog
75 shell-path = {{ parameter_dict['dash'] }}/bin/dash
76 stunnel-binary = {{ parameter_dict['stunnel'] }}/bin/stunnel
77 gcc-location = {{ parameter_dict['gcc'] }}/bin
78 # Configuration by VCL
79 vcl-file = ${rootdirectory:etc}/default.vcl
80 pid-file = ${basedirectory:run}/varnishd.pid
81 stunnel-conf-file = ${rootdirectory:etc}/stunnel.conf
82 stunnel-pid-file = ${basedirectory:run}/stunnel.pid
83 varnish-data = ${directory:varnish-data}
84 # this will pass at -n option
85 varnish-instance-name = ${directory:varnish-instance}
86 web-checker = {{ parameter_dict['buildout-bin-directory'] }}/web_checker_utility
89 recipe = slapos.cookbook:cron
90 dcrond-binary = {{ parameter_dict['dcron'] }}/sbin/crond
91 cron-entries = ${directory:cron-entries}
92 crontabs = ${directory:crontabs}
93 cronstamps = ${directory:cronstamps}
94 binary = ${basedirectory:services}/crond
95 catcher = ${cron-simplelogger:wrapper}
98 recipe = slapos.cookbook:simplelogger
99 wrapper = ${rootdirectory:bin}/cron_simplelogger
100 log = ${basedirectory:log}/cron.log
102 [cron-entry-logrotate]
104 recipe = slapos.cookbook:cron.d
106 frequency = 0 0 * * *
107 command = ${logrotate:wrapper}
110 recipe = slapos.cookbook:logrotate
112 logrotate-binary = {{ parameter_dict['logrotate'] }}/usr/sbin/logrotate
113 gzip-binary = {{ parameter_dict['gzip'] }}/bin/gzip
114 gunzip-binary = {{ parameter_dict['gzip'] }}/bin/gunzip
116 wrapper = ${rootdirectory:bin}/logrotate
117 conf = ${rootdirectory:etc}/logrotate.conf
118 logrotate-entries = ${directory:logrotate-entries}
119 backup = ${directory:logrotate-backup}
120 state-file = ${rootdirectory:srv}/logrotate.status
123 recipe = slapos.cookbook:mkdirectory
124 services = ${rootdirectory:etc}/run
125 run = ${rootdirectory:var}/run
126 backup = ${rootdirectory:srv}/backup
127 log = ${rootdirectory:var}/log
128 backup = ${rootdirectory:srv}/backup
131 recipe = slapos.cookbook:mkdirectory
132 varnish-data = ${rootdirectory:srv}/varnish
133 varnish-instance = ${directory:varnish-data}/instance
134 cron-entries = ${rootdirectory:etc}/cron.d
135 crontabs = ${rootdirectory:etc}/crontabs
136 cronstamps = ${rootdirectory:etc}/cronstamps
137 logrotate-backup = ${basedirectory:backup}/logrotate
138 logrotate-entries = ${rootdirectory:etc}/logrotate.d
139 web-checker = ${rootdirectory:srv}/web-checker
142 recipe = slapos.cookbook:mkdirectory
143 etc = ${buildout:directory}/etc
144 var = ${buildout:directory}/var
145 srv = ${buildout:directory}/srv
146 bin = ${buildout:directory}/bin