knife-pantry
Knife plugin that allows you to manage environment specific cookbook versioning.
Installation
Add this line to your application's Gemfile:
gem 'knife-pantry'
And then execute:
$ bundle
Or install it yourself as:
$ gem install knife-pantry
Usage
Currently there are two available commands:
lookup
Lookup allows you to see what version of the specified cookbook is being used in a particular environment. The output also shows you the last five releases on your chef server.
knife pantry lookup <cookbook-name> <chef-environment>
[Environment found!] Looking for cookbook...
[Cookbook found!] Checking current version...
[Version found!] Finding latest releases...
[Releases found!]
0.2.6 <== Current version
0.2.5
0.2.4
0.2.3
0.2.2
set
Set allows you to, well... set a version for the specified cookbook in a particular environment, or environments. A comma seperated list of environments can be passed in to set a version across multiple at once. If your goal is to upgrade to the newest version of a particular cookbook, you can pass in 'latest' instead of specifying a version.
knife pantry set <cookbook-name> <version> <environments>
[Action Complete!] development => 0.2.5 => my_cookbook
[Action Complete!] uat => 0.2.5 => my_cookbook
Contributing
- Fork it ( https://github.com/[my-github-username]/knife-pantry/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request