Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tongueroo/baker
Simple way to run chef recipes
https://github.com/tongueroo/baker
Last synced: about 1 month ago
JSON representation
Simple way to run chef recipes
- Host: GitHub
- URL: https://github.com/tongueroo/baker
- Owner: tongueroo
- Created: 2011-01-13T04:23:48.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2011-01-16T03:46:09.000Z (almost 14 years ago)
- Last Synced: 2024-10-14T22:16:44.004Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 113 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
Baker
=======A simple way to run chef recipes on one server.
Install
-------
gem install baker --source http://gemcutter.org --no-ri --no-rdoc # sudo if you need toUsage
-------I. setup ssh key
Set up your ssh key on the server so you can login into the box without a password. The gem only supports logging in via a .ssh/config shortcut. Your .ssh/config should look something like this:
Host server_name
Hostname xxx.xxx.xxx.xxx
Port 22
User rootII. install chef on the server
Can install chef on the server by using baker.
$ bake --setup server_nameIII. run chef recipes
Create a cookbooks project. Here's an example of a cookbooks project that can be used to install rails: https://github.com/tongueroo/cookbooks-rails
The cookbooks project structure looks like the following:
├── config
│ ├── node.json
│ └── solo.rb
└── cookbooks
├── example_recipe1
│ └── recipes
│ └── default.rb
└── example_recipe2
└── recipes
└── default.rbconfig/node.json and config/solo.rb are important. These are the configurations that get passed to the chef run that will tell it which recipes to run.
config/solo.rb looks like this:
file_cache_path "/tmp/baker"
cookbook_path "/tmp/baker/recipes/cookbooks"config/node.json looks like this:
{
"ec2": true,
"environment": {"name":"production"},
"mysql_root_password":"whatever",
"packages":[
{"name": "git-core"},
{"name": "curl"}
],
"gems":[
{"name": "rails", "version": "3.0.3"},
{"name": "bundler"}
],
"recipes":[
"example_recipe1",
"example_recipe2"
]
}To actually run the chef recipes, cd into the cookbooks project folder and run this command:
$ bake server_nameAfter running chef you should check the /var/log/baker.chef.log on the server itself for possible errors.