Re: [Puppet Users] Searching for Nodes

jcbollinger
Thu, 24 Jan 2013 19:34:40 -0000

On Thursday, January 24, 2013 12:13:01 PM UTC-6, Brian Malinconico
wrote:
>
> Hello Bill,
>
> Thank you for the feedback. We are actually using haproxy, and will
> undoubtedly use the stock book, it was just the example.
>
> I guess I am confused as to the pattern. I have looked over the nagios
> examples many times but I am still unsure. T
>
> he final example would be how to distribute a database IP without
> hard-coding it.
>
> My understanding of the exported resources would be that the database
> needs to export the configuration file, and the application servers would
> need to import that file. This means that the database box needs to have
> application level knowledge to create the config file needed.
>
> What am I not understanding? Is the puppet pattern to set the $database_ip
> variable?
>
>
At a high level, there are two basic alternatives:

1) The master "knows" the data with which nodes should be configured,
and
dispenses it to each node as needed, or
2) nodes publish resources containing information about themselves that
other nodes may collect and use.

The two are not exclusive.

For the case of configuring application servers with a database IP, you
could operate either way.  The master has to know which node is the
database server in order to configure that node appropriately, so that
information is in the master somewhere.  If it is only a question of
converting a hostname to an IP address, or of structuring data and
manifests so that the database server can easily be changed, then those are
issues that can be handled.

On the other hand, it can be very convenient to use exported resources for
this sort of thing.  The question, then, is what resource to export.  If
the application server''s configuration file needs information that the
database server cannot provide, then the exported resource solution is for
the database server to export a file fragment instead of an entire file
(see the Concat add-on module, available from the Forge).

Remember also that we speak loosely when we talk about information that the
database server can provide, or that the application server can provide.
The only things that are actually provided by any node during catalog
compilation are node facts.  It is the *master* that has to have
"application-level" knowledge such as file format details.  That
information is therefore available during the compilation of *any*
node''s
catalog.


John

--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit