Version information
Start using this module
Add this module to your Puppetfile:
mod 'danielfnfaria-varnish', '0.1.5'
Learn more about managing modules with a PuppetfileDocumentation
varnish
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with varnish
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing and how
- Limitations - OS compatibility, etc.
Overview
This module will help you manage varnish servers with a standard template of what can happen it will create its VCL files simply.
Module Description
Control of:
- Varnish
- Haproxy
To run on AWS structure CNAME to your Load Balancers
Setup
What varnish affects
Basically controlled files are:
- /etc/varnish/default.vcl + VCL's additional
- /etc/varnish/secret
- /etc/sysconfig/varnish
- /etc/haproxy/haproxy.conf
Setup Requirements OPTIONAL
Require module concat
Beginning with varnish
The very basic steps needed for a user to get the module up and running.
If your most recent release breaks compatibility or requires particular steps for upgrading, you may wish to include an additional section here: Upgrading (For an example, see http://forge.puppetlabs.com/puppetlabs/firewall).
Usage
git clone https://github.com/danielfnfaria/varnish-puppet varnish
Reference
For add simple site:
varnish::config {'site':
host => '127.0.0.1',# Send connections for haproxy in localhost
port => '8000', # Default port haproxy
vhost => 'site.com.br',
custom_lb => 'lb.site.com.br', # Custom LB AWS CNAME
}
For especific cache:
cache => [
{ 'url' => '/home/index.html', 'time' => '120' }, # Time in seconds
{ 'url' => '^(.*)\.jpg$', 'time' => '60'}, # Accept POSIX regex
]
For no cache especific locations:
nocache => [
'/api/home',
'/lock/google/api',
'/translate/site/all'
]
Limitations
This module work's in Centos6 and Varnish 4, but the addition of debian is in development.
Development
To help make a pull-request
Dependencies
- puppetlabs-stdlib (>= 1.0.0)