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 Chef Mailing List.

Select Badges

Select Supported Platforms


confd (11) Versions 1.0.4

Application cookbook which installs and configures confd.

cookbook 'confd', '= 1.0.4'
cookbook 'confd', '= 1.0.4', :supermarket
knife cookbook site install confd
knife cookbook site download confd


Application cookbook which installs and configures confd.

It is often the case that application configuration files must be dynamically generated, distributed to a set of machines and a service must be kicked to reload the changes. This faculty can be made to work with Chef, but using confd offers the ability for an immediate configuration change and subsequent bounce of a service across your fleet.

Basic Usage

The default recipe writes a basic configuration out for confd using node attributes that can be modified by changing any of the keys and values in the node['confd']['config'] hash. If the configuration changes on disk Chef will kick the confd service which is running as a service.

The confd_service custom resource provides basic capabilities for a binary or a package installation. By default the binary is downloaded and installed from the confd GitHub project's release page.

Advanced Usage

There are two additional custom resources which provide the means for writing out confd templates and executing confd ad-hoc instead of as a service. The former custom resource assumes that confd has been installed separately as only the service resource performs the actual package or binary installation.

The confd-iptables cookbook provides an excellent example of advanced usage of the custom resource for writing out confd templates. An example of using that custom resource can be seen below, but make sure to take a look at the confd-iptables cookbook default recipe for the latest.

confd_template '/etc/iptables/confd' do
  template_source node['confd-iptables']['template_source']
  prefix node['confd-iptables']['prefix']
  keys { |t| "/groups/#{t}" }

  check_command "/sbin/iptables-restore -n -t < #{path}"
  reload_command "/sbin/iptables-restore -n < #{path}"

  notifies :restart, 'confd_service[confd]', :delayed

Change Log

All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.



Bug Fixes



  • Resource for managing confd templates and configurations.
  • Resource for executing confd command.
  • Resource for running confd as a service.

Foodcritic Metric

1.0.4 passed this metric