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

RSS

chef-ingredient (69) Versions 0.11.2

Primitives for managing Chef products and packages

Policyfile
Berkshelf
Knife
cookbook 'chef-ingredient', '= 0.11.2', :supermarket
cookbook 'chef-ingredient', '= 0.11.2'
knife supermarket install chef-ingredient
knife supermarket download chef-ingredient
README
Dependencies
Changelog
Quality 0%

chef-ingredient Cookbook

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

  • 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.

For a product to package matrix, see PRODUCT_MATRIX.md

Support

This cookbook is supported by Chef's engineering services team.

Requirements

Chef version 12.1.0 or higher, latest/current version is always recommended.

Cookbooks

  • apt
  • yum

Platform

  • Ubuntu 12.04, 14.04
  • CentOS 6, 7

Resources

chef_server_ingredient

This is a backwards compatibility shim for the chef_ingredient resource.

chef_ingredient

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.

Actions

  • 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.

Properties

  • product_name: (name attribute) The product name. See the PRODUCT_MATRIX.md. 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.
  • 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.

omnibus_service

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

Actions

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.

Properties

  • 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.

ingredient_config

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

Actions

  • 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.

Properties

  • product_name: (name attribute) The product name. See the PRODUCT_MATRIX.md. 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.

Examples

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]'
end

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

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"
EOS
  action :install
end

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

License and Author

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

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

apt-chef >= 0.0.0
yum-chef >= 0.0.0

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

v0.11.2

  • Add repository and master_token properties to chef_server_ingredient shim for compatibility

v0.11.1

  • #37 use define_matchers for ChefSpec

v0.11.0

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

v0.10.2

  • Add :add action to ingredient_config

v0.10.1

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

v0.10.0

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

v0.9.1

  • #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.

v0.9.0

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

v0.8.1

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

v0.8.0

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

v0.7.0

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

v0.6.0

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.

v0.5.0

  • 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

v0.3.0

  • Add ctl command for supermarket

v0.2.0

  • Add reconfigure property to ingredient resource

v0.1.0

  • Release this cookbook to Supermarket

v0.0.2

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

v0.0.1

  • Initial release

Foodcritic Metric
            

0.11.2 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/202dfb0f814ebbde7079cfdf/chef-ingredient/libraries/helpers.rb:249
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/202dfb0f814ebbde7079cfdf/chef-ingredient/libraries/helpers.rb:250
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/202dfb0f814ebbde7079cfdf/chef-ingredient/libraries/helpers.rb:251
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/202dfb0f814ebbde7079cfdf/chef-ingredient/libraries/helpers.rb:255
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/202dfb0f814ebbde7079cfdf/chef-ingredient/libraries/helpers.rb:256
FC031: Cookbook without metadata file: /tmp/cook/202dfb0f814ebbde7079cfdf/chef-ingredient/metadata.rb:1
FC045: Consider setting cookbook name in metadata: /tmp/cook/202dfb0f814ebbde7079cfdf/chef-ingredient/metadata.rb:1