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

Select Status


chef-ingredient (69) Versions 2.0.5

Primitives for managing Chef products and packages

cookbook 'chef-ingredient', '= 2.0.5', :supermarket
cookbook 'chef-ingredient', '= 2.0.5'
knife supermarket install chef-ingredient
knife supermarket download chef-ingredient
Quality 86%

chef-ingredient Cookbook

Build Status Cookbook Version

This cookbook provides primitives - helpers and resources - to manage Chef Software, Inc.'s products and add-ons including, but not limited to:

  • Chef Server 12
  • Chef Analytics
  • Chef Delivery
  • Chef Push
  • Supermarket

It will perform component installation and configuration. It provides no recipes. Instead, wrapper cookbooks should be created using the resources that this cookbook provides.

Maintainers and Support

This cookbook is maintained and supported by Chef's engineering services team. This cookbook runs through our internal Chef Delivery system, and changes must be approved by a member of engineering services.



  • Ubuntu 12.04, 14.04, 16.04
  • CentOS 6, 7


  • Chef 12.5+


  • none



A "chef ingredient" is the core package itself, or products or add-on components published by Chef Software, Inc. This resource manages the installation, configuration, and running the ctl reconfigure of individual packages.

By default, chef_ingredient will install using the stable repository depending on the platform. However, it can be configured to use a custom repository by setting the node['chef-ingredient']['custom-repo-recipe'] attribute (nil by default).


  • install - (default) Configures the package repository and installs the specified package.
  • uninstall - Uninstalls the specified package.
  • remove - Alias for uninstall
  • reconfigure - Performs the ctl reconfigure command for the package.


  • product_name: (name attribute) The product name. See the For example, chef-server, analytics, delivery, manage, etc.
  • config: String content that will be added to the configuration file of the given product.
  • ctl_command: The "ctl" command, e.g., chef-server-ctl. This should be automatically detected by the library helper method chef_ctl_command, but may need to be specified if something changes, like a new add-on is made available.
  • options: Options passed to the package resource used for installation.
  • version: Package version to install. Can be specified in various semver-alike ways: 12.0.4, 12.0.3-rc.3, and also :latest/'latest'. Do not use this property when specifying package_source. Default is :latest, which will install the latest package from the repository.
  • channel: Channel to install the products from. It can be :stable (default), :current or :unstable.
  • package_source: Full path to a location where the package is located. If present, this file is used for installing the package. Default nil.
  • timeout: The amount of time (in seconds) to wait to fetch the installer before timing out. Default: default timeout of the Chef package resource - 900 seconds.
  • accept_license: A boolean value that specifies if license should be accepted if it is asked for during reconfigureaction. This option is applicable to only these products: manage, analytics, reporting and compliance. Default: false.
  • platform: Override the auto-detected platform for which package to install.
  • platform_version: Override the auto-detected platform version for which package to install.
  • architecture: Override the auto-detected architecture for which package to install.
  • platform_version_compatibility_mode: Find closest matching package when platform auto-detection does not find an exact package match in the repository


Manages a sub-service within the context of a Chef product package. For example the rabbitmq service that is run for the Chef Server.


This delegates to the ctl command the service management command specified in the action. Not all the service management commands are supported, however, as not all of them would make sense when used in a recipe. This resource is primarily used for sending or receiving notifications. See the example section.


  • ctl_command: The "ctl" command, e.g. chef-server-ctl. This should be automatically detected by the library helper method chef_ctl_command, but may need to be specified if something changes, like a new add-on is made available.
  • service_name: (name attribute) The name of the service to manage. Specify this like product_name/service, for example, chef-server/rabbitmq.


Makes it easy to create update configuration files of each Chef product. It uses the default locations for each product.


  • render - (default) Creates the configuration file using the options passed in via add action or config attribute of chef_ingredient resource.
  • add - Adds the config attribute contents to the data collection. Must run :render action to generate the file.


  • product_name: (name attribute) The product name. See the For example, chef-server, analytics, delivery, manage, etc.
  • sensitive: (default false) Set to mask the config contents in logs. Use when you config contains information like passwords or secrets.
  • config: String content that will be added to the configuration file of the given product.


We may need to restart the RabbitMQ service on the Chef Server, for example when adding configuration for Chef Analytics.

template '/etc/opscode/chef-server.rb' do
  notifies :restart, 'omnibus_service[chef-server-core/rabbitmq]'

omnibus_service 'chef-server-core/rabbitmq' do
  action :nothing

To install Chef Server using some custom configuration options:

chef_ingredient "chef-server" do
  config <<-EOS
api_fqdn "#{node["fqdn"]}"
ip_version "ipv6"
notification_email "#{node["chef_admin"]}"
nginx["ssl_protocols"] = "TLSv1 TLSv1.1 TLSv1.2"
  action :install

ingredient_config "chef-server" do
  notifies :reconfigure, "chef_ingredient[chef-server]"

To install or upgrade lastest version of Chef Client on your nodes:

chef_ingredient "chef" do
  action :upgrade
  version :latest

To install an addon of Chef Server from :current channel:

chef_ingredient 'chef-server' do
  channel :stable
  action :install

chef_ingredient 'analytics' do
  channel :current
  action :install

License & Authors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

chef-analytics Applicable Versions
chef-compliance Applicable Versions
chef-server Applicable Versions
chef-server-ingredient Applicable Versions
chef_fedora_base Applicable Versions
chef_software Applicable Versions
chefdk Applicable Versions
cinc-omnibus Applicable Versions
deploy-context Applicable Versions
inspec-cron Applicable Versions
inspec_cron Applicable Versions
managed-chef-server Applicable Versions
managed_chef_server Applicable Versions
omnibus Applicable Versions
push-jobs Applicable Versions
supermarket-omnibus-cookbook Applicable Versions

chef-ingredient Cookbook CHANGELOG

This file is used to list changes made in each version of the chef-ingredient cookbook.

2.0.5 (2017-04-24)

  • #155 Workaround chef_ingredient timeout property on Windows (windows_package timeout property currently broken in Chef)
  • #158 Remove #check_deprecated_properties logic (handled by mixlib-install)
  • Allow chef_ingredient action :upgrade on Windows

2.0.4 (2017-04-13)

  • Ensure mixlib-install ~> 3.2 is installed

2.0.3 (2017-04-13)

  • Normalize architectures detected by ohai before mixlib-install validation

2.0.2 (2017-04-11)

  • Update resources to support Chef 12.5 and 12.6

2.0.1 (2017-03-28)

  • Update DefaultHandler and OmnitruckHandler to use a global constant lookup. In some environments, not doing so caused a naming conflict with the dynamically generated ChefIngredient DSL resource class.

2.0.0 (2017-03-24)

  • Remove chef_server_ingredient resource shim
  • Update mixlib-install to major version 3
    • platform_version_compatibility_mode property no longer has a default value
    • If no matching artifacts are found a Mixlib::Install::Backend::ArtifactsNotFound exception is raised instead a RuntimeError
  • All resources have been converted to custom resources

1.1.0 (2017-03-01)

  • Test with local delivery and not Rake
  • Remove sensitive property for Chef 13 compatibility as this properly is provided by chef-client now for us by any resource and doesn't need to be defined
  • Test in Travis CI with kitchen-dokken and convert tests to InSpec

1.0.1 (2017-02-22)

  • Testing cleanup for Chef 13 compatibility and testing on the latest platforms

1.0.0 (2017-02-15)

  • Require Chef 12.5+ and remove compat_resource dependency
  • Use mixlib-install >= 2.1.12 - this brings in an important fix for the delivery -> automate package rename. See the Discourse announcement for details on the rename

0.21.4 (2017-02-13)

  • Add properties to override the platform details of a chef_ingredient product to install

0.21.3 (2017-02-02)

  • Add timeout to package resource created by configure_from_source_package

0.21.2 (2016-10-26)

  • Fix issue when failed package installs using OmnitruckHandler would not raise a converge error on subsequent runs

0.21.1 (2016-10-25)

  • Update SUSE platform to use DefaultHandler

0.21.0 (2016-09-26)

  • Update mixlib-install to version 2.0 (PackageRouter support)

0.20.0 (2016-09-08)

  • Remove extraneous converge_by that caused downloads to show as converged on every run
  • Use compat_resource cookbook to add support for Chef 12.1-12.4
  • Use apt_update resource vs. the apt cookbook in the test cookbook
  • Update Travis CI testing to use our standard Rakefile and cookstyle for ruby linting.
  • Fix chefspec / foodcritic / test kitchen failures
  • Swap the Policyfile for a Berksfile
  • Remove unnecessary action and default_action properties from the custom resources


  • Remove delivery-cli examples and tests (we now shipit with ChefDK)
  • Set version constraint to ~> 1.1 for installing mixlib-install from Rubygems


  • #106 Limit remote_file backups to 1
  • #110 Get rid of default: nil warnings


  • Add platform_version_compatibility_mode property to chef_ingredient which makes chef-ingredient select packages built for earlier version of a platform during install when a package does not exist for the current platform version.


  • Add accept_license property to chef_ingredient which can accept license for Chef products when applicable.


  • Set version constraint to ~> 1.0 for installing mixlib-install from Rubygems


  • Bump mixlib-install version to 1.0.6 so unstable channel artifacts won't include metadata.json files.


  • #85 Ability to support unstable channel for all products / platforms.
  • #90 Use packages from instead of package cloud & remove packagecloud repository setup.
  • #91 Deprecate chef-ha, chef-marketplace, chef-sync, push-client, push-server in favor of ha, marketplace, sync, push-jobs-client, push-jobs-server.


  • #77 Enable installation of chef and chefdk from unstable
  • #82 Set --force-yes for older Debian/Ubuntu


  • #62 Do not assume connection to the internet, allow custom recipe for a local repository
  • #75 omnitruck handler windows implementation


  • #66 Fix push job client and server naming
  • #68 Use mixlib-install while installing / upgrading packages from omnitruck
  • #71 Convert omnibus_service and ingredient_config to "12.5 custom resources"
  • #73 Use PRODUCT_MATRIX from mixlib-install


  • #58 Add Chef Compliance product


  • #57 Content accumulator guard


  • #56 Uncomment use_inline_resources, this is required for the providers to work properly
  • #55 Remove unit tests for specifically the custom resources
  • #54 Clarify maintainer/support in the README


  • #53 Relax version constraints


  • Refactor chef_ingredient and prepare to handle install/upgrade from omnitruck
  • Add channel property to chef_ingredient
  • Removed installed state property
  • Use product_name instead of package_name
  • Add not if to skip ingredient_config render if config property isn't used


  • Remove resource_name from Provider because :facepalm:


  • Add repository and master_token properties to chef_server_ingredient shim for compatibility


  • #37 use define_matchers for ChefSpec


  • #35 Add fqdn_resolves? method for chef-server cookbook.


  • Add :add action to ingredient_config


  • #30 Supermarket doesn't use supermarket.rb for configuration, it's supermarket.json


  • #23 Add Chef Marketplace
  • #29 Fix RSpec and noisy warnings


  • #26 Remove mode, owner, and group properties from ingredient_config's resources to prevent resource updates after running ctl commands that manage those file permissions.


  • Add sensitive property to ingredient_config
  • Use recipe DSL to set resource name


  • Update with correct updated Chef Push product names (push-server, push-client). The code was updated but not the document.


  • #7 Add ingredient_config resource
  • #10 Add upgrade action for chef_ingredient
  • Test cleanup, various rubocop fixes


  • #3 Allow :latest as a version
  • Removes the package_name property from the chef_ingredient resource, long live product_name


Breaking changes This version is backwards-incompatible with previous versions. We're still sub-1.0, but those who wish to use the chef_server_ingredient resource really should pin to version 0.5.0.

  • #1 Use product names instead of package names.


  • Major refactor and rename. It's fine, this is a new cookbook!

v0.4.0 (2015-06-11)

  • Add timeout attribute to chef_server_ingredient
  • Use declare_resource DSL method to select local package resource
  • Allow specifying the repository name for the packagecloud repo

v0.3.2 (2015-04-15)

  • adding proxy support for packagecloud

v0.3.1 (2015-04-09)

  • Various refactoring and cleanup


  • Add ctl command for supermarket


  • Add reconfigure property to ingredient resource


  • Release this cookbook to Supermarket


  • #4: define the installed attribute
  • #1, #2, use packagecloud cookbook


  • Initial release

Collaborator Number Metric

2.0.5 passed this metric

Contributing File Metric

2.0.5 passed this metric

Foodcritic Metric

2.0.5 failed this metric

FC067: Ensure at least one platform supported in metadata: chef-ingredient/metadata.rb:1
Run with Foodcritic Version 10.3.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric

2.0.5 passed this metric

No Binaries Metric

2.0.5 passed this metric

Testing File Metric

2.0.5 passed this metric

Version Tag Metric

2.0.5 passed this metric