Skip to content

Instantly share code, notes, and snippets.

@lyondhill
Created November 6, 2012 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lyondhill/4022886 to your computer and use it in GitHub Desktop.
Save lyondhill/4022886 to your computer and use it in GitHub Desktop.
how to run chef-solo
sudo mkdir /etc/chef/
# put cookbooks, roles and data bags in the directories shown below, feel free to change them to whatever works best for you.
cat > /etc/chef/solo.rb <<END
file_cache_path "/var/chef-solo"
cookbook_path "/var/chef-solo/cookbooks"
role_path "/var/chef-solo/roles"
data_bag_path "/var/chef-solo/data_bags"
END
# build your run list like so
cat > ~/node.json <<END
{
"run_list": [ "role[my_role]", "recipe[blah]" ]
}
END
# run chef solo like this
chef-solo -j ~/node.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment