Chef - ArchWiki

# Chef

From ArchWiki

Chef is a configuration management tool written in Ruby and Erlang. It uses a pure-Ruby, domain-specific language (DSL) for writing system configuration "recipes". Chef is used to streamline the task of configuring and maintaining a company's servers, and can integrate with cloud-based platforms such as Rackspace, Internap, Amazon EC2, Google Cloud Platform, OpenStack, SoftLayer, and Microsoft Azure to automatically provision and configure new machines. Chef contains solutions for both small and large scale systems, with features and pricing for the respective ranges.

## Chef Development Kit

Chef Development Kit (ChefDK) is a streamlined development and deployment workflow for Chef platform. It includes:

- Chef
- Berkshelf
- Test Kitchen
- ChefSpec
- Foodcritic

### Installation

Install the chef-dkAUR package from AUR. This is the recommend installation method to get `chef-client`, `chef-solo`, `chef-zero`, `chef-apply` and `chef-shell` (typically for use on workstations).

## Omnibus Chef Installer

A monolithic package that provides Chef.

### Installation by Package

Install the omnibus-chefAUR[broken link: archived in aur-mirror] package from AUR. If not using an AUR helper, first install the needed dependency, ruby-bundler.

This package builds and installs an omnibus Makeself installer for Chef. If you choose not to run the installer upon installation of the package, you can run it any time:

    # /usr/local/bin/chef-installer

### Installing from Source

     $ git clone https://github.com/opscode/omnibus-chef.git
     $ cd omnibus-chef

Wipe out any previous installations and the omnibus cache:

    # rm -Rf /opt/chef/* /var/cache/omnibus/*

Set up the directories and change the ownership to yourself so building as root is not required:

    # mkdir -p /opt/chef /var/cache/omnibus
    # chown -R "$USER:users" /opt/chef
    # chown -R "$USER:users" /var/cache/omnibus

Run the following to build:

    $ bundle install --binstubs
    $ bundle exec omnibus clean chef
    $ bundle exec omnibus build chef

After that, you may like to change the ownership of directories back to the system:

    # chown -R root:root /opt/chef
    # chown -R root:root /var/cache/omnibus

A Makeself portable installer will be created, e.g. chef-11.8.2_0.arch.3.12.6-1-ARCH.sh. Run this executable to install chef.

### Uninstallation

Remove all installation files manually:

    # rm -Rf /opt/chef

You can also ensure the omnibus cache is removed:

    # rm -Rf /var/cache/omnibus

## Other Installation Methods

Note: Do not use these methods. It is recommended to install ChefDk or use the Omnibus installer method (see above). This section is included only for completeness-sake.

### By Package

Install the ruby-chefAUR[broken link: archived in aur-mirror] package from AUR.

### By RubyGem

This is one of easiest ways to install Chef, but it is highly not recommended. If you already have gem versions of the dependencies installed to the system you could run into conflicts.

Ensure you first install the ruby package from the official repositories. This also provides RubyGems.

Next, install the Chef RubyGem:

     # gem install chef

Categories:

- System administration
- Development

Hidden category:

- Pages with broken package links