Hello everyone, I have the following environments configured as master: # puppetmasterd -V 0.25.4 # cat puppet.conf [main] confir=/etc/puppet logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet pidfile=$rundir/puppetmasterd.pid factpath=$vardir/lib/facter pluginsync=true templatedir=$confdir/templates prerun_command=/etc/puppet/etckeeper-commit-pre postrun_command=/etc/puppet/etckeeper-commit-post [master] modulepath=$confdir/environments/$environment/modules:$confdir/modules manifest=$confdir/manifests/unknown.pp [development] manifest = $confdir/manifests/site.pp [testing] manifest = $confdir/manifests/site.pp I have the modules in place, for every environment. This does not seem to be an issue. Certificates are correctly signed. The problem is that my agent located on another host, does not load the development environment whenever I run the following command: # puppetd -V 0.25.4 # puppetd agent --verbose --server=lbre-puppet.stanford.edu --noop --test --environment development I get the following in the agent when I run the command above: info: Caching catalog for ganglia01.stanford.edu info: Applying configuration version ''1313184594'' notice: //gangliamonitor::service/Service[ganglia-monitor]/ensure: is stopped, should be running (noop) notice: Finished catalog run in 0.11 seconds It runs fine, but not the development environment. I even mess it up the development module to make sure it was running something different. It runs the main one. The master''s output is the regular output as if I had ran without the --environment switch. Does anyone know what could be missing or causing this behavior? I appreciate in advance. -Fred -- 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/-/J8KCeY1wnjwJ. 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.
give the module path in development [development] modulepath = /etc/puppet/environments/development/modules Thanks On Aug 12, 2:39 pm, Frederiko Costa <freder...@gmail.com> wrote:> Hello everyone, > > I have the following environments configured as master: > > # puppetmasterd -V > 0.25.4 > > # cat puppet.conf > [main] > confir=/etc/puppet > logdir=/var/log/puppet > vardir=/var/lib/puppet > ssldir=/var/lib/puppet/ssl > rundir=/var/run/puppet > pidfile=$rundir/puppetmasterd.pid > factpath=$vardir/lib/facter > pluginsync=true > templatedir=$confdir/templates > prerun_command=/etc/puppet/etckeeper-commit-pre > postrun_command=/etc/puppet/etckeeper-commit-post > > [master] > modulepath=$confdir/environments/$environment/modules:$confdir/modules > manifest=$confdir/manifests/unknown.pp > > [development] > manifest = $confdir/manifests/site.pp > > [testing] > manifest = $confdir/manifests/site.pp > > I have the modules in place, for every environment. This does not seem to be > an issue. Certificates are correctly signed. > The problem is that my agent located on another host, does not load the > development environment whenever I run the following command: > # puppetd -V > 0.25.4 > > # puppetd agent --verbose --server=lbre-puppet.stanford.edu --noop --test > --environment development > > I get the following in the agent when I run the command above: > > info: Caching catalog for ganglia01.stanford.edu > info: Applying configuration version ''1313184594'' > notice: //gangliamonitor::service/Service[ganglia-monitor]/ensure: is > stopped, should be running > (noop) > notice: Finished catalog run in 0.11 seconds > > It runs fine, but not the development environment. I even mess it up the > development module to make sure it was running something different. It runs > the main one. The master''s output is the regular output as if I had ran > without the --environment switch. > > Does anyone know what could be missing or causing this behavior? > > I appreciate in advance. > > -Fred-- 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.
in continuation..... and put/copy your modules in the path, that should do the trick. On Aug 12, 3:14 pm, newguy <aimanparv...@gmail.com> wrote:> give the module path in development > [development] > modulepath = /etc/puppet/environments/development/modules > > Thanks > > On Aug 12, 2:39 pm, Frederiko Costa <freder...@gmail.com> wrote: > > > > > > > > > Hello everyone, > > > I have the following environments configured as master: > > > # puppetmasterd -V > > 0.25.4 > > > # cat puppet.conf > > [main] > > confir=/etc/puppet > > logdir=/var/log/puppet > > vardir=/var/lib/puppet > > ssldir=/var/lib/puppet/ssl > > rundir=/var/run/puppet > > pidfile=$rundir/puppetmasterd.pid > > factpath=$vardir/lib/facter > > pluginsync=true > > templatedir=$confdir/templates > > prerun_command=/etc/puppet/etckeeper-commit-pre > > postrun_command=/etc/puppet/etckeeper-commit-post > > > [master] > > modulepath=$confdir/environments/$environment/modules:$confdir/modules > > manifest=$confdir/manifests/unknown.pp > > > [development] > > manifest = $confdir/manifests/site.pp > > > [testing] > > manifest = $confdir/manifests/site.pp > > > I have the modules in place, for every environment. This does not seem to be > > an issue. Certificates are correctly signed. > > The problem is that my agent located on another host, does not load the > > development environment whenever I run the following command: > > # puppetd -V > > 0.25.4 > > > # puppetd agent --verbose --server=lbre-puppet.stanford.edu --noop --test > > --environment development > > > I get the following in the agent when I run the command above: > > > info: Caching catalog for ganglia01.stanford.edu > > info: Applying configuration version ''1313184594'' > > notice: //gangliamonitor::service/Service[ganglia-monitor]/ensure: is > > stopped, should be running > > (noop) > > notice: Finished catalog run in 0.11 seconds > > > It runs fine, but not the development environment. I even mess it up the > > development module to make sure it was running something different. It runs > > the main one. The master''s output is the regular output as if I had ran > > without the --environment switch. > > > Does anyone know what could be missing or causing this behavior? > > > I appreciate in advance. > > > -Fred-- 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.
Frederiko Costa
2011-Aug-13 02:09 UTC
Re: [Puppet Users] Re: enviroments are not being used
Hi newguy, Thanks for your help. However, it did not work. In fact, I had tried that previously. The approach you mentioned, I think it''s the approach that the Pro Puppet book take. It did not work either. Still gets the "production" one: Here is the output when I set puppermaster to --debug --no-daemonize: debug: importing ''/etc/puppet/manifests/nodes.pp'' debug: importing ''/etc/puppet/modules/ssh/manifests/init.pp'' info: Autoloaded module ssh debug: importing ''/etc/puppet/modules/ssh/manifests/params.pp'' info: Autoloaded file ssh/params from module ssh debug: No true answers and no default warning: Scope(Class[ssh]): The ''require'' function is only compatible with clients at 0.25 and above; including class but not adding dependency debug: importing ''/etc/puppet/modules/ssh/manifests/install.pp'' info: Autoloaded file ssh/install from module ssh debug: importing ''/etc/puppet/modules/ssh/manifests/config.pp'' info: Autoloaded file ssh/config from module ssh debug: importing ''/etc/puppet/modules/ssh/manifests/service.pp'' info: Autoloaded file ssh/service from module ssh Is there any other thing you or someone else suggests? Regards, -fred On Fri, Aug 12, 2011 at 3:15 PM, newguy <aimanparvaiz@gmail.com> wrote:> in continuation..... > and put/copy your modules in the path, that should do the trick. > > On Aug 12, 3:14 pm, newguy <aimanparv...@gmail.com> wrote: > > give the module path in development > > [development] > > modulepath = /etc/puppet/environments/development/modules > > > > Thanks > > > > On Aug 12, 2:39 pm, Frederiko Costa <freder...@gmail.com> wrote: > > > > > > > > > > > > > > > > > Hello everyone, > > > > > I have the following environments configured as master: > > > > > # puppetmasterd -V > > > 0.25.4 > > > > > # cat puppet.conf > > > [main] > > > confir=/etc/puppet > > > logdir=/var/log/puppet > > > vardir=/var/lib/puppet > > > ssldir=/var/lib/puppet/ssl > > > rundir=/var/run/puppet > > > pidfile=$rundir/puppetmasterd.pid > > > factpath=$vardir/lib/facter > > > pluginsync=true > > > templatedir=$confdir/templates > > > prerun_command=/etc/puppet/etckeeper-commit-pre > > > postrun_command=/etc/puppet/etckeeper-commit-post > > > > > [master] > > > > modulepath=$confdir/environments/$environment/modules:$confdir/modules > > > manifest=$confdir/manifests/unknown.pp > > > > > [development] > > > manifest = $confdir/manifests/site.pp > > > > > [testing] > > > manifest = $confdir/manifests/site.pp > > > > > I have the modules in place, for every environment. This does not seem > to be > > > an issue. Certificates are correctly signed. > > > The problem is that my agent located on another host, does not load the > > > development environment whenever I run the following command: > > > # puppetd -V > > > 0.25.4 > > > > > # puppetd agent --verbose --server=lbre-puppet.stanford.edu --noop > --test > > > --environment development > > > > > I get the following in the agent when I run the command above: > > > > > info: Caching catalog for ganglia01.stanford.edu > > > info: Applying configuration version ''1313184594'' > > > notice: //gangliamonitor::service/Service[ganglia-monitor]/ensure: is > > > stopped, should be running > > > (noop) > > > notice: Finished catalog run in 0.11 seconds > > > > > It runs fine, but not the development environment. I even mess it up > the > > > development module to make sure it was running something different. It > runs > > > the main one. The master''s output is the regular output as if I had ran > > > without the --environment switch. > > > > > Does anyone know what could be missing or causing this behavior? > > > > > I appreciate in advance. > > > > > -Fred > > -- > 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. > >-- 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 Fri, Aug 12, 2011 at 02:39:37PM -0700, Frederiko Costa wrote:> Hello everyone, > > I have the following environments configured as master: > > # puppetmasterd -V > 0.25.4 > > # cat puppet.conf > [main] > confir=/etc/puppet > logdir=/var/log/puppet > vardir=/var/lib/puppet > ssldir=/var/lib/puppet/ssl > rundir=/var/run/puppet > pidfile=$rundir/puppetmasterd.pid > factpath=$vardir/lib/facter > pluginsync=true > templatedir=$confdir/templates > prerun_command=/etc/puppet/etckeeper-commit-pre > postrun_command=/etc/puppet/etckeeper-commit-post > > [master] > modulepath=$confdir/environments/$environment/modules:$confdir/modules > manifest=$confdir/manifests/unknown.pp > > [development] > manifest = $confdir/manifests/site.pp > > [testing] > manifest = $confdir/manifests/site.pp > > I have the modules in place, for every environment. This does not seem to be > an issue. Certificates are correctly signed. > The problem is that my agent located on another host, does not load the > development environment whenever I run the following command: > # puppetd -V > 0.25.4 > > # puppetd agent --verbose --server=lbre-puppet.stanford.edu --noop --test > --environment development >The first thing to notice here is that you''re mixing >2.6.0 syntax with old 0.25.4 syntax. In 0.25.4 to run the agent you use puppetd in 2.6.0 and above it is [1] puppet agent Also your master section in your puppet.conf should be [puppetmasterd] instead of [master].[2] This might not solve the issue but I would correct this first. (or update to a recent puppet version of course) [1] http://docs.puppetlabs.com/guides/tools.html [2] http://docs.puppetlabs.com/guides/configuring.html#notes-on-puppet-0255-and-older -Stefan
Hello everyone, First of all, thanks for the prompt help. I should be able to move forward. I followed the suggestions pointed here. None of them seemed to work. However, the problem was in the versions I was using. I could not confirm in changelogs, but the versions I had installed from both distros (ubuntu - master, RH - slave) don''t seem to support multiple environments. Also, I refactored my puppet.conf file. I decide to go for the versions from EPEL-testing and from Rubygems (btw, the latest just released) and it seemed to work fine, as showed in: Slave ... # puppet agent --no-daemonize --verbose --noop --test --environment development # puppet agent --no-daemonize --verbose --noop --test --environment testing # puppet master --no-daemonize --debug debug: importing ''/etc/puppet/manifests/nodes.pp'' in environment production notice: Compiled catalog for XXXX in environment development in 0.07 seconds info: Caching node for XXXXX notice: Compiled catalog for XXXXXX in environment testing in 0.03 seconds thanks, -fred On Sat, Aug 13, 2011 at 1:15 AM, Stefan Schulte < stefan.schulte@taunusstein.net> wrote:> On Fri, Aug 12, 2011 at 02:39:37PM -0700, Frederiko Costa wrote: > > Hello everyone, > > > > I have the following environments configured as master: > > > > # puppetmasterd -V > > 0.25.4 > > > > # cat puppet.conf > > [main] > > confir=/etc/puppet > > logdir=/var/log/puppet > > vardir=/var/lib/puppet > > ssldir=/var/lib/puppet/ssl > > rundir=/var/run/puppet > > pidfile=$rundir/puppetmasterd.pid > > factpath=$vardir/lib/facter > > pluginsync=true > > templatedir=$confdir/templates > > prerun_command=/etc/puppet/etckeeper-commit-pre > > postrun_command=/etc/puppet/etckeeper-commit-post > > > > [master] > > modulepath=$confdir/environments/$environment/modules:$confdir/modules > > manifest=$confdir/manifests/unknown.pp > > > > [development] > > manifest = $confdir/manifests/site.pp > > > > [testing] > > manifest = $confdir/manifests/site.pp > > > > I have the modules in place, for every environment. This does not seem to > be > > an issue. Certificates are correctly signed. > > The problem is that my agent located on another host, does not load the > > development environment whenever I run the following command: > > # puppetd -V > > 0.25.4 > > > > # puppetd agent --verbose --server=lbre-puppet.stanford.edu --noop > --test > > --environment development > > > > The first thing to notice here is that you''re mixing >2.6.0 syntax with > old 0.25.4 syntax. In 0.25.4 to run the agent you use > > puppetd > > in 2.6.0 and above it is [1] > > puppet agent > > Also your master section in your puppet.conf should be [puppetmasterd] > instead of [master].[2] This might not solve the issue but I would correct > this first. (or update to a recent puppet version of course) > > [1] http://docs.puppetlabs.com/guides/tools.html > [2] > http://docs.puppetlabs.com/guides/configuring.html#notes-on-puppet-0255-and-older > > -Stefan >-- 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.