Git Product home page Git Product logo

knife-role-spaghetti's Introduction

knife-role-spaghetti

Build Status Dependency Status Code Climate

Knife plugin for Chef to draw dependency graphs for roles that have become spaghetti.

Installation

Requirements

Ruby 1.9.2 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:

Sample Roles

(full resolution here)

Running through the neato renderer (with the -N switch) produces this image:

Sample Roles Neato

(full resolution here

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Test your changes (rake test)
  4. Commit your changes (git commit -am 'Added some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

Changelog

v0.0.3

  • Fixed JSON roles loading #7 - Thanks @miah & @tezz!
  • Re-implemented the DRY proposed by @jtimberman in #1, with a different method
  • Prevent a role and recipe sharing the same name from colliding
  • Figured out correct testing requirements matrix for Travis
  • Added some more verbose logging options

v0.0.2

  • Updated CLI banner to reflect that filename is not required, renamed for clarity
  • Improved handling cases where a role contains recipes named the same as the role
  • Added handling for roles in JSON format

v0.0.1

  • Initial commit

License

Author:: Mike Fiedler ([email protected]) Copyright:: Copyright (c) 2012 Mike Fiedler License:: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

knife-role-spaghetti's People

Contributors

miketheman avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.