Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the supermarket mailing list.

Select Badges

Select Supported Platforms


varnishd (3) Versions 0.1.3

Builds, installs, and configures Varnish and VMODs.

cookbook 'varnishd', '~> 0.1.3'
cookbook 'varnishd', '~> 0.1.3', :supermarket
knife cookbook site install varnishd
knife cookbook site download varnishd

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.



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.


  • apt
  • build-essential
  • git


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.


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 ''
[: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][:pid] Write the daemon's PID to file '/var/run/'
[: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 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] = ''
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.


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


Dependent cookbooks

git >= 0.0.0
build-essential >= 0.0.0
apt >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found