Forge Home

varnish

Varnish Module for AWS with Haproxy

8,082 downloads

8,033 latest version

1.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.5 (latest)
  • 0.1.0 (deleted)
released Sep 12th 2015

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'danielfnfaria-varnish', '0.1.5'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add danielfnfaria-varnish
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install danielfnfaria-varnish --version 0.1.5

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

danielfnfaria/varnish — version 0.1.5 Sep 12th 2015

varnish

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.

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