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 [email protected].
> > > To post to this group, send email to
> [email protected].
> > > 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 [email protected] <javascript:>.
> > To post to this group, send email to
> > [email protected]<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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.