Chef

Table Of Contents

All about Chef ...

Chef is a systems and cloud infrastructure automation framework that makes it easy to deploy servers and applications to any physical, virtual, or cloud location, no matter the size of the infrastructure. Each organization is comprised of one (or more) workstations, a single server, and every node that will be configured and maintained by the chef-client. Cookbooks (and recipes) are used to tell the chef-client how each node in your organization should be configured. The chef-client (which is installed on every node) does the actual configuration.

The Community

The Chef community is an active, caring, wickedly smart, and fast growing group of practitioners who want to help you succeed with Chef. There are a number of ways for you to engage with, learn from, follow, and contribute, such as reading books, going to meetups, listing to podcasts, taking some training, and simply being a part of the community.

Recommended reading:

See this page for more about the awesome Chef community!

The Workstation

The Basics: About the Workstation | The chef-repo | Knife | Debug Recipes

Install: Install the chef-client on a Workstation | Bootstrap a Node | Create and Sync the chef-repo

Knife: About Knife | Common Options | Working with KnifeCommands: bootstrap | client | configure | cookbook | cookbook site | data bag | delete | deps | diff | download | edit | environment | exec | list | node | raw | recipe list | role | search | serve | show | ssh | ssl check | ssl fetch | status | tag | upload | user | xargsSingle Page: Knife Reference | Knife Quick Reference (image)

Plugins: About Plugins | Common Options | Custom Plugins | Authenticated RequestsCommands: azure | bluebox | ec2 | eucalyptus | google | hp | linode | openstack | rackspace | terremark | windows

Settings: knife.rb | metadata.rb

Tools: chef-shell (executable) | chef-apply (executable)

Chef DK

The Chef development kit defines a common workflow for cookbook development, including unit and integration testing, identifying lint-like behavior, dedicated tooling, and more:

Install: Install the chef-dk

Components: Kitchen | ChefSpec | Foodcritic | Berkshelf | chef-vault | RuboCop

Tools: kitchen (executable) | chef (executable)

Settings: kitchen.yml

The Chef Server

The Chef server acts as a hub for configuration data. The Chef server stores cookbooks, the policies that are applied to nodes, and metadata that describes each registered node that is being managed by the chef-client. Nodes use the chef-client to ask the Chef server for configuration details, such as recipes, templates, and file distributions. The chef-client then does as much of the configuration work as possible on the nodes themselves (and not on the Chef server). This scalable approach distributes the configuration effort throughout the organization.

Note

Chef server 12 is the new Chef server! The documentation for Open Source Chef and Enterprise Chef is still available.

Install Scenarios: Installs | Upgrades

Features: Chef Manage | Reporting | Push Jobs | Chef Analytics | Replication | High Availability

Manage Server: Runbook (all manage tasks in a single topic) — Shorter topics: Backup and Restore | Server Data | Firewalls and Ports | High Availability | Logs | Active Directory and LDAP | Monitor | Organizations, Groups, and Users | Replication | Security | Services | Server Tuning

Chef Manage Webui: Clients | Cookbooks | Data Bags | Environments | Nodes | Reports | Roles

Settings and Tools: chef-server.rb | chef-server-ctl | manage.rb | chef-sync.rb | chef-sync-ctl | opscode-expander-ctl | opscode-reporting-ctl

APIs: Chef Server API | Cookbooks Site API | Push Jobs API

Server Essentials

The server acts as a repository for all of the data that may be needed by the chef-client while it configures a node:

Chef Analytics

Chef Analytics is an analytics platform that provides visibility into what is happening on the server. It runs on separate hardware from the Chef server and consists of several components:

Components: Chef Analytics Webui | Rules | Controls | chef-client audit-mode

Install Chef Analytics: Install | Upgrade

Settings and Tools: Web user interface | opscode-analytics.rb | opscode-analytics-ctl | Analytics API | knife-analytics (plugin)

Cookbooks

The Basics: About Cookbooks | About Recipes | About Attribute Files | Handlers | Popular Cookbooks

Custom Resources: About Custom Resources | Lightweight Resources | Lightweight Providers w/Chef Resources | Lightweight Providers w/Custom Ruby

Other Cookbook Components: About Definitions | About Files | About Libraries | About Cookbook Metadata | About Templates | About Versions

The Recipe DSL: About the Recipe DSLMethods: attribute? | cookbook_name | control | control_group | data_bag | data_bag_item | platform? | platform_family? | reboot_pending | recipe_name | registry_data_exists? | registry_get_subkeys | registry_get_values | registry_has_subkeys? | registry_key_exists? | registry_value_exists? | resources | search | shell_out | shell_out! | shell_out_with_systems_locale | tag | tagged? | untag | value_for_platform | value_for_platform_family | Windows Platform Helpers

Resources: About Resources | Common FunctionalityResources: apt_package | bash | batch | bff_package | breakpoint | chef_gem | chef_handler | cookbook_file | cron | deploy | directory | dpkg_package | dsc_resource | dsc_script | easy_install_package | env | erl_call | execute | file | gem_package | git | group | homebrew_package | http_request | ifconfig | link | log | mdadm | mount | ohai | openbsd_package | package | powershell_script | reboot | registry_key | remote_directory | remote_file | route | rpm_package | ruby_block | script | service | subversion | template | user | windows_package | windows_service | yum_packageSingle Page: Resources and Providers

Community Resources (LWRPs): About LWRPs | Chef-maintained Cookbooks | Supermarket