Giter Club home page Giter Club logo

chef-varnishd's Introduction

varnishd cookbook

A Chef cookbook for installing and configuring Varnish, with some specific design constraints.

  • Varnish and VMODs are installed from source.
  • Every tunable parameter is exposed in the attributes.
  • Services are managed by Upstart to provide straight-forward resource limits, respawing, and control.
  • Carefully triggered and idempotent build/dependency chains to insure Chef runs cleanly in the event of errors.

Requirements

Platforms

Using test kitchen, this cookbook is tested against the following platforms.

  • Ubuntu 12.04, Ubuntu 12.10, Ubuntu 13.04

It'd be reasonable to assume that Ubuntu versions more recent than 13.04 will work as well as Debian and older Ubuntu distributions that have Upstart configured.

Cookbooks

  • apt
  • build-essential
  • git

Usage

Add varnishd::default to your node's run-list. If you do not want to setup the varnishd daemon as a service, you may include varnishd::build and varnishd::vmods seperately instead.

Attributes

It's important to note that the :version, :url, and :checksum attributes must always be modified together and are in no way automatically generated.

key description default
[:varnishd][:version] Complete Varnish version you are installing '3.0.5'
[:varnishd][:url] URL for an source archive of that version 'http://repo.varnish-cache.org/source/varnish-3.0.5.tar.gz'
[:varnishd][:checksum] Checksum for that archive '302fd6afc7โ€ฆ'
[:varnishd][:vcl_source] Template to use to render the VCL 'default.vcl.erb'
[:varnishd][:vcl_cookbook] Cookbook in which to find that template 'varnishd'
[:varnishd][:storage] Storage type and options 'malloc,128M'
[:varnishd][:limit][:nofile] File limit '131072'
[:varnishd][:limit][:memlock] Memory limit '82000'

The mechanism for specifying a VCL template in a wrapping cookbook is the same as in the varnish cookbook.

VMODs

VMODs to build and install can be specified as part of the [:varnishd][:vmods] attribute. For example, to include boltsort.

node.set[:varnishd][:vmods][:boltsort][:repository] = 'https://github.com/vimeo/libvmod-boltsort.git'
node.set[:varnishd][:vmods][:boltsort][:reference] = 'master'

The :reference is optional, and if it is missing master will be used by default.

Varnish Runtime Options

A key feature of this cookbook is providing access to every Varnish runtime option as described in the documentation. These options are listed out in the default attribute file like so.

default[:varnishd][:runtime][:http_max_hdr] = nil #'64'

For most values the default is nil and the value that Varnish will use when the value is not provided is listed in end of line comment. Any value not set to nil will be passed to varnishd when run using the -p flag.

Contributing

Please do! We'll follow the git-flow method, so please submit pull requests as feature branches.

Contributors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.