IS it possible to generate dynamically the configuration of a node ?

31 views
Skip to first unread message

Martin Rodriguez

unread,
Mar 2, 2016, 5:18:48 PM3/2/16
to Puppet Users
Hi,

I'm new to puppet and a java developer.

I'm looking for a way to force the puppet server to connect to my java app to get the configuration of a node ?

If it is possible, could you please give an example of the code like a hello world.

I just simply want to generate file type configs dynamically (configuration inside database) without to write directly the sites.pp file.

Thanks a lot for your help.


Peter Kristolaitis

unread,
Mar 2, 2016, 5:20:43 PM3/2/16
to puppet...@googlegroups.com
This is exactly what an ENC is for:  https://docs.puppetlabs.com/guides/external_nodes.html
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/47676c1a-6302-4936-8d26-938e9177d4fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

jcbollinger

unread,
Mar 3, 2016, 9:06:10 AM3/3/16
to Puppet Users
Puppet will not read manifests or catalogs from a database, but it does have mechanisms for plugging in dynamic components that drive configuration.

The "external node classifier" has already been mentioned -- this is a program that you can provide, and which Puppet will consult for lists of global variable values, classes to apply, and, optionally, class parameter values.  This data can be used either instead of or in addition to node blocks.

Additionally, Puppet's data binding subsystem, Hiera, supports custom back-ends, and it would be possible to write one that works as a wrapper for your application.  If you already have config data in a database, though, it might be more convenient to write a back-end that connects directly to the database.

Hiera can serve in almost all the same capacities that an ENC supports, and in some capacities that an ENC does not directly support.  The two have different strengths, however, and they are not mutually exclusive.


John

Reply all
Reply to author
Forward
Message has been deleted
0 new messages