Sadly, installing a standalone version (“Chef Solo”) on a Windows box is not that simple, even if there are some instructions available. So, here is a step-by-step guide of what I did:
- Install the Chef client (it is only available as an .MSI file – I would prefer a .ZIP or such, since the installer just copies a few files and modifies the PATH variable)
- Create a Chef repository:Yes, this requires a Git client…
> git clone git://github.com/opscode/chef-repo.git
> cd chef-repo - Configure Knife (the commandline interface) by creating the file .chef/knife.rb:
root = File.absolute_path(File.dirname(__FILE__))
cookbook_path root + '/../cookbooks' - Download a sample cookbook:
> cd cookbooks
> knife cookbook site download getting-started
> tar zxvf getting-started-0.3.0-tar.gz
> del getting-started-0.3.0-tar.gz - Configure Chef-Solo by creating the files .chef/solo.rb……and .chef/solo.json:
root = File.absolute_path(File.dirname(__FILE__))
file_cache_path root + '/..'
cookbook_path root + '/../cookbooks'{
"run_list": [ "recipe[getting-started::default]" ]
} - Run the recipe:...which creates a "chef-getting-started.txt" file in your home directory.
> chef-solo -c .chef/solo.rb -j .chef/solo.json
Now you can create your own cookbook (“knife cookbook create my_cookbook”) and start cooking…