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

  1. Fork it ( https://github.com/[my-github-username]/knife-pantry/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request