Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/banyan/chef
My Chef recipes, cookbooks, etc.
https://github.com/banyan/chef
Last synced: 19 days ago
JSON representation
My Chef recipes, cookbooks, etc.
- Host: GitHub
- URL: https://github.com/banyan/chef
- Owner: banyan
- License: mit
- Created: 2012-07-06T18:16:54.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-11-08T17:59:14.000Z (over 12 years ago)
- Last Synced: 2024-12-21T00:28:07.050Z (about 2 months ago)
- Language: Ruby
- Homepage:
- Size: 143 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# My Chef recipes, cookbooks, etc.
![image](http://banyan.github.com/images/han_solo.jpg)## 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 [email protected]: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
```### Run Chef as normal user
* Using [rbenv-sudo](https://github.com/dcarley/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
```## 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](https://github.com/banyan/chef-cooker)
```
$ sudo gem install chef-cooker
$ chef-cooker NEW_COOKBOOK_NAME
```### Add Recipe
```
$ vi role/PROPER_ROLE.rbrun_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