I read the UsingMultipleEnvironments wiki, but I''m still a little unclear. First, my current environment (which works fine), looks like this (this is on the puppet server): /etc/puppet /etc/puppet/puppet.conf /etc/puppet/manifests /etc/puppet/manifests/site.pp /etc/puppet/manifests/templates.pp /etc/puppet/manifests/nodes.pp /etc/puppet/modules /etc/puppet/modules/puppet /etc/puppet/modules/puppet/manifests /etc/puppet/modules/puppet/files /etc/puppet/modules/httpd /etc/puppet/modules/httpd/manifests /etc/puppet/modules/httpd/files Like I said, very simple, very straightforward. = Now, I want, as simple as possible, two environments: production and development. That''s it. On clients, as I understand it, all I need is one additional line in puppet.conf: [main] environment = production On the puppet server, I need these lines in puppet.conf: [production] modulepath = /etc/puppet/production/modules [development] modulepath = /etc/puppet/development/modules = I guess my main question is, do I also need to put manifests and templates in each per-environment directory? Like, for production: /etc/puppet/production/manifests /etc/puppet/production/manifests/site.pp /etc/puppet/production/manifests/templates.pp /etc/puppet/production/manifests/nodes.pp In other words, there''s one COMPLETE set of necessary files for /etc/puppet/production and another COMPLETE set of necessary files for /etc/puppet/development? Or, can I have one set of site.pp, templates.pp, and nodes.pp -- and then, depending on the client''s set environment, I pull the modules from that environment''s modules directory? Thanks for any clarification. johnn --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Evan Hisey
2008-Jun-19 21:12 UTC
[Puppet Users] Re: a little unclear on multiple environments
> => > Now, I want, as simple as possible, two environments: > production and development. That''s it. > > On clients, as I understand it, all I need is one additional > line in puppet.conf: > [main] > environment = production > > On the puppet server, I need these lines in puppet.conf: > [production] > modulepath = /etc/puppet/production/modules > > [development] > modulepath = /etc/puppet/development/modules > > => > I guess my main question is, do I also need to put manifests > and templates in each per-environment directory? Like, for > production: > > /etc/puppet/production/manifests > /etc/puppet/production/manifests/site.pp > /etc/puppet/production/manifests/templates.pp > /etc/puppet/production/manifests/nodes.pp > > In other words, there''s one COMPLETE set of necessary files > for /etc/puppet/production and another COMPLETE set of > necessary files for /etc/puppet/development? > > Or, can I have one set of site.pp, templates.pp, and > nodes.pp -- and then, depending on the client''s set > environment, I pull the modules from that environment''s > modules directory?The simplest way is to have 2 complete environments. If you need to keep them in sync use rsync or and svn repo for that. You can play some games with the path setting and have both enviroments point to the same main manifest and then have the modules path point to seperate paths. something like this. [main] manifest = /srv/puppet/main/site.pp environment = production [puppetmasterd] environments = production,development [production] modulepath = /srv/puppet/production/manifests/modules [development] modulepath = /srv/puppet/development/manifests/modules An import points remeber with the environment settings is that the client _always_ overrides the server and that the client default is development. Evan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Johnny Tan
2008-Jun-19 22:07 UTC
[Puppet Users] Re: a little unclear on multiple environments
Evan Hisey wrote:> The simplest way is to have 2 complete environments. If you need to > keep them in sync use rsync or and svn repo for that. You can play > some games with the path setting and have both enviroments point to > the same main manifest and then have the modules path point to > seperate paths. something like this. > > [main] > manifest = /srv/puppet/main/site.pp > environment = productionThis didn''t really work for me. It points correctly to the modules subdirectory in production, but then it doesn''t seem to be able to find modules that are called from within a module, like the selinux::module Either way, the two complete environments works swell, so I''ll stick with that for now. We do use subversion, so it works out well.> An import points remeber with the environment settings is that the > client _always_ overrides the server and that the client default is > development.Thanks. johnn --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---