Skip to content

centriascolocation/puppet-varnish

 
 

Repository files navigation

#varnish

build Status

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with Varnish
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

Installs and configures Varnish. Requires you to have a VCL specified in a parameter.

Module Description

Supports:

  • Varnish 3 and 4 on EL6 and derivatives (RHEL, CentOS, OEL, Amazon Linux)
  • Varnish 3 on Ubuntu 12.04
  • Varnish 3 on Debian 7
  • Varnish 4 on EL7 and derivatives
  • Varnish 4 on Ubuntu 14.04
  • Varnish 4 on Debian 7 and 8

Requires Puppet >= 3.0

Setup

This module will install Varnish, by default from the official Varnish repos.

Beginning with Varnish

  class { 'varnish':
    secret => '6565bd1c-b6d1-4ba3-99bc-3c7a41ffd94f',
  }

  varnish::vcl { '/etc/varnish/default.vcl':
    content => template('data/varnish/default.vcl.erb'),
  }

Usage

All parameters are optional, but at minimum it is suggested you set a secret.

Parameter Description
addrepo Whether to add the official Varnish repos
varnish_version Major Varnish version - should be 3.0 or 4.0
secret Secret for admin access
secret_file File to store the secret
vcl_conf Varnish vcl config file path
listen IP to bind to
listen_port TCP port to listen on
admin_listen Admin IP to bind to
admin_port TCP port for admin to listen on
min_threads Minimum Varnish worker threads
max_threads Maximum Varnish worker threads
thread_timeout Terminate threads after this long idle
storage_type malloc or file
storage_file File to mmap on disk for cache storage
storage_size Size of storage file or RAM, eg 10G or 50%
package_ensure Version of Varnish package to install, eg 3.0.5-1.el6
runtime_params hash of run-time parameters to be specified at startup

Limitations

Development

Before making any changes, please run bundle install and then bundle exec rake test to ensure all tests pass.

Once you have completed your change, run bundle exec rake test to run the tests again and ensure you haven't broken any existing functionality. If you've added new functionality, please add tests for this.

We try extremely hard not to break existing functionality, and so pull requests which do so are unlikely to be accepted.

About

Puppet module to install and configure Varnish cache

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 41.9%
  • Puppet 31.6%
  • HTML 26.5%