Ask Your Question

export node classification groups from Puppet Enterprise

asked 2017-06-29 17:21:55 -0500

bess gravatar image


Is there a way to export and import node classification groups from the PE Console? I would like to export from one server and import into another. I want to export all groups, not just a single one.


edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted

answered 2017-07-11 21:57:07 -0500

reesek gravatar image

Perhaps give puppet-classify a look. An example implementation of it's use can be found here. Not trying to self-promote here, but rather share what I've done to achieve exactly the same as your end goal. Options to export include exporting to a file or to a document store like MongoDB.

My use cases:

For production: I have a nightly cronjob that runs an export of all node groups, and stores them in MongoDB. Makes for a quick recovery if needed.

For vagrant development: Developer A can spin up a local puppet master, create a node group, and export it into MongoDB. This allows Developer B to run an import and capture Developer A's classifications if they're teaming up together but working on their own vagrant instance. In addition, vagrant environments are short lived, so there's a means to hang onto crafted node groups for future iteration, and allows for one to more freely destroy their local development environments knowing all they have to do is import their node groups whenever they're ready to iterate/refactor something 3 months later.

edit flag offensive delete link more

answered 2017-07-03 08:58:01 -0500

fvoges gravatar image

You can use the WhatsARanjit/node_manager module from the Puppet Forge. It adds a type & provider to manage the Node Classifier rules using Puppet.

You can use puppet resource node_group to export you classification rules and puppet apply to restore them.

edit flag offensive delete link more

answered 2017-06-30 02:09:00 -0500

While not strictly a solution to your issue, as no tools (as far as I can see) exist for doing this.

It should be possible by using the Node Classifier API groups endpoint, you could query the existing groups on the source server, remove the IDs from the groups returned, and submit them to the new server. It may need a bit of extra work for groups in a hierarchy as the parent is assigned on ID rather than name, so any tool you create will have to rework them.

Another option would be to restore a DB backup of the source server, but that really depends on how much of the source system you want to bring over.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-06-29 17:21:55 -0500

Seen: 62 times

Last updated: Jul 11