On Tuesday, August 14, 2012 4:14:47 PM UTC-5, Jeff McCune wrote:
>
> On Mon, Aug 13, 2012 at 12:36 PM, llowder <llow...@gmail.com <javascript:>
> > wrote:
>
>> If using the nodes/*.pp and having your site.pp be "import 'nodes/*'",
>>
>
> You should avoid using the import statement (see 
> http://projects.puppetlabs.com/issues/12929).  Instead, follow the 
> [module conventions](docs.puppetlabs.com/guides/modules.html)
>  
>

I do have all my classes in modules, and the only place I use import is in 
my site.pp
 

> what is the best practice? Is it better to have one node def per file, or 
>> group the node defs by class (ie, all app servers in one file or all web 
>> servers in one file) or some other layout?
>>
>
> Best practice is to use an external node classifier or place all of your 
> node declarations into one site.pp file.  One file is preferable because 
> one-file-per-node scales poorly to tens of thousands of nodes as Puppet 
> will read tens of thousands of files every time a catalog is compiled.
>  
>

I only have a few dozen nodes to manage at present, and in the next while 
that is only likely to grow from 2-3 dozen to 3-4 dozen, so scaling isn't 
something I need to worry about (though it is something I keep in mind just 
in case of unexpected growth). Using all the nodes in site.pp seems like it 
would scale poorly as well, as then you have a single massive file you have 
to search through every time you need to either add a node or update one.

 

> Also, is there a way to have the node defs broken out without having to 
>> use import 'node/*' ? Or would that be to just list each one out by name?
>>
>
> You could use a single default node and selectively include classes using 
> conditional logic.  Or use an external node classifier.
>  
>

At present, the classes in our modules would have to be reworked in order 
to use an ENC, as they do not allow for direct relationship chaining.  That 
sort of refactoring (to make the classes and modules manage their own 
deps)  is on my list of things to do, as is looking at moving to an ENC, 
but it is goingto be a while before I am able to.


 

> -Jeff
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/QDrWKv1pfI8J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to