Ask Your Question

Exporting resources from a cluster?

asked 2013-02-20 16:57:11 -0600

llowder gravatar image

I'm somewhat familiar with exported resources and how to collect them, but I have found myself in a situation that I am not quite sure the best way to handle.

I have some three clusters of app servers, and each of the three clusters is made up of three nodes. Each node in a given cluster is identical in configuration, except for things that have to differ, like hostname and IP etc.

Each cluster uses the same node def even - through the magic combo of naming schemes and regex.

I need to export a piece of data that is ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2013-03-14 07:42:40 -0600

llowder gravatar image

At the suggestion of some people in IRC, I wound up using puppetdbquery to find all the nodes' hostnames that had a certain file resource. Then I abused inline_template() and other assorted functions from stdlib to transform the list of hostnames across all nodes and environments into a sorted, unique'd list of keys I could use to do a lookup in hiera. Next I did the lookups and put the data into a wiki page, and problem solved without the need for exported resources.

edit flag offensive delete link more

answered 2013-02-21 16:32:38 -0600

Stefan gravatar image

I'd say it is more sane to export the resource only once and then do a normal collect on your collecting host. But now you have to decide which node is responsible to do the export.

If your cluster had a master node or something that does only exist once in a cluster I'd choose the same parameter that identifies a node as the master to decide whether or not the node should export the cluster specific data. If you do not have such a thing you can define an artificial master role like the first node in ... (more)

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


Asked: 2013-02-20 16:57:11 -0600

Seen: 302 times

Last updated: Mar 14 '13