puppetserver.conf and gem-home

144 views
Skip to first unread message

Darin Perusich

unread,
Oct 17, 2014, 9:42:01 AM10/17/14
to puppe...@googlegroups.com
Hello All,

What is the syntax for defining multiple gem-home locations in
puppetserver.conf? On my systems, OpenSUSE/SLES, Hiera is packaged as
a gem and lives under /usr/{lib,lib64}/ruby/gems/$ruby_ver so clients
fail with 'Puppet::Parser::AST::Resource failed with error
RuntimeError: Hiera terminus not supported without hiera library'
unless I set gem-home to the system gem-home. If that's not an option
that's fine, but I'll need modify the packaging of puppetserver to set
the proper location for gems.

How I've tried defining it.,
jruby-puppet: {
#gem-home: [ /var/lib/puppet/jruby-gems, /usr/lib64/ruby/gems/2.0.0 ]
#gem-home: [ '/var/lib/puppet/jruby-gems', '/usr/lib64/ruby/gems/2.0.0' ]
gem-home: /usr/lib64/ruby/gems/2.0.0
}

--
Later,
Darin

Chris Price

unread,
Oct 17, 2014, 9:51:23 AM10/17/14
to puppe...@googlegroups.com
Hi Darin,

Puppet Server doesn't currently support multiple directories for gem home; we try to avoid using gems from the system ruby because we want to make sure that all gems are installed via the JRuby interpreter embedded in Puppet Server.  This helps us guarantee that the gems will be compatible with Puppet Server.

If you set your gem-home back to '/var/lib/puppet/jruby-gems' and then run 'puppetserver gem install hiera', I hope that will install it to the desired location.

For more info see:


Note that we've had a couple of minor issues with the 'puppetserver gem' command (see https://tickets.puppetlabs.com/browse/SERVER-24 ), but they have workarounds and are fixed in the next release (which should be coming out Very Soon Now).

If that doesn't solve your issue, let us know and we can open up a Jira ticket to work out a fix.


--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-dev/CADaviKtL%3DBpD%2B78jh9eLWJM5UpdyJLqhi6nh_Mvpcs2EAXOOHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Darin Perusich

unread,
Oct 17, 2014, 10:21:23 AM10/17/14
to puppe...@googlegroups.com
Hi Chris,

Much like how installing puppetserver from yum.puppetlabs.com would
leverage the hiera package for hiera support, I need the same as I'm
packaging it in the open build service for opensuse/sles.

I've tried added it to the ruby-load-path in os-settings.conf but that
failed, which kinda expected.
> https://groups.google.com/d/msgid/puppet-dev/CAMx1QfKpddUxxf5UdWyJLRtTkQBaHVF-7%3DvE7A86h_t-Sy%2B3Zw%40mail.gmail.com.

Chris Price

unread,
Oct 17, 2014, 10:28:36 AM10/17/14
to puppe...@googlegroups.com
On Fri, Oct 17, 2014 at 7:21 AM, Darin Perusich <da...@darins.net> wrote:
Hi Chris,

Much like how installing puppetserver from yum.puppetlabs.com would
leverage the hiera package for hiera support, I need the same as I'm
packaging it in the open build service for opensuse/sles.

I've tried added it to the ruby-load-path in os-settings.conf but that
failed, which kinda expected.

I see; so the gem is being installed via system packages rather than via the gem tool itself.  Hmmm.  Well, the ruby-load-path is what we use to make that work on RHEL/debian... so I'm a little surprised actually that that doesn't sound like it works for you.  We could maybe look into adding a gem-path setting as an alternative to or replacement for gem-home, but I'm not sure we'll have any way to know whether that fixes the issue you're hitting until we actually have it wired up.

Seems like maybe the best thing to do for now is to open up a Jira ticket.  In the interim I still think there is probably *some* value that you could add to your ruby-load-path as a temporary workaround if you need one; it just may have to drill all the way down into the hiera lib directory.
 

Darin Perusich

unread,
Oct 17, 2014, 12:18:51 PM10/17/14
to puppe...@googlegroups.com
Hi Chris,

Adding the path of the hiera lib directory to the ruby-load-path
works, I just hadn't gone that deep when trying different paths. I'll
create a Jira ticket for this, perhaps adding a gems-load-path
parameter for system "gems" which is recursively searched.

os-settings: {
ruby-load-path: [ /usr/lib64/ruby/vendor_ruby/2.0.0,
/usr/lib64/ruby/site_ruby/2.0.0,
/usr/lib64/ruby/gems/2.0.0/gems/hiera-1.2.1/lib
]
}
--
Later,
Darin
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to puppet-dev+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/puppet-dev/CAMx1QfLdsH3Oj9eF9T%3DE1T37d4s4kMSXSH-Ow4oMstwaLWTDzA%40mail.gmail.com.

Chris Price

unread,
Oct 17, 2014, 12:59:11 PM10/17/14
to puppe...@googlegroups.com
Thanks, Darin.

I must say that it makes me a bit nervous to see items with a "2.0.0" ruby version listed in your load path, though; the JRuby that is embedded in puppet server is intended to be compatible (at the language level) with a 1.9.3 ruby.  It seems like maybe the right solution here is to think about doing OS packages for gems like hiera that put the correct version of the gem directly in the jruby-gem path that Puppet Server expects.

Thanks for creating the ticket, I'll chime in on it and ping our release engineering folks.

Trevor Vaughan

unread,
Oct 17, 2014, 1:15:10 PM10/17/14
to puppe...@googlegroups.com
+1 for including everything that you need in your own private path.

However, please make it VERY clear as to where these files are so that ninja patches can happen without hours of hunting.

Thanks,

Trevor


For more options, visit https://groups.google.com/d/optout.



--
Trevor Vaughan
Vice President, Onyx Point, Inc
(410) 541-6699
tvau...@onyxpoint.com

-- This account not approved for unencrypted proprietary information --

Chris Price

unread,
Oct 17, 2014, 2:15:42 PM10/17/14
to puppe...@googlegroups.com
On Fri, Oct 17, 2014 at 10:15 AM, Trevor Vaughan <tvau...@onyxpoint.com> wrote:
+1 for including everything that you need in your own private path.

However, please make it VERY clear as to where these files are so that ninja patches can happen without hours of hunting.


Sounds good, what'd you have in mind?  Just making sure it's prominent in the docs?  Logging a message at server startup?
 

Trevor Vaughan

unread,
Oct 17, 2014, 2:28:29 PM10/17/14
to puppe...@googlegroups.com
Both would be nice. Or even in a DEBUGGING_README or somesuch at the top level of the installation directory structure.

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-dev+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Chris Price

unread,
Oct 17, 2014, 2:57:13 PM10/17/14
to puppe...@googlegroups.com
On Fri, Oct 17, 2014 at 11:28 AM, Trevor Vaughan <tvau...@onyxpoint.com> wrote:
Both would be nice. Or even in a DEBUGGING_README or somesuch at the top level of the installation directory structure.


Good idea, thanks. 
Reply all
Reply to author
Forward
0 new messages