git clone git://github.com/opscode/chef-repo.git
cd chef-repo
rm -rfv .git
git init && git add . && git commit -m
knife cookbook search cookbook-name
knife cookbook site install cookbook-name
using knife-github-cookbooks
gem install knife-github-cookbooks
knife cookbook github install owner/repo-name
knife cookbook github install owner/repo-name -S # private repository
knife cookbook upload hoge --freeze -E production
there are 2 methods to backup chef-server's data.
backup data is in ./.chef
directory.
cd /usr/local/src
git clone git://github.com/stevendanna/knife-hacks.git
mkdir -p ~/.chef/plugins/knife
ln -s /usr/local/src/knife-hacks/plugins/backup_*.rb ~/.chef/plugins/knife/
knife backup export --backup-directory backup
curl -O https://raw.github.com/jtimberman/knife-scripts/master/chef_server_backup.rb
knife exec chef_server_backup.rb
cd local-chef-repo
for role in `knife role list`;do knife role show $role --format json > roles/$role.json; done
knife bootstrap IP or FQDN