Knife Role Spaghetti Knife Plugin
Knife plugin for Chef to draw dependency graphs for roles that have become spaghetti.
Install & Usage Instructions
Installation
Requirements
Ruby 1.9.3 and higher.
This plugin requires on Graphviz, and should be installed prior to
installing the plugin.
Graphviz may be obtained through a variety of methods. On OSX an easy method is
via Homebrew:
$ brew install graphviz
Gem install, via RubyGems:
$ gem install knife-role-spaghetti
Usage
NOTE: Ensure that your knife.rb
has the role_path
setting configured.
Since this is a Knife plugin, execution should be performed in your Chef repository.
Execute:
$ knife role spaghetti
with no arguments should result in a new file named role-spaghetti.png
in your
repo root.
$ knife role spaghetti "/tmp/someotherfilename.png"
will place the file in the specified location.
Execute knife role spaghetti -h
for more options.
Examples
From a sample role, courtesy of @jtimberman, along with one from the Opscode Wiki, plus one more cyclic role model, produces this image:
(full resolution here)
Running through the neato renderer (with the -N
switch) produces this image:
(full resolution here)