cookbook 'varnishd', '~> 0.1.3'
varnishd (3) Versions 0.1.3 Follow1
Builds, installs, and configures Varnish and VMODs.
cookbook 'varnishd', '~> 0.1.3', :supermarket
knife supermarket install varnishd
knife supermarket 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.
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][:pid] | Write the daemon's PID to file | '/var/run/varnishd.pid' |
[: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
Dependent cookbooks
apt >= 0.0.0 |
build-essential >= 0.0.0 |
git >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
0.1.3 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.3 failed this metric
FC064: Ensure issues_url is set in metadata: varnishd/metadata.rb:1
FC065: Ensure source_url is set in metadata: varnishd/metadata.rb:1
FC066: Ensure chef_version is set in metadata: varnishd/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: varnishd/metadata.rb:1
FC069: Ensure standardized license defined in metadata: varnishd/metadata.rb:1
FC121: Cookbook depends on cookbook made obsolete by Chef 14: varnishd/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: varnishd/recipes/build.rb:21
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.3 passed this metric
Testing File Metric
0.1.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.3 failed this metric
0.1.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.3 failed this metric
FC064: Ensure issues_url is set in metadata: varnishd/metadata.rb:1
FC065: Ensure source_url is set in metadata: varnishd/metadata.rb:1
FC066: Ensure chef_version is set in metadata: varnishd/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: varnishd/metadata.rb:1
FC069: Ensure standardized license defined in metadata: varnishd/metadata.rb:1
FC121: Cookbook depends on cookbook made obsolete by Chef 14: varnishd/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: varnishd/recipes/build.rb:21
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.3 passed this metric
Testing File Metric
0.1.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.3 failed this metric
FC065: Ensure source_url is set in metadata: varnishd/metadata.rb:1
FC066: Ensure chef_version is set in metadata: varnishd/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: varnishd/metadata.rb:1
FC069: Ensure standardized license defined in metadata: varnishd/metadata.rb:1
FC121: Cookbook depends on cookbook made obsolete by Chef 14: varnishd/metadata.rb:1
FC122: Use the build_essential resource instead of the recipe: varnishd/recipes/build.rb:21
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.3 passed this metric
Testing File Metric
0.1.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.3 failed this metric
0.1.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number