apache-frontend: ram and disk cache size are configurable
[slapos.git] / software / apache-frontend / instance-apache-frontend.cfg
1 [buildout]
2 parts =
3   directory
4   configtest
5   logrotate
6   cron
7   cron-entry-logrotate
8   ca-frontend
9   certificate-authority
10   logrotate-entry-apache
11   logrotate-entry-apache-cached
12   apache-frontend
13   apache-cached
14   switch-apache-softwaretype
15   frontend-apache-graceful
16   cached-apache-graceful
17   dynamic-template-default-vh
18   not-found-html
19   promise-frontend-apache-configuration
20   promise-cached-apache-configuration
21   promise-apache-frontend-v4-https
22   promise-apache-frontend-v4-http
23   promise-apache-frontend-v6-https
24   promise-apache-frontend-v6-http
25   promise-apache-cached
26
27   trafficserver-launcher
28   trafficserver-reload
29   trafficserver-configuration-directory
30   trafficserver-records-config
31   trafficserver-remap-config
32   trafficserver-plugin-config
33   trafficserver-storage-config
34   trafficserver-promise-listen-port
35
36 ## Monitoring part
37 ###Parts to add for monitoring
38   certificate-authority
39   cron-entry-monitor
40   cron-entry-rss
41   deploy-index
42   deploy-settings-cgi
43   deploy-status-cgi
44   deploy-status-history-cgi
45   setup-static-files
46   certificate-authority
47   zero-parameters
48   public-symlink
49   cgi-httpd-wrapper
50   cgi-httpd-graceful-wrapper
51   monitor-promise
52   monitor-instance-log-access
53 ## Monitor for apache
54   monitor-current-log-access
55   monitor-backup-log-access
56   monitor-ats-cache-stats-wrapper
57   monitor-apache-configuration-verification
58   monitor-verify-re6st-connectivity
59
60 extends = ${monitor-template:output}
61
62
63 eggs-directory = ${buildout:eggs-directory}
64 develop-eggs-directory = ${buildout:develop-eggs-directory}
65 offline = true
66
67 # Create all needed directories
68 [directory]
69 recipe = slapos.cookbook:mkdirectory
70
71 bin = $${buildout:directory}/bin/
72 etc = $${buildout:directory}/etc/
73 srv = $${buildout:directory}/srv/
74 var = $${buildout:directory}/var/
75 template = $${buildout:directory}/template/
76
77 backup = $${:srv}/backup
78 log = $${:var}/log
79 run = $${:var}/run
80 service = $${:etc}/service
81 etc-run = $${:etc}/run
82 promise = $${:etc}/promise
83
84 logrotate-backup = $${:backup}/logrotate
85 logrotate-entries = $${:etc}/logrotate.d
86
87 cron-entries = $${:etc}/cron.d
88 crontabs = $${:etc}/crontabs
89 cronstamps = $${:etc}/cronstamps
90 ca-dir = $${:srv}/ssl
91
92
93 [switch-apache-softwaretype]
94 recipe = slapos.cookbook:softwaretype
95 single-default = $${dynamic-default-template-slave-list:rendered}
96 single-custom-personal = $${dynamic-custom-personal-template-slave-list:rendered}
97 single-custom-group = $${dynamic-custom-group-template-slave-list:rendered}
98
99 [instance-parameter]
100 # Fetches parameters defined in SlapOS Master for this instance.
101 # Always the same.
102 recipe = slapos.cookbook:slapconfiguration.serialised
103 computer = $${slap-connection:computer-id}
104 partition = $${slap-connection:partition-id}
105 url = $${slap-connection:server-url}
106 key = $${slap-connection:key-file}
107 cert = $${slap-connection:cert-file}
108 # Define default parameter(s) that will be used later, in case user didn't
109 # specify it
110 # All parameters are available through the configuration.XX syntax.
111 # All possible parameters should have a default.
112 configuration.domain = example.org
113 configuration.public-ipv4 =
114 configuration.port = 4443
115 configuration.plain_http_port = 8080
116 configuration.server-admin = admin@example.com
117 configuration.apache_custom_https = ""
118 configuration.apache_custom_http = ""
119 configuration.apache-key =
120 configuration.apache-certificate =
121 configuration.open-port = 80 443
122 configuration.extra_slave_instance_list =
123 configuration.disk-cache-size = 8G
124
125 [frontend-configuration]
126 template-log-access = ${template-log-access:target}
127 log-access-configuration = $${directory:etc}/apache-log-access.conf
128 apache-directory = ${apache-2.2:location}
129 apache-ipv6 = $${instance-parameter:ipv6-random}
130 apache-https-port = $${instance-parameter:configuration.port}
131
132 [jinja2-template-base]
133 recipe = slapos.recipe.template:jinja2
134 rendered = $${buildout:directory}/$${:filename}
135 extra-context =
136 context =
137     import json_module json
138     key eggs_directory buildout:eggs-directory
139     key develop_eggs_directory buildout:develop-eggs-directory
140     key slap_software_type instance-parameter:slap-software-type
141     key slapparameter_dict instance-parameter:configuration
142     section directory directory
143     $${:extra-context}
144
145 [dynamic-template-default-vh]
146 < = jinja2-template-base
147 template = ${template-default-virtualhost:target}
148 rendered = $${apache-directory:slave-configuration}/000.conf
149 extensions = jinja2.ext.do
150 extra-context =
151     key http_port instance-parameter:configuration.plain_http_port
152     key https_port instance-parameter:configuration.port
153
154 [dynamic-custom-personal-template-slave-list]
155 < = jinja2-template-base
156 template = ${template-slave-list:target}
157 filename = custom-personal-instance-slave-list.cfg
158 extensions = jinja2.ext.do
159 extra-context =
160     key apache_configuration_directory apache-directory:slave-configuration
161     key http_port instance-parameter:configuration.plain_http_port
162     key https_port instance-parameter:configuration.port
163     key public_ipv4 instance-parameter:configuration.public-ipv4
164     key slave_instance_list instance-parameter:slave-instance-list
165     key extra_slave_instance_list instance-parameter:configuration.extra_slave_instance_list
166     key rewrite_cached_configuration apache-configuration:cached-rewrite-file
167     key custom_ssl_directory apache-directory:vh-ssl
168     key apache_log_directory apache-directory:slave-log
169     key local_ipv4 instance-parameter:ipv4-random
170     key cache_port apache-configuration:cache-port
171     raw empty_template ${template-empty:target}
172     raw template_custom_slave_configuration ${template-slave-configuration:target}
173     raw template_default_slave_configuration ${template-default-slave-virtualhost:target}
174     raw template_rewrite_cached ${template-rewrite-cached:target}
175     raw software_type single-custom-personal
176     section logrotate_dict logrotate
177     section frontend_configuration frontend-configuration
178     section apache_configuration apache-configuration
179     key monitor_url monitor-parameters:url
180
181 [dynamic-custom-group-template-slave-list]
182 < = jinja2-template-base
183 template = ${template-custom-slave-list:target}
184 filename = custom-group-instance-slave-list.cfg
185 extensions = jinja2.ext.do
186 extra-context =
187     key apache_configuration_directory apache-directory:slave-configuration
188     key domain instance-parameter:configuration.domain
189     key http_port instance-parameter:configuration.plain_http_port
190     key https_port instance-parameter:configuration.port
191     key public_ipv4 instance-parameter:configuration.public-ipv4
192     key slave_instance_list instance-parameter:slave-instance-list
193     key extra_slave_instance_list instance-parameter:configuration.extra_slave_instance_list
194     key rewrite_cached_configuration apache-configuration:cached-rewrite-file
195     key custom_ssl_directory apache-directory:vh-ssl
196     key template_slave_configuration dynamic-virtualhost-template-slave:rendered
197     key apache_log_directory apache-directory:slave-log
198     key local_ipv4 instance-parameter:ipv4-random
199     key cache_port apache-configuration:cache-port
200     raw empty_template ${template-empty:target}
201     raw template_rewrite_cached ${template-rewrite-cached:target}
202     raw software_type single-custom-group
203
204 [dynamic-default-template-slave-list]
205 < = jinja2-template-base
206 template = ${template-custom-slave-list:target}
207 filename = default-instance-slave-list.cfg
208 extensions = jinja2.ext.do
209 extra-context =
210     key apache_configuration_directory apache-directory:slave-configuration
211     key domain instance-parameter:configuration.domain
212     key http_port instance-parameter:configuration.plain_http_port
213     key https_port instance-parameter:configuration.port
214     key public_ipv4 instance-parameter:configuration.public-ipv4
215     key slave_instance_list instance-parameter:slave-instance-list
216     key extra_slave_instance_list instance-parameter:configuration.extra_slave_instance_list
217     key rewrite_cached_configuration apache-configuration:cached-rewrite-file
218     key custom_ssl_directory apache-directory:vh-ssl
219     key apache_log_directory apache-directory:slave-log
220     key local_ipv4 instance-parameter:ipv4-random
221     key cache_port apache-configuration:cache-port
222     raw template_slave_configuration ${template-default-slave-virtualhost:target}
223     raw empty_template ${template-empty:target}
224     raw template_rewrite_cached ${template-rewrite-cached:target}
225     raw software_type single-default
226 # XXXX Hack to allow two software types
227
228 [dynamic-virtualhost-template-slave]
229 <= jinja2-template-base
230 template = ${template-slave-configuration:target}
231 rendered = $${directory:template}/slave-virtualhost.conf.in
232 extensions = jinja2.ext.do
233 extra-context =
234     key https_port instance-parameter:configuration.port
235     key http_port instance-parameter:configuration.plain_http_port
236     key apache_custom_https instance-parameter:configuration.apache_custom_https
237     key apache_custom_http instance-parameter:configuration.apache_custom_http
238
239 # Deploy Apache Frontend (new way, no recipe, jinja power)
240 [dynamic-apache-frontend-template]
241 < = jinja2-template-base
242 template = ${template-apache-frontend-configuration:target}
243 rendered = $${apache-configuration:frontend-configuration}
244 extra-context =
245     raw httpd_home ${apache-2.2:location}
246     key httpd_mod_ssl_cache_directory apache-directory:mod-ssl
247     key domain instance-parameter:configuration.domain
248     key document_root apache-directory:document-root
249     key instance_home buildout:directory
250     key ipv4_addr instance-parameter:ipv4-random
251     key ipv6_addr instance-parameter:ipv6-random
252     key http_port instance-parameter:configuration.plain_http_port
253     key https_port instance-parameter:configuration.port
254     key server_admin instance-parameter:configuration.server-admin
255     key protected_path apache-configuration:protected-path
256     key access_control_string apache-configuration:access-control-string
257     key login_certificate ca-frontend:cert-file
258     key login_key ca-frontend:key-file
259     key ca_dir  certificate-authority:ca-dir
260     key ca_crl certificate-authority:ca-crl
261     key access_log apache-configuration:access-log
262     key error_log apache-configuration:error-log
263     key pid_file apache-configuration:pid-file
264     key slave_configuration_directory apache-directory:slave-configuration
265     section frontend_configuration frontend-configuration
266
267 [apache-frontend]
268 recipe = slapos.cookbook:wrapper
269 command-line = ${apache-2.2:location}/bin/httpd -f $${dynamic-apache-frontend-template:rendered} -DFOREGROUND
270 wrapper-path = $${directory:service}/frontend_apache
271 wait-for-files =
272                $${ca-frontend:cert-file}
273                $${ca-frontend:key-file}
274
275 # Deploy Apache for cached website
276 [dynamic-apache-cached-template]
277 < = jinja2-template-base
278 template = ${template-apache-cached-configuration:target}
279 rendered = $${apache-configuration:cached-configuration}
280 extra-context =
281     raw httpd_home ${apache-2.2:location}
282     key httpd_mod_ssl_cache_directory apache-directory:mod-ssl
283     key domain instance-parameter:configuration.domain
284     key document_root apache-directory:document-root
285     key instance_home buildout:directory
286     key ipv4_addr instance-parameter:ipv4-random
287     key cached_port apache-configuration:cache-through-port
288     key server_admin instance-parameter:configuration.server-admin
289     key protected_path apache-configuration:protected-path
290     key access_control_string apache-configuration:access-control-string
291     key login_certificate ca-frontend:cert-file
292     key login_key ca-frontend:key-file
293     key ca_dir  certificate-authority:ca-dir
294     key ca_crl certificate-authority:ca-crl
295     key access_log apache-configuration:cache-access-log
296     key error_log apache-configuration:cache-error-log
297     key pid_file apache-configuration:cache-pid-file
298     key apachecachedmap_path apache-configuration:cached-rewrite-file
299
300 [apache-cached]
301 recipe = slapos.cookbook:wrapper
302 command-line = ${apache-2.2:location}/bin/httpd -f $${dynamic-apache-cached-template:rendered} -DFOREGROUND
303 wrapper-path = $${directory:service}/frontend_cached_apache
304 wait-for-files =
305                $${ca-frontend:cert-file}
306                $${ca-frontend:key-file}
307
308 [not-found-html]
309 recipe = slapos.cookbook:symbolic.link
310 target-directory = $${apache-directory:document-root}
311 link-binary =
312             ${template-not-found-html:target}
313
314 [apache-directory]
315 recipe = slapos.cookbook:mkdirectory
316 document-root = $${directory:srv}/htdocs
317 slave-configuration = $${directory:etc}/apache-slave-conf.d/
318 cache = $${directory:var}/cache
319 mod-ssl = $${:cache}/httpd_mod_ssl
320 vh-ssl = $${:slave-configuration}/ssl
321 slave-log = $${directory:log}/httpd
322
323 [apache-configuration]
324 frontend-configuration = $${directory:etc}/apache_frontend.conf
325 cached-configuration = $${directory:etc}/apache_frontend_cached.conf
326 access-log = $${directory:log}/frontend-apache-access.log
327 error-log = $${directory:log}/frontend-apache-error.log
328 pid-file = $${directory:run}/httpd.pid
329 protected-path = /
330 access-control-string = none
331 cached-rewrite-file = $${directory:etc}/apache_rewrite_cached.txt
332 frontend-configuration-verification = ${apache-2.2:location}/bin/httpd -Sf $${:frontend-configuration}
333 frontend-graceful-command = $${:frontend-configuration-verification}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${:pid-file}); fi
334 cached-configuration-verification = ${apache-2.2:location}/bin/httpd -Sf $${:cached-configuration}
335 cached-graceful-command = $${:cached-configuration-verification}; if [ $? -eq 0 ]; then kill -USR1 $(cat $${apache-configuration:cache-pid-file}); fi
336
337 # Apache for cache configuration
338 cache-access-log = $${directory:log}/frontend-apache-access-cached.log
339 cache-error-log = $${directory:log}/frontend-apache-error-cached.log
340 cache-pid-file = $${directory:run}/httpd-cached.pid
341
342 # Comunication with ats
343 cache-port = $${trafficserver-variable:input-port}
344 cache-through-port = 26011
345
346 # Create wrapper for "apachectl conftest" in bin
347 [configtest]
348 recipe = slapos.cookbook:wrapper
349 command-line = ${apache-2.2:location}/bin/httpd -f $${directory:etc}/apache_frontend.conf -t
350 wrapper-path = $${directory:bin}/apache-configtest
351
352 [certificate-authority]
353 recipe = slapos.cookbook:certificate_authority
354 openssl-binary = ${openssl:location}/bin/openssl
355 ca-dir = $${directory:ca-dir}
356 requests-directory = $${cadirectory:requests}
357 wrapper = $${directory:service}/certificate_authority
358 ca-private = $${cadirectory:private}
359 ca-certs = $${cadirectory:certs}
360 ca-newcerts = $${cadirectory:newcerts}
361 ca-crl = $${cadirectory:crl}
362
363 [cadirectory]
364 recipe = slapos.cookbook:mkdirectory
365 requests = $${directory:ca-dir}/requests/
366 private = $${directory:ca-dir}/private/
367 certs = $${directory:ca-dir}/certs/
368 newcerts = $${directory:ca-dir}/newcerts/
369 crl = $${directory:ca-dir}/crl/
370
371 [ca-frontend]
372 <= certificate-authority
373 recipe = slapos.cookbook:certificate_authority.request
374 key-file = $${cadirectory:certs}/apache_frontend.key
375 cert-file = $${cadirectory:certs}/apache_frontend.crt
376 executable = $${directory:service}/frontend_apache
377 wrapper = $${directory:service}/frontend_apache
378 key-content = $${instance-parameter:configuration.apache-key}
379 cert-content = $${instance-parameter:configuration.apache-certificate}
380 # Put domain name
381 name = $${instance-parameter:configuration.domain}
382
383 [cron]
384 recipe = slapos.cookbook:cron
385 dcrond-binary = ${dcron:location}/sbin/crond
386 cron-entries = $${directory:cron-entries}
387 crontabs = $${directory:crontabs}
388 cronstamps = $${directory:cronstamps}
389 catcher = $${cron-simplelogger:wrapper}
390 binary = $${directory:service}/crond
391
392 [cron-simplelogger]
393 recipe = slapos.cookbook:simplelogger
394 wrapper = $${directory:bin}/cron_simplelogger
395 log = $${directory:log}/cron.log
396
397 [cron-entry-logrotate]
398 <= cron
399 recipe = slapos.cookbook:cron.d
400 name = logrotate
401 frequency = 0 0 * * *
402 command = $${logrotate:wrapper}
403
404 # Deploy Logrotate
405 [logrotate]
406 recipe = slapos.cookbook:logrotate
407 # Binaries
408 logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
409 gzip-binary = ${gzip:location}/bin/gzip
410 gunzip-binary = ${gzip:location}/bin/gunzip
411 # Directories
412 wrapper = $${directory:bin}/logrotate
413 conf = $${directory:etc}/logrotate.conf
414 logrotate-entries = $${directory:logrotate-entries}
415 backup = $${directory:logrotate-backup}
416 state-file = $${directory:srv}/logrotate.status
417
418 [logrotate-entry-apache]
419 <= logrotate
420 recipe = slapos.cookbook:logrotate.d
421 name = apache
422 log = $${apache-configuration:error-log} $${apache-configuration:access-log}
423 frequency = daily
424 rotatep-num = 30
425 post = $${apache-configuration:frontend-graceful-command}
426 sharedscripts = true
427 notifempty = true
428 create = true
429
430 [logrotate-entry-apache-cached]
431 <= logrotate
432 recipe = slapos.cookbook:logrotate.d
433 name = apache-cached
434 log = $${apache-configuration:cache-error-log} $${apache-configuration:cache-access-log}
435 frequency = daily
436 rotatep-num = 30
437 post = $${apache-configuration:cached-graceful-command}
438 sharedscripts = true
439 notifempty = true
440 create = true
441
442 #################
443 # Trafficserver
444 #################
445 [trafficserver-directory]
446 recipe = slapos.cookbook:mkdirectory
447 configuration = $${directory:etc}/trafficserver
448 local-state = $${directory:var}/trafficserver
449 bin_path = ${trafficserver:location}/bin
450 log = $${directory:log}/trafficserver
451 cache-path = $${directory:srv}/ats_cache
452
453 [trafficserver-variable]
454 wrapper-path = $${directory:service}/trafficserver
455 reload-path = $${directory:etc-run}/trafficserver-reload
456 local-ip = $${instance-parameter:ipv4-random}
457 input-port = 23432
458 hostname = $${slap-parameter:frontend-name}
459 remap = map / http://$${instance-parameter:ipv4-random}:$${apache-configuration:cache-through-port}
460 disk-cache-config = $${trafficserver-directory:cache-path} $${instance-parameter:configuration.disk-cache-size} volume=$${slap-parameter:frontend-name}
461 plugin-config = ${trafficserver:location}/libexec/trafficserver/rfc5861.so
462
463 [trafficserver-configuration-directory]
464 recipe = plone.recipe.command
465 command = cp -rn ${trafficserver:location}/etc/trafficserver/* $${:target}
466 target = $${trafficserver-directory:configuration}
467
468 [trafficserver-launcher]
469 recipe = slapos.cookbook:wrapper
470 command-line = ${trafficserver:location}/bin/traffic_cop
471 wrapper-path = $${trafficserver-variable:wrapper-path}
472 environment = TS_ROOT=$${buildout:directory}
473
474 [trafficserver-reload]
475 recipe = slapos.cookbook:wrapper
476 command-line = ${trafficserver:location}/bin/traffic_line -x
477 wrapper-path = $${trafficserver-variable:reload-path}
478 environment = TS_ROOT=$${buildout:directory}
479
480 [trafficserver-records-config]
481 < = jinja2-template-base
482 template = ${template-trafficserver-records-config:location}/${template-trafficserver-records-config:filename}
483 rendered = $${trafficserver-directory:configuration}/records.config
484 mode = 700
485 extra-context =
486     import os_module os
487     section ats_directory trafficserver-directory
488     section ats_configuration trafficserver-variable
489
490 [trafficserver-remap-config]
491 < = jinja2-template-base
492 template = ${template-empty:target}
493 rendered = $${trafficserver-configuration-directory:target}/remap.config
494 mode = 700
495 context =
496     key content trafficserver-variable:remap
497
498 [trafficserver-plugin-config]
499 < = jinja2-template-base
500 template = ${template-empty:target}
501 rendered = $${trafficserver-configuration-directory:target}/plugin.config
502 mode = 700
503 context =
504     key content trafficserver-variable:plugin-config
505
506 [trafficserver-storage-config]
507 < = jinja2-template-base
508 template = ${template-empty:target}
509 rendered = $${trafficserver-configuration-directory:target}/storage.config
510 mode = 700
511 context =
512     key content trafficserver-variable:disk-cache-config
513
514 [trafficserver-promise-listen-port]
515 recipe = slapos.cookbook:check_port_listening
516 path = $${directory:promise}/trafficserver-port-listening
517 hostname = $${trafficserver-variable:local-ip}
518 port = $${trafficserver-variable:input-port}
519
520 ### End of ATS sections
521
522 ### Apaches Graceful and promises
523 [frontend-apache-graceful]
524 < = jinja2-template-base
525 template = ${template-wrapper:output}
526 rendered = $${directory:etc-run}/frontend-apache-safe-graceful
527 mode = 0700
528 extra-context =
529     key content apache-configuration:frontend-graceful-command
530
531 [cached-apache-graceful]
532 < = jinja2-template-base
533 template = ${template-wrapper:output}
534 rendered = $${directory:etc-run}/cached-apache-safe-graceful
535 mode = 0700
536 extra-context =
537     key content apache-configuration:cached-graceful-command
538
539 # Promises checking configuration:
540 [promise-frontend-apache-configuration]
541 < = jinja2-template-base
542 template = ${template-wrapper:output}
543 rendered = $${directory:promise}/frontend-apache-configuration-promise
544 mode = 0700
545 extra-context =
546     key content apache-configuration:frontend-configuration-verification
547
548 [promise-cached-apache-configuration]
549 < = jinja2-template-base
550 template = ${template-wrapper:output}
551 rendered = $${directory:promise}/cached-apache-configuration-promise
552 mode = 0700
553 extra-context =
554     key content apache-configuration:cached-configuration-verification
555
556 [promise-apache-frontend-v4-https]
557 recipe = slapos.cookbook:check_port_listening
558 path = $${directory:promise}/apache_frontend_ipv4_https
559 hostname = $${instance-parameter:ipv4-random}
560 port = $${instance-parameter:configuration.port}
561
562 [promise-apache-frontend-v4-http]
563 recipe = slapos.cookbook:check_port_listening
564 path = $${directory:promise}/apache_frontend_ipv4_http
565 hostname = $${instance-parameter:ipv4-random}
566 port = $${instance-parameter:configuration.plain_http_port}
567
568 [promise-apache-frontend-v6-https]
569 recipe = slapos.cookbook:check_port_listening
570 path = $${directory:promise}/apache_frontend_ipv6_https
571 hostname = $${instance-parameter:ipv6-random}
572 port = $${instance-parameter:configuration.port}
573
574 [promise-apache-frontend-v6-http]
575 recipe = slapos.cookbook:check_port_listening
576 path = $${directory:promise}/apache_frontend_ipv6_http
577 hostname = $${instance-parameter:ipv6-random}
578 port = $${instance-parameter:configuration.plain_http_port}
579
580 [promise-apache-cached]
581 recipe = slapos.cookbook:check_port_listening
582 path = $${directory:promise}/apache_cached
583 hostname = $${instance-parameter:ipv4-random}
584 port = $${apache-configuration:cache-through-port}
585
586 [slap_connection]
587 # Kept for backward compatiblity
588 computer_id = $${slap-connection:computer-id}
589 partition_id = $${slap-connection:partition-id}
590 server_url = $${slap-connection:server-url}
591 software_release_url = $${slap-connection:software-release-url}
592 key_file = $${slap-connection:key-file}
593 cert_file = $${slap-connection:cert-file}
594
595 [slap-parameter]
596 # Define default parameter(s) that will be used later, in case user didn't
597 # specify it
598 # All parameters are available through the configuration.XX syntax.
599 # All possible parameters should have a default.
600 domain = example.org
601 public-ipv4 =
602 port = 4443
603 plain_http_port = 8080
604 server-admin = admin@example.com
605 apache_custom_https = ""
606 apache_custom_http = ""
607 apache-key =
608 apache-certificate =
609 open-port = 80 443
610 extra_slave_instance_list =
611 frontend-name =
612
613
614 #######
615 # Monitoring sections
616 #
617
618 [monitor-current-log-access]
619 < = monitor-directory-access
620 source = $${directory:log}
621
622 [monitor-backup-log-access]
623 < = monitor-directory-access
624 source = $${directory:logrotate-backup}
625
626 # Produce ATS Cache stats
627 [monitor-ats-cache-stats-wrapper]
628 < = jinja2-template-base
629 template = ${template-wrapper:output}
630 rendered = $${monitor-directory:monitoring-cgi}/ats-cache-stats
631 mode = 0700
632 command = export TS_ROOT=$${buildout:directory} && echo "<pre>$(${trafficserver:location}/bin/traffic_shell $${monitor-ats-cache-stats-config:rendered})</pre>"
633 extra-context =
634   key content monitor-ats-cache-stats-wrapper:command
635
636 [monitor-ats-cache-stats-config]
637 < = jinja2-template-base
638 template = ${template-empty:target}
639 rendered = $${trafficserver-configuration-directory:target}/cache-config.stats
640 mode = 644
641 context =
642     raw content show:cache-stats
643
644 # Display result of apache configuration check
645 [monitor-apache-configuration-verification]
646 < = jinja2-template-base
647 template = ${template-wrapper:output}
648 rendered = $${monitor-directory:monitoring-cgi}/front-httpd-configuration
649 mode = 0700
650 command = echo "<pre>$($${apache-configuration:frontend-configuration-verification})</pre>"
651 extra-context =
652   key content :command
653
654 [monitor-verify-re6st-connectivity]
655 recipe = slapos.cookbook:check_url_available
656 path = $${monitor-directory:monitor-custom-scripts}/re6st-connectivity
657 url = $${public:re6st-verification-url}
658 dash_path = ${dash:location}/bin/dash
659 curl_path = ${curl:location}/bin/curl
660
661 [public]
662 re6st-verification-url = http://[2001:67c:1254:4::1]/index.html