Wrote a tool for managing and applying hieradata changes

15 views
Skip to first unread message

Alec Henninger

unread,
Jan 31, 2017, 3:36:15 AM1/31/17
to Puppet Users
Hi puppet users,

Manually copying keys and values between environments was a real drag, so I wrote a tool to automate this process: https://github.com/alechenninger/monarch/

It enables a kind of workflow like this:

1. Develop your application, as new hiera keys are introduced, add them to a "change" which describes where in your hierarchy you would like what values for what keys to go once this version of your application is in production (say, common.yaml)
2. Cut a release of your application alongside this hiera change.
3. Apply the hiera change at a point lower in the hierarchy than in prod (say, development.yaml). It will know that development.yaml inherits from common, so it will apply all of the changes applicable to common, to development.
4. Once you're ready to go to production, apply the change to common, and redundant keys from lower in the hierarchy (development.yaml in this example) are removed.

Or something like that :-). I've also used it to write and apply changes that toggle configurations not tied to a specific release.

It's worked out well at least for our team. I'd love to get some more feedback on it, and if others find it useful too, that'd be great :-).

Thanks!

Alec
Reply all
Reply to author
Forward
0 new messages