Dan White
2013-Mar-08 15:48 UTC
[Puppet Users] Relocating "confdir" on a puppet-master caused a small problem with the agent
New setup, Puppet 3.1.0 and Passenger on a RHEL 5 server. I wanted to move $confdir from /etc/puppet to follow local practices about where to install stuff. Anyway, I made the necessary change in /usr/share/puppet/rack/puppetmasterd/config.ru and set confdir in the [main] part of puppet.conf, then I ran puppet master --no-daemonize (without Passenger) to generate its SSL certificates and such, explicitly specifying confdir on the command line. Once I modified my Apache config to properly point at all the ssl files, apache and passenger fired right up. Now the bugaboo: puppet agent does not run unless I give it the proper confdir on the command line ! I tried adding it to /etc/sysconfig/puppet as without success. The workaround I have in place is to symlink my confdir to /etc/puppet Or symlink $confdir/puppet.conf to /etc/puppet/puppet.conf Is there a better way to do this ? “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ramin K
2013-Jul-05 03:26 UTC
Re: [Puppet Users] Relocating "confdir" on a puppet-master caused a small problem with the agent
On 3/8/2013 7:48 AM, Dan White wrote:> New setup, Puppet 3.1.0 and Passenger on a RHEL 5 server. > > I wanted to move $confdir from /etc/puppet to follow local practices > about where to install stuff. > > Anyway, I made the necessary change in > /usr/share/puppet/rack/puppetmasterd/config.ru and set confdir in the > [main] part of puppet.conf, then I ran puppet master --no-daemonize > (without Passenger) to generate its SSL certificates and such, > explicitly specifying confdir on the command line. > > Once I modified my Apache config to properly point at all the ssl files, > apache and passenger fired right up. > > Now the bugaboo: puppet agent does not run unless I give it the proper > confdir on the command line ! > I tried adding it to /etc/sysconfig/puppet as without success. > > The workaround I have in place is to symlink my confdir to /etc/puppet > Or symlink $confdir/puppet.conf to /etc/puppet/puppet.conf > > Is there a better way to do this ?I''m not clear on how you''ve structured things so far, but I would run the master and agent with entirely separate dir structures. Makes it simpler to manage the agents the same way regardless of what machine it resides upon. I''d revert /etc/puppet/puppet.conf to an agent config and remove any sort of [master] stanza. I''d create /usr/share/rack/puppermaster.conf and point your config.ru at it like so. Make sure you remove any configdir or var statements that would conflict with the settings you''ll put in puppetmaster.conf ARGV << "--rack" ARGV << "--config=/usr/share/rack/puppermaster.conf" require ''puppet/application/master'' my puppetmaster.conf looks roughly like this. [main] confdir=/var/puppet/etc logdir=/var/puppet/logs vardir=/var/puppet/var ssldir=$vardir/ssl rundir=/var/puppet/run Assuming your paths are correct and everything is chown''ed properly it should just work. Ramin -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Ramin K
2013-Jul-05 03:40 UTC
Re: [Puppet Users] Relocating "confdir" on a puppet-master caused a small problem with the agent
On 7/4/2013 8:26 PM, Ramin K wrote:> my puppetmaster.conf looks roughly like this. > [main] > confdir=/var/puppet/etc > logdir=/var/puppet/logs > vardir=/var/puppet/var > ssldir=$vardir/ssl > rundir=/var/puppet/runObviously (or perhaps not) you''d add your [master] config settings to this file. Ramin -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.