hello, Is this directory structure for modules still recommended, or is there a better way? http://projects.reductivelabs.com/projects/puppet/wiki/Module_Organisation We are thinking of having a directory for each environment, then broken down as recommended here: http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Best_Practice So in practice, it might look like Environments /env1 /env1/manifests/site.pp /env1/manifests/templates.pp /env1/manifests/nodes.pp /env1/modules/{modulename}/files/ /env1/modules/{modulename}/manifests/init.pp /env1/modules/{modulename}/manifests/class1.pp /env1/modules/{modulename}/manifests/definition1.pp /env1/modules/{modulename}/manifests/class2.pp /env1/modules/{modulename}/plugins/ /env1/modules/{modulename}/templates/ /env2 ... /env3 ... Does this look right? --- Thanks, Allan Marcus 505-667-5666
You should use ''lib'' instead of ''plugins'' for 0.25.x clients. Otherwise that''s exactly how I have things laid out. On Mon, Mar 22, 2010 at 4:24 PM, Allan Marcus <allan@lanl.gov> wrote:> hello, > > Is this directory structure for modules still recommended, or is there a better way? > > http://projects.reductivelabs.com/projects/puppet/wiki/Module_Organisation > > We are thinking of having a directory for each environment, then broken down as recommended here: > > http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Best_Practice > > So in practice, it might look like > > Environments > /env1 > /env1/manifests/site.pp > /env1/manifests/templates.pp > /env1/manifests/nodes.pp > /env1/modules/{modulename}/files/ > /env1/modules/{modulename}/manifests/init.pp > /env1/modules/{modulename}/manifests/class1.pp > /env1/modules/{modulename}/manifests/definition1.pp > /env1/modules/{modulename}/manifests/class2.pp > /env1/modules/{modulename}/plugins/ > /env1/modules/{modulename}/templates/ > > /env2 > ... > /env3 > ... > > Does this look right? > > --- > Thanks, > > Allan Marcus > 505-667-5666 > > > >-- nigel -- 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.
I have same structure, but interested if there is any other out there. On Mon, Mar 22, 2010 at 4:33 PM, Nigel Kersten <nigelk@google.com> wrote:> You should use ''lib'' instead of ''plugins'' for 0.25.x clients. > > Otherwise that''s exactly how I have things laid out. > > > On Mon, Mar 22, 2010 at 4:24 PM, Allan Marcus <allan@lanl.gov> wrote: > > hello, > > > > Is this directory structure for modules still recommended, or is there a > better way? > > > > > http://projects.reductivelabs.com/projects/puppet/wiki/Module_Organisation > > > > We are thinking of having a directory for each environment, then broken > down as recommended here: > > > > > http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Best_Practice > > > > So in practice, it might look like > > > > Environments > > /env1 > > /env1/manifests/site.pp > > /env1/manifests/templates.pp > > /env1/manifests/nodes.pp > > /env1/modules/{modulename}/files/ > > /env1/modules/{modulename}/manifests/init.pp > > /env1/modules/{modulename}/manifests/class1.pp > > /env1/modules/{modulename}/manifests/definition1.pp > > /env1/modules/{modulename}/manifests/class2.pp > > /env1/modules/{modulename}/plugins/ > > /env1/modules/{modulename}/templates/ > > > > /env2 > > ... > > /env3 > > ... > > > > Does this look right? > > > > --- > > Thanks, > > > > Allan Marcus > > 505-667-5666 > > > > > > > > > > > > -- > nigel > > -- > 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. > >-- Tony -- 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.
Hi, I have a similar structure, but the modules them self are versioned, so instead of putting the real module in the env directory, I use links (which are managed by puppet), e.g.: /etc/puppet/env/global_puppetmaster apache2 -> /etc/puppet/modules/stable/services/apache2_0.2/ collectd -> /etc/puppet/modules/stable/services/collectd_0.1/ foreman -> /etc/puppet/modules/stable/services/foreman_0.2/ host-base -> /etc/puppet/modules/stable/services/host-base_0.13/ host-puppetmaster -> /etc/puppet/modules/stable/host-puppetmaster_0.24/ monit -> /etc/puppet/modules/stable/services/monit_0.2/ ... ... ... the number suffix is the internal module version that we are using. all stable modules are checked out at /etc/puppet/modules/stable. we have the same setup also for testing environments etc cheers, Ohad On Tue, Mar 23, 2010 at 9:19 AM, Tony G. <tonysk8@gmail.com> wrote:> I have same structure, but interested if there is any other out there. > > > On Mon, Mar 22, 2010 at 4:33 PM, Nigel Kersten <nigelk@google.com> wrote: > >> You should use ''lib'' instead of ''plugins'' for 0.25.x clients. >> >> Otherwise that''s exactly how I have things laid out. >> >> >> On Mon, Mar 22, 2010 at 4:24 PM, Allan Marcus <allan@lanl.gov> wrote: >> > hello, >> > >> > Is this directory structure for modules still recommended, or is there a >> better way? >> > >> > >> http://projects.reductivelabs.com/projects/puppet/wiki/Module_Organisation >> > >> > We are thinking of having a directory for each environment, then broken >> down as recommended here: >> > >> > >> http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Best_Practice >> > >> > So in practice, it might look like >> > >> > Environments >> > /env1 >> > /env1/manifests/site.pp >> > /env1/manifests/templates.pp >> > /env1/manifests/nodes.pp >> > /env1/modules/{modulename}/files/ >> > /env1/modules/{modulename}/manifests/init.pp >> > /env1/modules/{modulename}/manifests/class1.pp >> > /env1/modules/{modulename}/manifests/definition1.pp >> > /env1/modules/{modulename}/manifests/class2.pp >> > /env1/modules/{modulename}/plugins/ >> > /env1/modules/{modulename}/templates/ >> > >> > /env2 >> > ... >> > /env3 >> > ... >> > >> > Does this look right? >> > >> > --- >> > Thanks, >> > >> > Allan Marcus >> > 505-667-5666 >> > >> > >> > >> > >> >> >> >> -- >> nigel >> >> -- >> 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. >> >> > > > -- > Tony > > -- > 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. >-- 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.
hello, ----- "Tony G." <tonysk8@gmail.com> wrote:> I have same structure, but interested if there is any other out there.I do it like this: http://www.devco.net/archives/2009/10/10/puppet_environments.php Essentially I wanted to avoid duplicating all my modules into every environment, we dont have such strict change control that there''s a guaranteed progression from dev to staging to prod. So by using a common directory with modules and supporting branching from common into dev/staging/prod I am able to deviate only when I am working on a module. So work on apache means copy the common module into development branch, work there and once done and ready to move to prod I merge from dev branch into common and just get rid of the module in dev. Probably not the best approach for larger teams but keeps it simple and still gets you the gains,> > > On Mon, Mar 22, 2010 at 4:33 PM, Nigel Kersten < nigelk@google.com > > wrote: > > > You should use ''lib'' instead of ''plugins'' for 0.25.x clients. > > Otherwise that''s exactly how I have things laid out. > > > > > > On Mon, Mar 22, 2010 at 4:24 PM, Allan Marcus < allan@lanl.gov > > wrote: > > hello, > > > > Is this directory structure for modules still recommended, or is > there a better way? > > > > > http://projects.reductivelabs.com/projects/puppet/wiki/Module_Organisation > > > > We are thinking of having a directory for each environment, then > broken down as recommended here: > > > > > http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Best_Practice > > > > So in practice, it might look like > > > > Environments > > /env1 > > /env1/manifests/site.pp > > /env1/manifests/templates.pp > > /env1/manifests/nodes.pp > > /env1/modules/{modulename}/files/ > > /env1/modules/{modulename}/manifests/init.pp > > /env1/modules/{modulename}/manifests/class1.pp > > /env1/modules/{modulename}/manifests/definition1.pp > > /env1/modules/{modulename}/manifests/class2.pp > > /env1/modules/{modulename}/plugins/ > > /env1/modules/{modulename}/templates/ > > > > /env2 > > ... > > /env3 > > ... > > > > Does this look right? > > > > --- > > Thanks, > > > > Allan Marcus > > 505-667-5666 > > > > > > > > > > > > -- > nigel > > > > > -- > 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 . > > > > > -- > Tony > > > -- > 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.-- R.I.Pienaar -- 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.
Allan Marcus
2010-Mar-23 17:12 UTC
[Puppet Users] templatedir for environment or for module?
I am confused about the template dir in the module/{modulename}/ dir Does the autoloader look in /env1/modules/{modulename}/templates/ automatically, or do I need to refer to the template by its full path? http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Templating states that a tempaltedir needs to be defined for the environment, not the module. I''m confused. --- Thanks, Allan Marcus 505-667-5666 On Mar 22, 2010, at 5:24 PM, Allan Marcus wrote:> hello, > > Is this directory structure for modules still recommended, or is there a better way? > > http://projects.reductivelabs.com/projects/puppet/wiki/Module_Organisation > > We are thinking of having a directory for each environment, then broken down as recommended here: > > http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Best_Practice > > So in practice, it might look like > > Environments > /env1 > /env1/manifests/site.pp > /env1/manifests/templates.pp > /env1/manifests/nodes.pp > /env1/modules/{modulename}/files/ > /env1/modules/{modulename}/manifests/init.pp > /env1/modules/{modulename}/manifests/class1.pp > /env1/modules/{modulename}/manifests/definition1.pp > /env1/modules/{modulename}/manifests/class2.pp > /env1/modules/{modulename}/plugins/ > /env1/modules/{modulename}/templates/ > > /env2 > ... > /env3 > ... > > Does this look right? > > --- > Thanks, > > Allan Marcus > 505-667-5666 > > >
Nigel Kersten
2010-Mar-23 18:15 UTC
Re: [Puppet Users] templatedir for environment or for module?
if a template exists in modules/foo/templates/bar.erb you refer to it as template("foo/bar.erb") in manifests. On Tue, Mar 23, 2010 at 10:12 AM, Allan Marcus <allan@lanl.gov> wrote:> I am confused about the template dir in the module/{modulename}/ dir > > Does the autoloader look in /env1/modules/{modulename}/templates/ automatically, or do I need to refer to the template by its full path? > > http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Templating > states that a tempaltedir needs to be defined for the environment, not the module. > > I''m confused. > > --- > Thanks, > > Allan Marcus > 505-667-5666 > > > > On Mar 22, 2010, at 5:24 PM, Allan Marcus wrote: > >> hello, >> >> Is this directory structure for modules still recommended, or is there a better way? >> >> http://projects.reductivelabs.com/projects/puppet/wiki/Module_Organisation >> >> We are thinking of having a directory for each environment, then broken down as recommended here: >> >> http://projects.reductivelabs.com/projects/puppet/wiki/Puppet_Best_Practice >> >> So in practice, it might look like >> >> Environments >> /env1 >> /env1/manifests/site.pp >> /env1/manifests/templates.pp >> /env1/manifests/nodes.pp >> /env1/modules/{modulename}/files/ >> /env1/modules/{modulename}/manifests/init.pp >> /env1/modules/{modulename}/manifests/class1.pp >> /env1/modules/{modulename}/manifests/definition1.pp >> /env1/modules/{modulename}/manifests/class2.pp >> /env1/modules/{modulename}/plugins/ >> /env1/modules/{modulename}/templates/ >> >> /env2 >> ... >> /env3 >> ... >> >> Does this look right? >> >> --- >> Thanks, >> >> Allan Marcus >> 505-667-5666 >> >> >> > >-- nigel -- 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.