Hi CJ,

> On 10. Jun 2019, at 17:12, CJ Ess <[email protected]> wrote:
> 
> I need some advice -
> 
> In my environment I have multiple groups which manage multiple applications 
> in three different environments (dev/qa/prod). The layout of the puppet files 
> is very non-standard and that causes problems. The three environments have 
> subtle differences which are codified in puppet.

I usually explain that Puppet environments are not related to Platform stages, 
but to Puppet code quality.
Differences in platform stages are placed into hiera (e.g. different 
application settings).

> 
> The node classes are always going to be named after the servers (the name 
> includes the environment, so there are three of them).

You can make use of the naming convention and write a custom fact which will 
parse the servername and set a fact to be used in hiera.
> 
> The puppet code for the servers typically has a common part and an 
> environment specific part.
> 
> Anyone have a good layout that would allow arranging the server definitions 
> in a puppet friendly way?

Have you looked into roles and profiles?
This is a standard way to classify nodes (business use case role) and to 
specify applications and configurations by using implementation profiles.

hth,
Martin

> 
> I was kind of thinking that the layout would be:
> 
> modules/<group_name>/<application_name>/init.pp (for common parts)
> modules/<group_name>/<application_name>/<env>.pp (for environment parts, 
> requiring common parts)
> 
> And then the node class would just include 
> <group_name>::<appliation_name>::<env>
> 
> Anyone have a better method?
> 
> 
> -- 
> 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 [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/d915bcdc-7ea0-434e-890b-4f3b08b0cc2d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/FBBD2A3C-1212-4BB4-9856-609D30462672%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to