Commit 9bb3849a authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

apache-frontend: fix trafficserver disk cache configuration

parent 79b450b5
...@@ -67,7 +67,7 @@ mode = 0644 ...@@ -67,7 +67,7 @@ mode = 0644
[template-apache-frontend] [template-apache-frontend]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-apache-frontend.cfg url = ${:_profile_base_location_}/instance-apache-frontend.cfg
md5sum = 53de57ef78345cedd3c715a105539ca3 md5sum = cd5a385c44d56b4d13392eba4e938969
output = ${buildout:directory}/template-apache-frontend.cfg output = ${buildout:directory}/template-apache-frontend.cfg
mode = 0644 mode = 0644
...@@ -165,3 +165,12 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_} ...@@ -165,3 +165,12 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = records.config.jinja2 filename = records.config.jinja2
download-only = true download-only = true
mode = 0644 mode = 0644
[template-trafficserver-storage-config]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/templates/trafficserver/${:filename}
md5sum = 23c83efaf2fb0f9f0b3096bbfdda05c1
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = storage.config.jinja2
download-only = true
mode = 0644
...@@ -464,10 +464,11 @@ wrapper-path = $${directory:service}/trafficserver ...@@ -464,10 +464,11 @@ wrapper-path = $${directory:service}/trafficserver
reload-path = $${directory:etc-run}/trafficserver-reload reload-path = $${directory:etc-run}/trafficserver-reload
local-ip = $${instance-parameter:ipv4-random} local-ip = $${instance-parameter:ipv4-random}
input-port = 23432 input-port = 23432
hostname = $${slap-parameter:frontend-name} hostname = $${instance-parameter:configuration.frontend-name}
remap = map / http://$${instance-parameter:ipv4-random}:$${apache-configuration:cache-through-port} remap = map / http://$${instance-parameter:ipv4-random}:$${apache-configuration:cache-through-port}
disk-cache-config = $${trafficserver-directory:cache-path} $${instance-parameter:configuration.disk-cache-size} volume=$${slap-parameter:frontend-name}
plugin-config = ${trafficserver:location}/libexec/trafficserver/rfc5861.so plugin-config = ${trafficserver:location}/libexec/trafficserver/rfc5861.so
cache-path = $${trafficserver-directory:cache-path}
disk-cache-size = $${instance-parameter:configuration.disk-cache-size}
[trafficserver-configuration-directory] [trafficserver-configuration-directory]
recipe = plone.recipe.command recipe = plone.recipe.command
...@@ -496,6 +497,14 @@ extra-context = ...@@ -496,6 +497,14 @@ extra-context =
section ats_directory trafficserver-directory section ats_directory trafficserver-directory
section ats_configuration trafficserver-variable section ats_configuration trafficserver-variable
[trafficserver-storage-config]
< = jinja2-template-base
template = ${template-trafficserver-storage-config:location}/${template-trafficserver-storage-config:filename}
rendered = $${trafficserver-directory:configuration}/storage.config
mode = 700
extra-context =
section trafficserver trafficserver-variable
[trafficserver-remap-config] [trafficserver-remap-config]
< = jinja2-template-base < = jinja2-template-base
template = ${template-empty:target} template = ${template-empty:target}
...@@ -512,14 +521,6 @@ mode = 700 ...@@ -512,14 +521,6 @@ mode = 700
context = context =
key content trafficserver-variable:plugin-config key content trafficserver-variable:plugin-config
[trafficserver-storage-config]
< = jinja2-template-base
template = ${template-empty:target}
rendered = $${trafficserver-configuration-directory:target}/storage.config
mode = 700
context =
key content trafficserver-variable:disk-cache-config
[trafficserver-promise-listen-port] [trafficserver-promise-listen-port]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
path = $${directory:promise}/trafficserver-port-listening path = $${directory:promise}/trafficserver-port-listening
......
{{ trafficserver.get("cache-path") }} {{ trafficserver.get("disk-cache-size") }} volume={{ trafficserver.get("hostname") }}
\ No newline at end of file
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