Hey guys, Does anyone know how to change the location of puppet.conf? In my situation, I don''t want to store it under /etc/puppet/puppet.conf or ~/.puppet/puppet.conf -- I''d like to store it under /opt/puppet/puppet.conf in this example. Is there a method without having to symlink, perhaps with an environment variable like PUPPET_CONF=.... ? Thanks for your time, Jason -- 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.
Chad Huneycutt
2013-Feb-01 01:39 UTC
Re: [Puppet Users] Change the location of puppet.conf
--config <path to config file> Depending on your OS, you can set this as the default option for the service in /etc/sysconfig/puppet or /etc/default/puppet. - Chad On Thu, Jan 31, 2013 at 8:31 PM, Jason Knudsen <jason.knudsen@gmail.com> wrote:> Hey guys, > > Does anyone know how to change the location of puppet.conf? In my situation, > I don''t want to store it under /etc/puppet/puppet.conf or > ~/.puppet/puppet.conf -- I''d like to store it under /opt/puppet/puppet.conf > in this example. Is there a method without having to symlink, perhaps with > an environment variable like PUPPET_CONF=.... ? > > Thanks for your time, > > Jason > > -- > 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. > >-- Chad M. Huneycutt -- 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.
Yo, Thanks for the suggestion Chad. So actually a little bit more background from me would be useful: I''m running this in user land, outside of their $HOME directory -- as a non-root user. Also, I''m running this through Apache Passenger (so I''ve tried putting the variables correctly in the config.ru) Jason Jason On Thu, Jan 31, 2013 at 5:39 PM, Chad Huneycutt <chad.huneycutt@gmail.com>wrote:> --config <path to config file> > > Depending on your OS, you can set this as the default option for the > service in /etc/sysconfig/puppet or /etc/default/puppet. > > - Chad > > On Thu, Jan 31, 2013 at 8:31 PM, Jason Knudsen <jason.knudsen@gmail.com> > wrote: > > Hey guys, > > > > Does anyone know how to change the location of puppet.conf? In my > situation, > > I don''t want to store it under /etc/puppet/puppet.conf or > > ~/.puppet/puppet.conf -- I''d like to store it under > /opt/puppet/puppet.conf > > in this example. Is there a method without having to symlink, perhaps > with > > an environment variable like PUPPET_CONF=.... ? > > > > Thanks for your time, > > > > Jason > > > > -- > > 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. > > > > > > > > -- > Chad M. Huneycutt > > -- > 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. > > >-- 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.
Also -- running puppet agent with --config=/dir works perfectly fine. It''s just one additional thing I''ll have to hardcode in scripts and whatnot, and was hoping to avoid that. On Thursday, January 31, 2013 5:46:42 PM UTC-8, Jason Knudsen wrote:> > Yo, > > Thanks for the suggestion Chad. So actually a little bit more background > from me would be useful: > > I''m running this in user land, outside of their $HOME directory -- as a > non-root user. Also, I''m running this through Apache Passenger (so I''ve > tried putting the variables correctly in the config.ru) > > Jason > > > Jason > > > --config <path to config file> >> >> Depending on your OS, you can set this as the default option for the >> service in /etc/sysconfig/puppet or /etc/default/puppet. >> >> - Chad >> >> > Hey guys, >> > >> > Does anyone know how to change the location of puppet.conf? In my >> situation, >> > I don''t want to store it under /etc/puppet/puppet.conf or >> > ~/.puppet/puppet.conf -- I''d like to store it under >> /opt/puppet/puppet.conf >> > in this example. Is there a method without having to symlink, perhaps >> with >> > an environment variable like PUPPET_CONF=.... ? >> > >> > Thanks for your time, >> > >> > Jason >> > >> > -- >> > 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. >> > >> > >> >> >> >> -- >> Chad M. Huneycutt >> >> -- >> 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. >> >> >> >-- 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.
On 1/31/2013 5:46 PM, Jason Knudsen wrote:> Yo, > > Thanks for the suggestion Chad. So actually a little bit more background > from me would be useful: > > I''m running this in user land, outside of their $HOME directory -- as a > non-root user. Also, I''m running this through Apache Passenger (so I''ve > tried putting the variables correctly in the config.ru <http://config.ru>)In the config.ru it''s the addition of a single line and IIRC you''ll need to restart the http server, not just the app. ARGV << "--config=/opt/puppet/puppetmaster.conf" Additionally you can point your master process to it''s own set of dirs for everything it does. Makes it simpler to backup at the very least. puppmaster.conf [main] confdir=/opt/puppet/etc logdir=/opt/puppet/logs vardir=/opt/puppet/var ssldir=$vardir/ssl rundir=/opt/puppet/run factpath=$vardir/lib/facter templatedir=$confdir/templates 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Hey Ramin, That sounded like an awesome idea! So I tried it out, updated config.ru and bounced httpd ARGV << "--confdir" << "/opt/puppet/" ARGV << "--vardir" << "/opt/puppet/var" ARGV << "--config" << "/opt/puppet/puppet.conf" Doesn''t fly.. it stil creates the .puppet directory and fails. I also tried with: ARGV << "--config=/opt/puppet/puppetmaster.conf" And that didn''t work. Both syntaxes work from the shell tho. Just not through httpd for some odd reason. I''ll keep tinkering tho Thanks, Jason On Thursday, January 31, 2013 6:03:31 PM UTC-8, Ramin K wrote:> > On 1/31/2013 5:46 PM, Jason Knudsen wrote: > > Yo, > > > > Thanks for the suggestion Chad. So actually a little bit more background > > from me would be useful: > > > > I''m running this in user land, outside of their $HOME directory -- as a > > non-root user. Also, I''m running this through Apache Passenger (so I''ve > > tried putting the variables correctly in the config.ru <http://config.ru>) > > > In the config.ru it''s the addition of a single line and IIRC you''ll need > to restart the http server, not just the app. > > ARGV << "--config=/opt/puppet/puppetmaster.conf" > > Additionally you can point your master process to it''s own set of dirs > for everything it does. Makes it simpler to backup at the very least. > > puppmaster.conf > [main] > confdir=/opt/puppet/etc > logdir=/opt/puppet/logs > vardir=/opt/puppet/var > ssldir=$vardir/ssl > rundir=/opt/puppet/run > factpath=$vardir/lib/facter > templatedir=$confdir/templates > > 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Very strange, I''ve used the --config with the custom conf file for years though I''m still on 2.7. Are you sure you''re running your Puppet master through Apache/Passenger and not running the puppetmaster script? For the hell of it check to make sure Apache has the port and that Rack processes have spawned. Also look at the logs to see if Passenger is kicking out errors. Ramin On 1/31/2013 6:28 PM, Jason Knudsen wrote:> Hey Ramin, > > That sounded like an awesome idea! So I tried it out, updated config.ru > and bounced httpd > > ARGV << "--confdir" << "/opt/puppet/" > ARGV << "--vardir" << "/opt/puppet/var" > ARGV << "--config" << "/opt/puppet/puppet.conf" > > Doesn''t fly.. it stil creates the .puppet directory and fails. > > I also tried with: > > ARGV << "--config=/opt/puppet/puppetmaster.conf" > > And that didn''t work. > > Both syntaxes work from the shell tho. Just not through httpd for some > odd reason. I''ll keep tinkering tho > > Thanks, > > Jason > > On Thursday, January 31, 2013 6:03:31 PM UTC-8, Ramin K wrote: > > On 1/31/2013 5:46 PM, Jason Knudsen wrote: > > Yo, > > > > Thanks for the suggestion Chad. So actually a little bit more > background > > from me would be useful: > > > > I''m running this in user land, outside of their $HOME directory > -- as a > > non-root user. Also, I''m running this through Apache Passenger > (so I''ve > > tried putting the variables correctly in the config.ru > <http://config.ru> <http://config.ru>) > > In the config.ru <http://config.ru> it''s the addition of a single > line and IIRC you''ll need > to restart the http server, not just the app. > > ARGV << "--config=/opt/puppet/puppetmaster.conf" > > Additionally you can point your master process to it''s own set of dirs > for everything it does. Makes it simpler to backup at the very least. > > puppmaster.conf > [main] > confdir=/opt/puppet/etc > logdir=/opt/puppet/logs > vardir=/opt/puppet/var > ssldir=$vardir/ssl > rundir=/opt/puppet/run > factpath=$vardir/lib/facter > templatedir=$confdir/templates > > 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?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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.
Yup, definitely apache: netstat: tcp 0 0 :::8140 :::* LISTEN 21710/httpd rack is spawned: ps: user 21877 1 0 18:26 ? 00:00:00 Rack: /opt/puppet/rack I get nothing in my httpd log files.. error or access.log (this feels weird..) Oh yeah and this is Puppet 3.0.2 Jason On Thursday, January 31, 2013 6:43:49 PM UTC-8, Ramin K wrote:> > Very strange, I''ve used the --config with the custom conf file for > years though I''m still on 2.7. > > Are you sure you''re running your Puppet master through Apache/Passenger > and not running the puppetmaster script? For the hell of it check to > make sure Apache has the port and that Rack processes have spawned. Also > look at the logs to see if Passenger is kicking out errors. > > Ramin > > On 1/31/2013 6:28 PM, Jason Knudsen wrote: > > Hey Ramin, > > > > That sounded like an awesome idea! So I tried it out, updated config.ru > > and bounced httpd > > > > ARGV << "--confdir" << "/opt/puppet/" > > ARGV << "--vardir" << "/opt/puppet/var" > > ARGV << "--config" << "/opt/puppet/puppet.conf" > > > > Doesn''t fly.. it stil creates the .puppet directory and fails. > > > > I also tried with: > > > > ARGV << "--config=/opt/puppet/puppetmaster.conf" > > > > And that didn''t work. > > > > Both syntaxes work from the shell tho. Just not through httpd for some > > odd reason. I''ll keep tinkering tho > > > > Thanks, > > > > Jason > > > > On Thursday, January 31, 2013 6:03:31 PM UTC-8, Ramin K wrote: > > > > On 1/31/2013 5:46 PM, Jason Knudsen wrote: > > > Yo, > > > > > > Thanks for the suggestion Chad. So actually a little bit more > > background > > > from me would be useful: > > > > > > I''m running this in user land, outside of their $HOME directory > > -- as a > > > non-root user. Also, I''m running this through Apache Passenger > > (so I''ve > > > tried putting the variables correctly in the config.ru > > <http://config.ru> <http://config.ru>) > > > > In the config.ru <http://config.ru> it''s the addition of a single > > line and IIRC you''ll need > > to restart the http server, not just the app. > > > > ARGV << "--config=/opt/puppet/puppetmaster.conf" > > > > Additionally you can point your master process to it''s own set of > dirs > > for everything it does. Makes it simpler to backup at the very > least. > > > > puppmaster.conf > > [main] > > confdir=/opt/puppet/etc > > logdir=/opt/puppet/logs > > vardir=/opt/puppet/var > > ssldir=$vardir/ssl > > rundir=/opt/puppet/run > > factpath=$vardir/lib/facter > > templatedir=$confdir/templates > > > > 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...@googlegroups.com <javascript:>. > > To post to this group, send email to puppet...@googlegroups.com<javascript:>. > > > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > >-- 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.
Just in case I''m missing something obvious, here''s my entire config.ru file: # a config.ru, for use with every rack-compatible webserver.> # SSL needs to be handled outside this, though. > # if puppet is not in your RUBYLIB: > # $LOAD_PATH.unshift(''/opt/puppet/lib'') > $0 = "master" > # if you want debugging: > # ARGV << "--debug" > ARGV << "--rack" > # Rack applications typically don''t start as root. Set --confdir and > --vardir > # to prevent reading configuration from ~puppet/.puppet/puppet.conf and > writing > # to ~puppet/.puppet > ARGV << "--confdir" << "/opt/puppet" > ARGV << "--vardir" << "/opt/puppet/var" > ARGV << "--config=/opt/puppet/puppet.conf" > # NOTE: it''s unfortunate that we have to use the "CommandLine" class > # here to launch the app, but it contains some initialization logic > # (such as triggering the parsing of the config file) that is very > # important. We should do something less nasty here when we''ve > # gotten our API and settings initialization logic cleaned up. > # > # Also note that the "$0 = master" line up near the top here is > # the magic that allows the CommandLine class to know that it''s > # supposed to be running master. > # > # --cprice 2012-05-22 > require ''puppet/util/command_line'' > # we''re usually running inside a Rack::Builder.new {} block, > # therefore we need to call run *here*. > run Puppet::Util::CommandLine.new.executeOn Thursday, January 31, 2013 6:50:22 PM UTC-8, Jason Knudsen wrote:> > Yup, definitely apache: > > netstat: > tcp 0 0 :::8140 :::* > LISTEN 21710/httpd > > rack is spawned: > > ps: > user 21877 1 0 18:26 ? 00:00:00 Rack: /opt/puppet/rack > > > > I get nothing in my httpd log files.. error or access.log (this feels > weird..) > > Oh yeah and this is Puppet 3.0.2 > > Jason > > > On Thursday, January 31, 2013 6:43:49 PM UTC-8, Ramin K wrote: >> >> Very strange, I''ve used the --config with the custom conf file >> for >> years though I''m still on 2.7. >> >> Are you sure you''re running your Puppet master through Apache/Passenger >> and not running the puppetmaster script? For the hell of it check to >> make sure Apache has the port and that Rack processes have spawned. Also >> look at the logs to see if Passenger is kicking out errors. >> >> Ramin >> >> On 1/31/2013 6:28 PM, Jason Knudsen wrote: >> > Hey Ramin, >> > >> > That sounded like an awesome idea! So I tried it out, updated config.ru >> > and bounced httpd >> > >> > ARGV << "--confdir" << "/opt/puppet/" >> > ARGV << "--vardir" << "/opt/puppet/var" >> > ARGV << "--config" << "/opt/puppet/puppet.conf" >> > >> > Doesn''t fly.. it stil creates the .puppet directory and fails. >> > >> > I also tried with: >> > >> > ARGV << "--config=/opt/puppet/puppetmaster.conf" >> > >> > And that didn''t work. >> > >> > Both syntaxes work from the shell tho. Just not through httpd for some >> > odd reason. I''ll keep tinkering tho >> > >> > Thanks, >> > >> > Jason >> > >> > On Thursday, January 31, 2013 6:03:31 PM UTC-8, Ramin K wrote: >> > >> > On 1/31/2013 5:46 PM, Jason Knudsen wrote: >> > > Yo, >> > > >> > > Thanks for the suggestion Chad. So actually a little bit more >> > background >> > > from me would be useful: >> > > >> > > I''m running this in user land, outside of their $HOME directory >> > -- as a >> > > non-root user. Also, I''m running this through Apache Passenger >> > (so I''ve >> > > tried putting the variables correctly in the config.ru >> > <http://config.ru> <http://config.ru>) >> > >> > In the config.ru <http://config.ru> it''s the addition of a single >> > line and IIRC you''ll need >> > to restart the http server, not just the app. >> > >> > ARGV << "--config=/opt/puppet/puppetmaster.conf" >> > >> > Additionally you can point your master process to it''s own set of >> dirs >> > for everything it does. Makes it simpler to backup at the very >> least. >> > >> > puppmaster.conf >> > [main] >> > confdir=/opt/puppet/etc >> > logdir=/opt/puppet/logs >> > vardir=/opt/puppet/var >> > ssldir=$vardir/ssl >> > rundir=/opt/puppet/run >> > factpath=$vardir/lib/facter >> > templatedir=$confdir/templates >> > >> > 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...@googlegroups.com. >> > To post to this group, send email to puppet...@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. >> > >> > >> >>-- 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.
Oh and one last observation since I''m in the heat of it. Doesn''t seem like my confdir setting is taking either. btw my $HOME is /opt.. don''t ask (just testing) :-) $ puppet agent --test --debug Debug: Failed to load library ''selinux'' for feature ''selinux'' Debug: Using settings: adding file resource ''confdir'': ''File[/opt/.puppet]{:path=>"/opt/.puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'' On Thursday, January 31, 2013 6:55:08 PM UTC-8, Jason Knudsen wrote:> > Just in case I''m missing something obvious, here''s my entire config.rufile: > > # a config.ru, for use with every rack-compatible webserver. >> # SSL needs to be handled outside this, though. >> # if puppet is not in your RUBYLIB: >> # $LOAD_PATH.unshift(''/opt/puppet/lib'') >> $0 = "master" >> # if you want debugging: >> # ARGV << "--debug" >> ARGV << "--rack" >> # Rack applications typically don''t start as root. Set --confdir and >> --vardir >> # to prevent reading configuration from ~puppet/.puppet/puppet.conf and >> writing >> # to ~puppet/.puppet >> ARGV << "--confdir" << "/opt/puppet" >> ARGV << "--vardir" << "/opt/puppet/var" >> ARGV << "--config=/opt/puppet/puppet.conf" >> # NOTE: it''s unfortunate that we have to use the "CommandLine" class >> # here to launch the app, but it contains some initialization logic >> # (such as triggering the parsing of the config file) that is very >> # important. We should do something less nasty here when we''ve >> # gotten our API and settings initialization logic cleaned up. >> # >> # Also note that the "$0 = master" line up near the top here is >> # the magic that allows the CommandLine class to know that it''s >> # supposed to be running master. >> # >> # --cprice 2012-05-22 >> require ''puppet/util/command_line'' >> # we''re usually running inside a Rack::Builder.new {} block, >> # therefore we need to call run *here*. >> run Puppet::Util::CommandLine.new.execute > > > > > On Thursday, January 31, 2013 6:50:22 PM UTC-8, Jason Knudsen wrote: >> >> Yup, definitely apache: >> >> netstat: >> tcp 0 0 :::8140 :::* >> LISTEN 21710/httpd >> >> rack is spawned: >> >> ps: >> user 21877 1 0 18:26 ? 00:00:00 Rack: /opt/puppet/rack >> >> >> >> I get nothing in my httpd log files.. error or access.log (this feels >> weird..) >> >> Oh yeah and this is Puppet 3.0.2 >> >> Jason >> >> >> On Thursday, January 31, 2013 6:43:49 PM UTC-8, Ramin K wrote: >>> >>> Very strange, I''ve used the --config with the custom conf file >>> for >>> years though I''m still on 2.7. >>> >>> Are you sure you''re running your Puppet master through Apache/Passenger >>> and not running the puppetmaster script? For the hell of it check to >>> make sure Apache has the port and that Rack processes have spawned. Also >>> look at the logs to see if Passenger is kicking out errors. >>> >>> Ramin >>> >>> On 1/31/2013 6:28 PM, Jason Knudsen wrote: >>> > Hey Ramin, >>> > >>> > That sounded like an awesome idea! So I tried it out, updated >>> config.ru >>> > and bounced httpd >>> > >>> > ARGV << "--confdir" << "/opt/puppet/" >>> > ARGV << "--vardir" << "/opt/puppet/var" >>> > ARGV << "--config" << "/opt/puppet/puppet.conf" >>> > >>> > Doesn''t fly.. it stil creates the .puppet directory and fails. >>> > >>> > I also tried with: >>> > >>> > ARGV << "--config=/opt/puppet/puppetmaster.conf" >>> > >>> > And that didn''t work. >>> > >>> > Both syntaxes work from the shell tho. Just not through httpd for some >>> > odd reason. I''ll keep tinkering tho >>> > >>> > Thanks, >>> > >>> > Jason >>> > >>> > On Thursday, January 31, 2013 6:03:31 PM UTC-8, Ramin K wrote: >>> > >>> > On 1/31/2013 5:46 PM, Jason Knudsen wrote: >>> > > Yo, >>> > > >>> > > Thanks for the suggestion Chad. So actually a little bit more >>> > background >>> > > from me would be useful: >>> > > >>> > > I''m running this in user land, outside of their $HOME directory >>> > -- as a >>> > > non-root user. Also, I''m running this through Apache Passenger >>> > (so I''ve >>> > > tried putting the variables correctly in the config.ru >>> > <http://config.ru> <http://config.ru>) >>> > >>> > In the config.ru <http://config.ru> it''s the addition of a single >>> > line and IIRC you''ll need >>> > to restart the http server, not just the app. >>> > >>> > ARGV << "--config=/opt/puppet/puppetmaster.conf" >>> > >>> > Additionally you can point your master process to it''s own set of >>> dirs >>> > for everything it does. Makes it simpler to backup at the very >>> least. >>> > >>> > puppmaster.conf >>> > [main] >>> > confdir=/opt/puppet/etc >>> > logdir=/opt/puppet/logs >>> > vardir=/opt/puppet/var >>> > ssldir=$vardir/ssl >>> > rundir=/opt/puppet/run >>> > factpath=$vardir/lib/facter >>> > templatedir=$confdir/templates >>> > >>> > 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...@googlegroups.com. >>> > To post to this group, send email to puppet...@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. >>> > >>> > >>> >>>-- 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.
I''m not sure your syntax is valid with that double <<. Try $0 = "master" ARGV << "--debug" ARGV << "--rack" ARGV << "--confdir=/opt/puppet" ARGV << "--vardir=/opt/puppet/var" ARGV << "--config=/opt/puppet/puppet.conf" require ''puppet/util/command_line'' run Puppet::Util::CommandLine.new.execute Ramin On 1/31/2013 6:55 PM, Jason Knudsen wrote:> Just in case I''m missing something obvious, here''s my entire config.ru file: > > # a config.ru, for use with every rack-compatible webserver. > # SSL needs to be handled outside this, though. > # if puppet is not in your RUBYLIB: > # $LOAD_PATH.unshift(''/opt/puppet/lib'') > $0 = "master" > # if you want debugging: > # ARGV << "--debug" > ARGV << "--rack" > # Rack applications typically don''t start as root. Set --confdir > and --vardir > # to prevent reading configuration from ~puppet/.puppet/puppet.conf > and writing > # to ~puppet/.puppet > ARGV << "--confdir" << "/opt/puppet" > ARGV << "--vardir" << "/opt/puppet/var" > ARGV << "--config=/opt/puppet/puppet.conf" > # NOTE: it''s unfortunate that we have to use the "CommandLine" class > # here to launch the app, but it contains some initialization logic > # (such as triggering the parsing of the config file) that is very > # important. We should do something less nasty here when we''ve > # gotten our API and settings initialization logic cleaned up. > # > # Also note that the "$0 = master" line up near the top here is > # the magic that allows the CommandLine class to know that it''s > # supposed to be running master. > # > # --cprice 2012-05-22 > require ''puppet/util/command_line'' > # we''re usually running inside a Rack::Builder.new {} block, > # therefore we need to call run *here*. > run Puppet::Util::CommandLine.new.execute > > > > > On Thursday, January 31, 2013 6:50:22 PM UTC-8, Jason Knudsen wrote: > > Yup, definitely apache: > > netstat: > tcp 0 0 :::8140 :::* > LISTEN 21710/httpd > > rack is spawned: > > ps: > user 21877 1 0 18:26 ? 00:00:00 Rack: /opt/puppet/rack > > I get nothing in my httpd log files.. error or access.log (this > feels weird..) > > Oh yeah and this is Puppet 3.0.2 > > Jason > > > On Thursday, January 31, 2013 6:43:49 PM UTC-8, Ramin K wrote: > > Very strange, I''ve used the --config with the custom > conf file for > years though I''m still on 2.7. > > Are you sure you''re running your Puppet master through > Apache/Passenger > and not running the puppetmaster script? For the hell of it > check to > make sure Apache has the port and that Rack processes have > spawned. Also > look at the logs to see if Passenger is kicking out errors. > > Ramin > > On 1/31/2013 6:28 PM, Jason Knudsen wrote: > > Hey Ramin, > > > > That sounded like an awesome idea! So I tried it out, updated > config.ru <http://config.ru> > > and bounced httpd > > > > ARGV << "--confdir" << "/opt/puppet/" > > ARGV << "--vardir" << "/opt/puppet/var" > > ARGV << "--config" << "/opt/puppet/puppet.conf" > > > > Doesn''t fly.. it stil creates the .puppet directory and fails. > > > > I also tried with: > > > > ARGV << "--config=/opt/puppet/puppetmaster.conf" > > > > And that didn''t work. > > > > Both syntaxes work from the shell tho. Just not through httpd > for some > > odd reason. I''ll keep tinkering tho > > > > Thanks, > > > > Jason > > > > On Thursday, January 31, 2013 6:03:31 PM UTC-8, Ramin K wrote: > > > > On 1/31/2013 5:46 PM, Jason Knudsen wrote: > > > Yo, > > > > > > Thanks for the suggestion Chad. So actually a little > bit more > > background > > > from me would be useful: > > > > > > I''m running this in user land, outside of their $HOME > directory > > -- as a > > > non-root user. Also, I''m running this through Apache > Passenger > > (so I''ve > > > tried putting the variables correctly in the config.ru > <http://config.ru> > > <http://config.ru> <http://config.ru>) > > > > In the config.ru <http://config.ru> <http://config.ru> > it''s the addition of a single > > line and IIRC you''ll need > > to restart the http server, not just the app. > > > > ARGV << "--config=/opt/puppet/puppetmaster.conf" > > > > Additionally you can point your master process to it''s > own set of dirs > > for everything it does. Makes it simpler to backup at the > very least. > > > > puppmaster.conf > > [main] > > confdir=/opt/puppet/etc > > logdir=/opt/puppet/logs > > vardir=/opt/puppet/var > > ssldir=$vardir/ssl > > rundir=/opt/puppet/run > > factpath=$vardir/lib/facter > > templatedir=$confdir/templates > > > > 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...@googlegroups.com. > > To post to this group, send email to puppet...@googlegroups.com. > > Visit this group at > http://groups.google.com/group/puppet-users?hl=en > <http://groups.google.com/group/puppet-users?hl=en>. > > For more options, visit > https://groups.google.com/groups/opt_out > <https://groups.google.com/groups/opt_out>. > > > > > > -- > 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. > >-- 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.
Hey Ramin, Thanks for all of your help! I''ve tried that and it didn''t work either. I''m suspecting it might not be related to the syntax of my config.ru file whatsoever. I''m going to do some digging elsewhere to see if I can track it down Jason On Thursday, January 31, 2013 8:44:50 PM UTC-8, Ramin K wrote:> > I''m not sure your syntax is valid with that double <<. Try > > $0 = "master" > ARGV << "--debug" > ARGV << "--rack" > ARGV << "--confdir=/opt/puppet" > ARGV << "--vardir=/opt/puppet/var" > ARGV << "--config=/opt/puppet/puppet.conf" > > require ''puppet/util/command_line'' > run Puppet::Util::CommandLine.new.execute > > Ramin > > On 1/31/2013 6:55 PM, Jason Knudsen wrote: > > Just in case I''m missing something obvious, here''s my entire config.rufile: > > > > # a config.ru, for use with every rack-compatible webserver. > > # SSL needs to be handled outside this, though. > > # if puppet is not in your RUBYLIB: > > # $LOAD_PATH.unshift(''/opt/puppet/lib'') > > $0 = "master" > > # if you want debugging: > > # ARGV << "--debug" > > ARGV << "--rack" > > # Rack applications typically don''t start as root. Set --confdir > > and --vardir > > # to prevent reading configuration from ~puppet/.puppet/puppet.conf > > and writing > > # to ~puppet/.puppet > > ARGV << "--confdir" << "/opt/puppet" > > ARGV << "--vardir" << "/opt/puppet/var" > > ARGV << "--config=/opt/puppet/puppet.conf" > > # NOTE: it''s unfortunate that we have to use the "CommandLine" class > > # here to launch the app, but it contains some initialization logic > > # (such as triggering the parsing of the config file) that is very > > # important. We should do something less nasty here when we''ve > > # gotten our API and settings initialization logic cleaned up. > > # > > # Also note that the "$0 = master" line up near the top here is > > # the magic that allows the CommandLine class to know that it''s > > # supposed to be running master. > > # > > # --cprice 2012-05-22 > > require ''puppet/util/command_line'' > > # we''re usually running inside a Rack::Builder.new {} block, > > # therefore we need to call run *here*. > > run Puppet::Util::CommandLine.new.execute > > > > > > > > > > On Thursday, January 31, 2013 6:50:22 PM UTC-8, Jason Knudsen wrote: > > > > Yup, definitely apache: > > > > netstat: > > tcp 0 0 :::8140 :::* > > LISTEN 21710/httpd > > > > rack is spawned: > > > > ps: > > user 21877 1 0 18:26 ? 00:00:00 Rack: /opt/puppet/rack > > > > I get nothing in my httpd log files.. error or access.log (this > > feels weird..) > > > > Oh yeah and this is Puppet 3.0.2 > > > > Jason > > > > > > On Thursday, January 31, 2013 6:43:49 PM UTC-8, Ramin K wrote: > > > > Very strange, I''ve used the --config with the custom > > conf file for > > years though I''m still on 2.7. > > > > Are you sure you''re running your Puppet master through > > Apache/Passenger > > and not running the puppetmaster script? For the hell of it > > check to > > make sure Apache has the port and that Rack processes have > > spawned. Also > > look at the logs to see if Passenger is kicking out errors. > > > > Ramin > > > > On 1/31/2013 6:28 PM, Jason Knudsen wrote: > > > Hey Ramin, > > > > > > That sounded like an awesome idea! So I tried it out, updated > > config.ru <http://config.ru> > > > and bounced httpd > > > > > > ARGV << "--confdir" << "/opt/puppet/" > > > ARGV << "--vardir" << "/opt/puppet/var" > > > ARGV << "--config" << "/opt/puppet/puppet.conf" > > > > > > Doesn''t fly.. it stil creates the .puppet directory and > fails. > > > > > > I also tried with: > > > > > > ARGV << "--config=/opt/puppet/puppetmaster.conf" > > > > > > And that didn''t work. > > > > > > Both syntaxes work from the shell tho. Just not through httpd > > for some > > > odd reason. I''ll keep tinkering tho > > > > > > Thanks, > > > > > > Jason > > > > > > On Thursday, January 31, 2013 6:03:31 PM UTC-8, Ramin K > wrote: > > > > > > On 1/31/2013 5:46 PM, Jason Knudsen wrote: > > > > Yo, > > > > > > > > Thanks for the suggestion Chad. So actually a little > > bit more > > > background > > > > from me would be useful: > > > > > > > > I''m running this in user land, outside of their $HOME > > directory > > > -- as a > > > > non-root user. Also, I''m running this through Apache > > Passenger > > > (so I''ve > > > > tried putting the variables correctly in the config.ru > > <http://config.ru> > > > <http://config.ru> <http://config.ru>) > > > > > > In the config.ru <http://config.ru> <http://config.ru> > > it''s the addition of a single > > > line and IIRC you''ll need > > > to restart the http server, not just the app. > > > > > > ARGV << "--config=/opt/puppet/puppetmaster.conf" > > > > > > Additionally you can point your master process to it''s > > own set of dirs > > > for everything it does. Makes it simpler to backup at the > > very least. > > > > > > puppmaster.conf > > > [main] > > > confdir=/opt/puppet/etc > > > logdir=/opt/puppet/logs > > > vardir=/opt/puppet/var > > > ssldir=$vardir/ssl > > > rundir=/opt/puppet/run > > > factpath=$vardir/lib/facter > > > templatedir=$confdir/templates > > > > > > 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...@googlegroups.com. > > > To post to this group, send email to > puppet...@googlegroups.com. > > > Visit this group at > > http://groups.google.com/group/puppet-users?hl=en > > <http://groups.google.com/group/puppet-users?hl=en>. > > > For more options, visit > > https://groups.google.com/groups/opt_out > > <https://groups.google.com/groups/opt_out>. > > > > > > > > > > -- > > 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...@googlegroups.com <javascript:>. > > To post to this group, send email to puppet...@googlegroups.com<javascript:>. > > > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > >-- 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.