Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
My Chef recipes, cookbooks, etc.
branch: master

This branch is 16 commits behind banyan:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
config
cookbooks
json
roles
.gitignore
.gitmodules
Gemfile
Gemfile.lock
LICENCE
README.md
Rakefile

README.md

My Chef recipes, cookbooks, etc.

image

Install Ruby & Git for chef-solo

Ubuntu

$ sudo apt-get update
$ sudo aptitude install ruby1.9.1-dev git build-essential
$ sudo gem install bundler

Setup

$ git clone --recurse-submodules git@github.com:banyan/chef.git
$ cd ~/chef
$ bundle install --path .bundle/gems

Run Chef

$ 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

Create Cookbooks

Generate Cookbook Template

$ 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

Add Recipe

$ vi role/PROPER_ROLE.rb

run_list(
  "recipe[NEW_COOKBOOK_NAME]", # add cookbook name
  "recipe[xmllibs]",
  "recipe[git]",
    ...

Note

  • 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.

License

  • The MIT License (MIT)
  • Copyright (c) 2012- Kohei Hasegawa
Something went wrong with that request. Please try again.