Tinychef
This is a simple tool to manage Chef Solo recipe without having to deal with
knife
command line tool. Tinychef is basically few lines of Ruby code
wrapping shell scripts I used to run my chef recipes.
It aims to be just enough to:
- automate node boostrapping just a little bit
- run recipes on nodes, overriding the run list if necessary
- make it easy to work with encrypted data bags
Installation
$ gem install tinychef
Usage
To create a tinychef compatible directory:
$ tinychef new [dirname]
This will create a new dirname folder with the following structure:
├── cookbooks
├── data_bags
├── imported_cookbooks
├── nodes
├── roles
└── vendor
└── solo.rb
Run a node
$ tinychef run [email protected]
This command will look for a mynode.example.org.json
file in nodes folder
and execute the run list on that. Alternatively you can run:
$ tinychef run nodes/another_node.json [email protected]
If you want to override the run list defined in the node file, append a run list sequence:
$ tinychef run nodes/another_node.json [email protected] "recipe[mybook::myrecipe]"
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request