On Fri, Jul 17, 2015 at 6:51 PM, Felix Frank < [email protected]> wrote:
> Hey Ramin and Michael, > > thanks for your replies. > > On 07/17/2015 11:53 PM, Ramin K wrote: > > I wrote a how-to on using different Rubies for your Puppet master and am > using it to run a Ruby 2.1.6/Puppet 3.7.x master. I would attempt something > similar in your case. > > > http://ask.puppetlabs.com/question/16983/performance-improvements-without-updating-to-puppet-server/ > > Install Passenger 4.x via packages. Doesn't need to be built on the Ruby > you plan to use. > Point to /opt/puppetlabs ruby via PassengerRuby vhost directive. > > Other than those two steps, it sounds like you're pretty close. > > > Yes, this does look pretty similar to what I attempted. Thanks for this > guide! > Things I learend: > 1. Use the rack gem (as in your Gemfile) - this actually enabled > nginx/passenger to load Puppet for me. > 2. Passenger 5 may have issues. > > The latter is a little tough to solve with nginx, because I rely on > packages from Phusion themselves. Those currently come with Passenger 5. > However, I can reproduce the problems with Passenger 4 on an older Debian 7 > installation. So I'm ruling out Passenger 5 as the immediate issue at this > time. > I had it working with passenger-5.0.7 last time I tested, so I don't think it's passenger. > > > On 07/18/2015 12:32 AM, Michael Stahnke wrote: > > For the AIO, you can certainly get passenger working. (Although we'd love > to hear why PuppetServer isn't working or what you want). > > > Oh, puppetserver is working like a charm. I'm putting together alternative > instructions for nginx/passenger though, for those who have reservations > against the JVM. > > This worked great with Puppet 3.x, so I hoped I could repeat with Puppet > 4, but it proves more challenging. > > > Config files on a gist: > > https://gist.github.com/stahnma/cf89dfa79b053f138eb1 > > This should get you most of the way there. You might have to sub out > passenger versions or something. > > export PATH=/opt/puppetlabs/puppet/bin:$PATH > # install passenger > gem install --no-rdoc --no-ri passenger > # you need gcc, apr or build-essential installed > # this command is different if using nginx > passenger-install-apache2-module --languages ruby -a > > > I went for nginx packages from Phusion. From what I understand, regular > nginx cannot just load Passenger as a module. But I may look into > alternative ways of installation if this doesn't work. > > # create a puppet user > # Add our user and group > if getent group 'puppet' &> /dev/null; then > /usr/sbin/groupmod --system 'puppet' > else > /usr/sbin/groupadd --system 'puppet' > fi > if getent passwd 'puppet' &> /dev/null; then > /usr/sbin/usermod --system --gid 'puppet' --home > '/opt/puppetlabs/server/data/puppetmaster' --shell '/usr/sbin/nologin' > 'puppet' > else > /usr/sbin/useradd --system --gid 'puppet' --home > '/opt/puppetlabs/server/data/puppetmaster' --shell '/usr/sbin/nologin' > 'puppet' > fi > > > Is it a design decision that the puppet-agent AIO package doesn't handle > this? > Yes. In the most typical use cases the Puppet User isn't required on the endpoint. Some people didn't like a new user everywhere, so we now put it in only when something needs it (e.g. puppetserver). > > I realize that WEBrick is deprecated, but support is still there. It > strikes me as odd that the standalone master cannot operate after AIO > installation without the user performing the above steps manually. > Well, it technically doesn't have to run as puppet, obviously it could be whatever, that's just the example we gave. > > As an aside - as far as I know, the Puppet master runs a catalog on > startup (before dropping privileges?) so should it not be able to take care > of this by itself? > > # create public dir > mkdir -p /opt/puppetlabs/server/data/puppetmaster/public > mkdir -p /opt/puppetlabs/server/data/puppetmaster > mkdir -p /var/log/puppetlabs/puppetmaster > > > Done. > > chown puppet:puppet /opt/puppetlabs/server/data/puppetmaster/public > /opt/puppetlabs/server/data/puppetmaster > /var/log/puppetlabs/puppetmaster /opt/puppetlabs/server/data/puppetmaster/ > config.ru > cp -p ./config.ru /opt/puppetlabs/server/data/puppetmaster/config.ru > > > Where exactly is this config.ru from? Again, it is quite definitely not > part of the PC1 packages for Debian. > This was from a repo I had where I tested that passenger support still worked again puppet 4. It probably has some deltas from the one on master. I should probably submit a PR :) > > > cp -p ./passenger-apache.conf > /etc/apache2/sites-available/puppet-passenger > sed -i 's/__PASSENGER_VERSION__/5.0.16/g > /etc/apache2/sites-available/puppet-passenger > > > Eh, sure...for nginx there is not much by way of configuration templates. > I managed to compile one for the original Puppet Essentials book that > worked with Puppet 3. > I honestly know much less about nginx, so I might be less helpful here. > > It pretty much works for Puppet 4, but now I get the most informative > stack ever. > > [ 2015-07-18 02:40:57.4131 3254/7fc55d886700 App/Implementation.cpp:303 ]: > Could not spawn process for application /etc/puppetlabs/puppet/rack: An > error occured while starting up the preloader. > Error ID: 8013a2ba > Error details saved to: /tmp/passenger-error-dMKrUn.html > Message from application: exit (SystemExit) > /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:452:in `exit' > /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:452:in > `rescue in exit_on_fail' > /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:438:in > `exit_on_fail' > > /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:66:in > `execute' > config.ru:44:in `block in <main>' > That's ruby-speak for "it broke" :) That pretty much means something isn't right, but difficult to say what. Does the nginx log have any more details? > > (/etc/puppetlabs/puppet/rack is indeed where I created the rack root.) > > What I did to get this far without loading errors: > * change passenger_ruby to /opt/puppetlabs/... > * created puppet user/group > * get config.ru from github (current master) > * install 'rack' gem in /opt/puppetlabs/... > > I'm using PC1. Above error gets produced on > 1. Debian 7 w/ nginx 1.6.1 and Passenger 4.0.52 and > 2. Debian 8 w/ nginx 1.8.0 and Passenger 5.0.14 > > Thanks and regards, > Felix > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/55A9B120.3050409%40Alumni.TU-Berlin.de > <https://groups.google.com/d/msgid/puppet-users/55A9B120.3050409%40Alumni.TU-Berlin.de?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAMto7LLapm%3DR9mE_ip8axfmoN4xqsPHKShkODaUbrazAKqV25Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
