Every Chef installation needs a Chef Repository. This is the place where cookbooks, roles, config files and other artifacts for managing systems with Chef will live. We strongly recommend storing this repository in a version control system such as Git and treat it like source code.
While we prefer Git, and make this repository available via GitHub, you are welcome to download a tar or zip archive and use your favorite version control system to manage the code.
git clone git://github.com/fnichol/chef-repo.git /var/chef-solo
(cd /var/chef-solo && git submodule init && git submodule update)
This repository contains several directories, and each directory contains a README file that describes what it is for in greater detail, and how to use it for managing your systems with Chef.
config/
- Contains the Rake configuration file,rake.rb
.cookbooks/
- Cookbooks you download or create.
The repository contains a Rakefile
that includes tasks that are installed with the Chef libraries. To view the tasks available with in the repository with a brief description, run rake -T
.
The default task (default
) is run when executing rake
with no arguments. It will call the task test_cookbooks
.
The following tasks are not directly replaced by knife sub-commands.
bundle_cookbook[cookbook]
- Creates cookbook tarballs in thepkgs/
dir.install
- Callsupdate
,roles
andupload_cookbooks
Rake tasks.ssl_cert
- Create self-signed SSL certificates incertificates/
dir.update
- Update the repository from source control server, understands git and svn.
The following tasks duplicate functionality from knife and may be removed in a future version of Chef.
metadata
- replaced byknife cookbook metadata -a
.new_cookbook
- replaced byknife cookbook create
.role[role_name]
- replaced byknife role from file
.roles
- iterates over the roles and uploads withknife role from file
.test_cookbooks
- replaced byknife cookbook test -a
.test_cookbook[cookbook]
- replaced byknife cookbook test COOKBOOK
.upload_cookbooks
- replaced byknife cookbook upload -a
.upload_cookbook[cookbook]
- replaced byknife cookbook upload COOKBOOK
.