here we go

This commit is contained in:
Udo Waechter
2014-11-04 13:26:25 +01:00
parent 22680a3510
commit b767706fc2
2 changed files with 10 additions and 8 deletions

View File

@@ -1,4 +1,6 @@
class varnish { class varnish (
$listen_port = '80',
$cache = 'malloc,1500m') {
package { 'varnish': require => Class['packages::backports'], } package { 'varnish': require => Class['packages::backports'], }
# ncsa loggin: # ncsa loggin:
@@ -10,8 +12,9 @@ class varnish {
file { file {
'/etc/default/varnish': '/etc/default/varnish':
content => template('varnish/etc_default_varnish.erb'), content => template('varnish/etc_default_varnish.erb');
notify => Service['varnish'];
notify => Service['varnish'];
'/etc/default/varnishnsca': '/etc/default/varnishnsca':
content => template('varnish/etc_default_varnishncsa.erb'), content => template('varnish/etc_default_varnishncsa.erb'),

View File

@@ -45,14 +45,13 @@ MEMLOCK=82000
# one content server selected by the vcl file, based on the request. Use a 1GB # one content server selected by the vcl file, based on the request. Use a 1GB
# fixed-size cache file. # fixed-size cache file.
# #
DAEMON_OPTS="-a :80 \ DAEMON_OPTS="-a :<%= @listen_port %> \
-T localhost:6082 \ -T localhost:6082 \
-f /etc/varnish/default.vcl \ -f /etc/varnish/default.vcl \
-S /etc/varnish/secret \ -S /etc/varnish/secret \
-s malloc,1500m \ -s <%= @cache %> \
-p thread_pool_min=500 -p thread_pool_max=2048 \ -p thread_pool_min=500 -p thread_pool_max=2048 \
-p session_max=10000" -p session_max=10000"
#-s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G" #-s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"
## Alternative 3, Advanced configuration ## Alternative 3, Advanced configuration