Hi folks, This may be a totally dumb question, but hey.. sometimes I''m dumb.... recently I''ve been rocking template''s like a crazy person.. and I''m wondering, is there any reason why I shouldn''t use templates for *all* files I want to manage, rather then have some files defined under files directory some in templates, and some content defined in the manifest itself.. I''m thinking that as I train our team to use puppet, having two possible source of content to look at would be easier then three. Are there any pro/cons to using templates exclusively? Thanks! -a -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Oct 25, 2010 at 8:12 AM, Alaric <paxindustria@gmail.com> wrote:> Hi folks, > > This may be a totally dumb question, but hey.. sometimes I''m dumb.... > > recently I''ve been rocking template''s like a crazy person.. and I''m > wondering, is there any reason why I shouldn''t use templates for *all* files > I want to manage, rather then have some files defined under files directory > some in templates, and some content defined in the manifest itself.. I''m > thinking that as I train our team to use puppet, having two possible source > of content to look at would be easier then three. Are there any pro/cons to > using templates exclusively? >You may end up with files that have template expansion syntax inside them that you weren''t expecting? Have you looked at the file() function? It''s very similar to template, but without the templating. Unfortunately it''s not quite consistent with the template function, but we are going to fix that. It takes absolute paths, not module-based. https://projects.puppetlabs.com/issues/4885 is the ticket to watch for us adding the "~" syntax and making the file/template functions consistent.> > Thanks! > > -a > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- Nigel Kersten Product Manager, Puppet Labs http://www.puppetlabs.com Twitter: @nigelkersten -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Oct 25, 2010, at 8:12 AM, Alaric wrote:> Hi folks, > > This may be a totally dumb question, but hey.. sometimes I''m dumb.... > > recently I''ve been rocking template''s like a crazy person.. and I''m wondering, is there any reason why I shouldn''t use templates for *all* files I want to manage, rather then have some files defined under files directory some in templates, and some content defined in the manifest itself.. I''m thinking that as I train our team to use puppet, having two possible source of content to look at would be easier then three. Are there any pro/cons to using templates exclusively?Sure, it''s slower. That being said, I''m not sure if the performance difference will be big enough it matter. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Oct 25, 2010 at 9:52 AM, Patrick <kc7zzv@gmail.com> wrote:> > On Oct 25, 2010, at 8:12 AM, Alaric wrote: > > > Hi folks, > > > > This may be a totally dumb question, but hey.. sometimes I''m dumb.... > > > > recently I''ve been rocking template''s like a crazy person.. and I''m > wondering, is there any reason why I shouldn''t use templates for *all* files > I want to manage, rather then have some files defined under files directory > some in templates, and some content defined in the manifest itself.. I''m > thinking that as I train our team to use puppet, having two possible source > of content to look at would be easier then three. Are there any pro/cons to > using templates exclusively? > > Sure, it''s slower. That being said, I''m not sure if the performance > difference will be big enough it matter. > >Also, in case it wasn''t clear, there are fundamental differences between file/template and a source specified file like puppet:///foo/bar The former will: * be shipped as part of the catalog * always be shipped to the client in the catalog regardless of client state * can be applied offline The latter will: * not be shipped as part of the catalog * fetched at catalog application time, but only if the client requires it * cannot be applied offline -- Nigel Kersten Product Manager, Puppet Labs http://www.puppetlabs.com Twitter: @nigelkersten -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
----- "Nigel Kersten" <nigel@puppetlabs.com> wrote:> Also, in case it wasn''t clear, there are fundamental differences > between file/template and a source specified file like > puppet:///foo/bar > > > The former will: > > > * be shipped as part of the catalog > * always be shipped to the client in the catalog regardless of client > state > * can be applied offline >There is an often overlooked reason to use content and not source. If you''re deploying manifests and code that are sensitive to being the right combination of config files vs source you absolutely want to avoid using source and favor content. Puppet has a catalog cache and will use the cache if anything went wrong during compilation of your new catalog. The ''something goes wrong'' can literally be anything like syntax errors but also software crashes, being out of memory, write errors to disk or any of a 100 other factors. In this scenario puppetd will use the old catalog BUT it will still fetch files with source from the master. Should a file fetch pass it will apply the just downloaded file. In this scenario its conceivable that you end up with a scenario where your manifests are out of sync with the files being installed on your servers and this could render your servers broken. If you have very sensitive combo''s of software, config and supporting files all being copied out and applied with puppet, or even if you are using packages to deploy software but puppet to deploy the configs you want to be very very careful of the cache. I recommend either avoiding source in these cases or disabling the feature that let puppet use the cache on compile failure. I also monitor my compiles for success. I''ve often campaigned for a catalog that combines files and everything else into one artifact but I think we''re some way off from realising that still. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Oct 25, 11:13 am, "R.I.Pienaar" <r...@devco.net> wrote:> In this scenario puppetd will use the old catalog BUT it will still fetch > files with source from the master.This is also possible during your VCSs ''update'' if /etc/puppet is a workdir. This came up at puppet camp, and I think two groups mentioned seeing this actually happen in production. In both cases puppetd just corrected it on the next run.> I''ve often campaigned for a catalog that combines files and everything else > into one artifact but I think we''re some way off from realising that still.From the description I think #4817 implements this? I haven''t even looked at the code though, so reality may vary. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Oct 25, 8:12 am, Alaric <paxindust...@gmail.com> wrote:> Are there any pro/cons to using templates exclusively? >Besides the already mentioned there are some security issues with using the file server from puppet. Richard Crowley covered this a bit in his puppetcamp talk[1]. He also distributes all of his configs in the catalog, so there''s an example of production. On the downside your catalog will get pretty big. I can say that you shouldn''t have any problems at 300Kb, at least. I''d be wary of getting too much bigger than that. [1] http://rcrowley.org/talks/puppet-camp-2010/#1 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Oct 25, 2010, at 1:55 PM, donavan wrote:> On Oct 25, 11:13 am, "R.I.Pienaar" <r...@devco.net> wrote: >> In this scenario puppetd will use the old catalog BUT it will still fetch >> files with source from the master. > > This is also possible during your VCSs ''update'' if /etc/puppet is a > workdir. This came up at puppet camp, and I think two groups mentioned > seeing this actually happen in production. In both cases puppetd just > corrected it on the next run. > >> I''ve often campaigned for a catalog that combines files and everything else >> into one artifact but I think we''re some way off from realising that still. > > From the description I think #4817 implements this? I haven''t even > looked at the code though, so reality may vary.You also might want to watch http://projects.puppetlabs.com/issues/4837 That looks more like what you want to me although it isn''t finished. #4817 seems to have working code though. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Wow, This has all been great information! Thanks to everyone who posted! -a On Oct 26, 12:38 am, Patrick <kc7...@gmail.com> wrote:> On Oct 25, 2010, at 1:55 PM, donavan wrote: > > > On Oct 25, 11:13 am, "R.I.Pienaar" <r...@devco.net> wrote: > >> In this scenario puppetd will use the old catalog BUT it will still fetch > >> files with source from the master. > > > This is also possible during your VCSs ''update'' if /etc/puppet is a > > workdir. This came up at puppet camp, and I think two groups mentioned > > seeing this actually happen in production. In both cases puppetd just > > corrected it on the next run. > > >> I''ve often campaigned for a catalog that combines files and everything else > >> into one artifact but I think we''re some way off from realising that still. > > > From the description I think #4817 implements this? I haven''t even > > looked at the code though, so reality may vary. > > You also might want to watchhttp://projects.puppetlabs.com/issues/4837 > > That looks more like what you want to me although it isn''t finished. #4817 seems to have working code though.-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.