Configures Varnish Cache with custom resources.
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you'd like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.
Requires Chef Infra Client 15.3 and above.
See LIMITATIONS.md for package availability and platform notes.
This cookbook has migrated from recipes and node attributes to a full custom-resource API. See migration.md before upgrading from a recipe-based release.
The primary varnish resource installs the package, configures the service, renders the default VCL, and optionally configures logging.
varnish 'default' do
major_version 6.0
ncsa_action :configure
action :install
endUse distro packages instead of the Varnish Packagecloud repository:
varnish 'default' do
repo_action :nothing
ncsa_action :configure
action :install
endConfigure Varnish to listen on port 80 with a custom VCL template:
varnish 'default' do
listen_port 80
storage 'malloc'
vcl_source 'custom.vcl.erb'
vcl_cookbook 'my_cookbook'
vcl_variables(
config: {
backend_host: '127.0.0.1',
backend_port: '8080',
}
)
action :install
endThe following resources are provided:
This project exists thanks to all the people who contribute.
Thank you to all our backers!
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.