Reading configuration from UI.

84 views
Skip to first unread message

glos...@gmail.com

unread,
Dec 10, 2014, 5:35:38 PM12/10/14
to puppet...@googlegroups.com
Hi,

I am new to puppet infrastructure.

I have a requirement where i need to read configuration from an User Interface and apply them dynamically to the process/application which uses
puppet framework for configuration purpose.

Could someone help me out on how to proceed on this one?

Thanks in advance. 

Felix Frank

unread,
Dec 12, 2014, 1:02:08 PM12/12/14
to puppet...@googlegroups.com
Hi,

could you describe your requirements more specifically?

What kind of data is to be used as input?
Which system can access that data (the Puppet agent or Puppet master)?

Thanks,
Felix

glos...@gmail.com

unread,
Dec 14, 2014, 9:21:57 AM12/14/14
to puppet...@googlegroups.com
What kind of data is to be used as input? 
---Configuration values such as IP:PORT combination, any other that could be of string type. 

Which system can access that data (the Puppet agent or Puppet master)? 
---Puppet master. Is there any difference in agent accessing it?

Felix Frank

unread,
Dec 14, 2014, 2:01:59 PM12/14/14
to puppet...@googlegroups.com
On 12/14/2014 10:21 AM, glos...@gmail.com wrote:
> What kind of data is to be used as input?
> ---Configuration values such as IP:PORT combination, any other that
> could be of string type.
>
> Which system can access that data (the Puppet agent or Puppet master)?
> ---Puppet master. Is there any difference in agent accessing it?

Well, not necessarily, I just wanted to get a feeling for what you were
getting at with your request.

With the additional information, I read it as "I need a UI to configure
Puppet, and other tools should be able to retrieve the configuration
data values".

You can do this with an ENC. Have a look at The Foreman, or the
Dashboard in Puppet Enterprise.

HTH,
Felix

glos...@gmail.com

unread,
Dec 15, 2014, 10:54:04 AM12/15/14
to puppet...@googlegroups.com
Hi Felix,

I have not quite got your reply.

This configuration values will apply to the service managed by the puppet infrastructure.

What i meant is whether there is any support from puppet to read config directly from a UI(this could be a different application) which then
need to be applied to the config of the service managed by puppet.

I have not quite understood about MCollective as well. Is MCollective agent could be a way out?

Thanks,

Felix Frank

unread,
Dec 15, 2014, 1:29:42 PM12/15/14
to puppet...@googlegroups.com
On 12/15/2014 11:54 AM, glos...@gmail.com wrote:
> Hi Felix,
>
> I have not quite got your reply.
>
> This configuration values will apply to the service managed by the
> puppet infrastructure.
>
> What i meant is whether there is any support from puppet to read config
> directly from a UI(this could be a different application) which then
> need to be applied to the config of the service managed by puppet.
>
> I have not quite understood about MCollective as well. Is MCollective
> agent could be a way out?
>
> Thanks,

Ah, so you want to wire an external database into Puppet, so that the
existing data can be used.

The answer is still ENC, although in your scenario, you will not use a
general solution with a web UI. Instead, you will need to write an ENC
script yourself, which will pluck the data from your own system, and
mold them into a format that is appropriate for the Puppet master.

See the documentation for the details:
https://docs.puppetlabs.com/guides/external_nodes.html

As for MCollective - no, I don't believe that it will be very helpful in
getting your configuration data into Puppet.

HTH,
Felix

jcbollinger

unread,
Dec 16, 2014, 2:43:10 PM12/16/14
to puppet...@googlegroups.com


On Monday, December 15, 2014 4:54:04 AM UTC-6, glos...@gmail.com wrote:
Hi Felix,

I have not quite got your reply.

This configuration values will apply to the service managed by the puppet infrastructure.

What i meant is whether there is any support from puppet to read config directly from a UI(this could be a different application) which then
need to be applied to the config of the service managed by puppet.



What does "read config directly from a UI" (emphasis added) mean?  Puppet cannot read anything from the system memory belonging to a different process; no process can without being explicitly wired to perform IPC with the separate process in question.  Your UI can record configuration data somewhere else where Puppet can read it, however.  It might record that information in a database, as Felix interpreted you to mean, or in a file somewhere.

You can access such data via an "external node classifier" (ENC), which is an external program that you provide, or via Puppet's external-data subsystem "Hiera".  To integrate the data via Hiera you would need to either put them in YAML format or to find or write an Hiera back-end that knows how to access them in whatever other form and format you have chosen for them.

"The Foreman" and Puppet Enterprise's dashboard programs Felix mentioned are UIs that provide for recording data about your nodes, and that supply pre-built ENCs with which to integrate that data with Puppet.  There are at least one or two others.  The Foreman is third-party software; the PE dashboard is integrated with (only) the Enterprise version of Puppet.

 
I have not quite understood about MCollective as well. Is MCollective agent could be a way out?



What trap are you in that requires a way out?

MCollective is a separate PuppetLabs product that provides remote control of machines configured to respond to it.  From what you have said so far, I don't see MCollective being relevant to your problem.  On the other hand, I'm still not altogether clear on the nature of the UI you postulate, or of its relationship with Puppet.


John

glos...@gmail.com

unread,
Dec 26, 2014, 9:40:07 AM12/26/14
to puppet...@googlegroups.com
Hi,

Thanks a lot for your reply.

MCollective is a separate PuppetLabs product that provides remote control of machines configured to respond to it.  From what you have said so far, I don't see MCollective being relevant to your problem.  On the other hand, I'm still not altogether clear on the nature of the UI you postulate, or of its relationship with Puppet.

---In my setup, there are two applications (applnA and applnB) running on the same host. My requirement is to configure applnB.
   The configuration values are input to UI and the UI is part of applnA only. 

jcbollinger

unread,
Jan 5, 2015, 2:50:36 PM1/5/15
to puppet...@googlegroups.com


On Friday, December 26, 2014 3:40:07 AM UTC-6, glos...@gmail.com wrote:


---In my setup, there are two applications (applnA and applnB) running on the same host. My requirement is to configure applnB.
   The configuration values are input to UI and the UI is part of applnA only. 



If the application providing the configuration GUI runs on the same machine as the application being configured, then why do you want to put Puppet between?  The only thing I'm coming up with is to revert changes to application B's configuration that are not made via the GUI.  If that's not a significant concern then application A should just configure application B directly.  It will be no harder to code that than to make Puppet do the job, especially given that you are starting from zero with Puppet.  There are many advantages to such direct coupling if you can rely on the applications running on the same host.

If you do want to get Puppet involved, then the GUI program needs to record the configuration data on disk (somewhere other than the target application's config files).  To get that data into Puppet, you could write an ENC, you could use hiera (possibly requiring you to write a custom back-end), or you could write custom parser functions.  In any case you will write Puppet classes and/or defined types modeling the target application's configuration in terms of the data involved (Puppet has rich facilities for this part). 

I apologize for speaking in generalities, but you haven't provided any specifics for us to work with.


John



Reply all
Reply to author
Forward
0 new messages