[chef] releasing knife-santoku: a drop in replacement for knife that helps you build out internal processes


Chronological Thread 
  • From: Kevin Nuckolls < >
  • To: chef < >
  • Subject: [chef] releasing knife-santoku: a drop in replacement for knife that helps you build out internal processes
  • Date: Tue, 15 May 2012 16:28:08 -0500

Ohai Chefs!

We wanted to be able to notify a chatroom whenever anyone made changes to the chef server, this became more of a problem as the operations team got larger. I wrote knife-santoku as a drop in replacement for knife that lets you run arbitrary code before or after any knife command. The primary use case is matching what command was run and sending off notifications but you can build out any processes with it.

Today we're open sourcing it!
https://github.com/knuckolls/knife-santoku

Here's how it works. After you install it you drop your configuration in config/santoku-config.yml and you drop something like this in config/santoku-after.rb.

require 'etc'
match /cookbook upload (.*)/ do |cookbook|
  notify :hipchat, "#{Etc.getlogin} finished uploading #{cookbook}"
end

match /create/ do
  notify :hipchat
end

match /delete/ do
  notify :hipchat
end

This will send off notifications whenever anyone creates, or deletes something from the chef server and as you can see i've made a custom message for the cookbook upload matcher. If you don't use hipchat all you need to do is write a custom santoku notifier plugin and you'll be good to go.

Hope some of you find this useful. Let me know if there's anything you want added or better yet send a pull request.

Thanks,

Kevin Nuckolls
Senior Software Engineer
Mosaik Solutions



Archive powered by MHonArc 2.6.16.

§