Giter VIP home page Giter VIP logo

puppet-catalog-diff's Introduction

What?

A tool to compare two Puppet catalogs.

While upgrading versions of Puppet or refactoring Puppet code you want to ensure that no unexpected changes will be made prior to doing the upgrade.

This tool will allow you to diff catalogs created by different versions of Puppet. This will let you guage the impact of a Puppet upgrade before actually touching any of your nodes.

This tool is delivered as a Puppet Face. It thus requires a Puppet installation to properly run.

The diff tool recognizes catalogs in yaml, marshall, or pson format.

Validation Process:

  • Grab a catalog from your existing machine running the old version

  • Configure your new Puppet master, copy the facts from your old master to the new one

  • Compile the catalog for this host on the new master:

    puppet master --compile fqdn > fqdn.pson

  • Puppet puts a header in some catalogs compiled in this way, remove it if present

  • At this point you should have two different catalogs. To compare them run:

    puppet catalog diff

Example Output:

During the transition of 0.24.x to 0.25.x there was a serialization bug that resulted in unexpected file content changes, I've recreated this bug in a tiny 2 resource catalog, the output below shows how this tool would have highlighted this bug prior to upgrading any nodes.

Resource counts:
  Old: 2
  New: 2

Catalogs contain the same resources by resource title


Individual Resource differences:
Old Resource:
  file{"/tmp/foo":
    content => d3b07384d113edec49eaa6238ad5ff00
  }

New Resource:
  file{"/tmp/foo":
    content => dbb53f3699703c028483658773628452
  }

Had resources simply gone missing - not the case here - you would have seen a list of that.

This code only validates the catalogs, it cannot tell you if the behavior of the providers that interpret the catalog has changed so testing is still recommended, this is just one tool to take away some of the uncertainty.

You can get some inline help with:

puppet man catalog

Installation?

This version works best with Puppet 3.0.0 or newer, simply install it with the module tool into your module path:

# puppet module install ripienaar-catalog_diff
# puppet man catalog diff

Changelog?

  • 2012/10/20 - Make it a puppet face

  • 2010/10/19 - Change options and logic so it's easier to use comparing catalogs from the same version of puppet

Who?

R.I.Pienaar [email protected] / www.devco.net / @ripienaar

puppet-catalog-diff's People

Contributors

binford2k avatar bodepd avatar chaoranxie avatar ripienaar avatar savar avatar zaphod42 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

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.