$ sudo apt-get update
$ sudo aptitude install ruby1.9.1-dev git build-essential
$ sudo gem install bundler
$ git clone --recurse-submodules [email protected]:banyan/chef.git
$ cd ~/chef
$ bundle install --path .bundle/gems
$ sudo ln -s /path/to/chef /root/chef # execute as root
# pwd
/root/chef
# bundle exec chef-solo -c config/solo.rb -j json/secure_ruby_app.json # choose proper json
- Using rbenv-sudo
$ pwd
/home/banyan/chef
$ rbenv sudo bundle exec chef-solo -c config/solo.rb -j json/secure_ruby_app.json # choose proper json
$ cd ~/chef
$ bundle exec knife cookbook create NEW_COOKBOOK_NAME --cookbook-path cookbooks
or Use my tiny wrapper - chef-cooker
$ sudo gem install chef-cooker
$ chef-cooker NEW_COOKBOOK_NAME
$ vi role/PROPER_ROLE.rb
run_list(
"recipe[NEW_COOKBOOK_NAME]", # add cookbook name
"recipe[xmllibs]",
"recipe[git]",
...
- When use secure role,
- default ssh port will be changed from 22 to 10022 (22 will be shutdown)
- Don't forget to change Security Group when using EC2.
- The MIT License (MIT)
- Copyright (c) 2012- Kohei Hasegawa