puppet 3.7.2 and using cloudstack_resources = need ruby 1.9.3 ... any help?

54 views
Skip to first unread message

Luca Gioppo

unread,
Nov 5, 2014, 8:41:59 AM11/5/14
to puppet...@googlegroups.com
I started by installing puppet (puppet master + puppetdb etc) from RPM (yum.puppet....) on a CentOS 6.5.
Since I want to test the "cloudstack_resource" module I saw that it needs fog and it needs ruby 1.9.3.

So tried to install ruby 1.9.3 from repos (getting it from scl) and installed correctly (hope)
Now the result of:
ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

But when I check puppet agent:
puppet agent --noop --debug --verbose
Runtime environment: run_mode=agent, puppet_version=3.7.2, ruby_version=1.8.7

The Ruby version still is 1.8.7.

How is possible to make puppet (installed from rpm) make use of the ruby 1.9.3 taken from the rpm?

Using rpm is really straightforward and my preferred way to go if possible.

Thanks
Luca


Felix Frank

unread,
Nov 16, 2014, 9:15:57 AM11/16/14
to puppet...@googlegroups.com
Hi,

I'm not familiar with the details of the CentOS packages from
puppetlabs. I assume that those explicitly use the ruby1.8 binary.

Try and take a look using "less `which puppet`". The first line
(shebang) holds the Ruby invocation.

If it's indeed ruby1.8, you might need to patch your Puppet
installation. You can also build your own RPMs that will behave just the
way you want.

As a crutch, you can probably just invoke Puppet through ruby1.9
(assuming there is such a binary on your system).

ruby1.9 `which puppet` <arguments ...>

HTH,
Felix

jcbollinger

unread,
Nov 17, 2014, 10:29:48 AM11/17/14
to puppet...@googlegroups.com


On Wednesday, November 5, 2014 7:41:59 AM UTC-6, Luca Gioppo wrote:
I started by installing puppet (puppet master + puppetdb etc) from RPM (yum.puppet....) on a CentOS 6.5.
Since I want to test the "cloudstack_resource" module I saw that it needs fog and it needs ruby 1.9.3.

So tried to install ruby 1.9.3 from repos (getting it from scl) and installed correctly (hope)
Now the result of:
ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]

But when I check puppet agent:
puppet agent --noop --debug --verbose
Runtime environment: run_mode=agent, puppet_version=3.7.2, ruby_version=1.8.7

The Ruby version still is 1.8.7.

How is possible to make puppet (installed from rpm) make use of the ruby 1.9.3 taken from the rpm?


This is mostly a function of the Puppet RPM you use.  The system Ruby for CentOS 6 is version 1.8.7, so if you get a Puppet package for CentOS 6 (or RHEL 6, etc.) it is likely to be packaged for that Ruby.  There are various tricks you might play, but my recommendation is that you just get the source RPM, and use it to build your own Puppet package for your particular non-standard OS configuration.


John

Reply all
Reply to author
Forward
0 new messages