Custom Ruby

51 views
Skip to first unread message

Jamie

unread,
Oct 16, 2012, 3:15:30 PM10/16/12
to puppet...@googlegroups.com
Is it possible to tell Puppet (and Facter for that matter)  to use a custom Ruby that exists alongside the Ruby 1.8.7 that comes with CentOS 5 without converting the entire host to only use the custom version?

I'm in an environment where we're stuck on CentOS 5 for some time and it's ancient Ruby.  We do though have a custom packaging of Ruby 1.9 installed on all machines with separate binaries, i.e. /usr/bin/my_ruby, /usr/bin/my_irb that we use when we need Ruby.


I'm looking for some config or startup option that says where to find Ruby.  So far I don't see anything in the init scripts or config options.


Solutions such as linking /usr/bin/ruby to /usr/bin/my_ruby are not an option but rebuilding an RPM is.

Thanks!

Jamie

unread,
Oct 16, 2012, 3:17:59 PM10/16/12
to puppet...@googlegroups.com
BTW, I want to do this so that I can upgrade to Puppet 3

Matthaus Owens

unread,
Oct 16, 2012, 4:26:52 PM10/16/12
to puppet...@googlegroups.com
You can rebuild puppet and/or facter to use the ruby you have
available. It should only require modifying a couple of lines in the
spec file. You'd need to modify the ruby dependencies and the
rubylib.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/MdQ1apUpOxQJ.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.



--
Matthaus Owens
Release Manager, Puppet Labs

Jamie

unread,
Oct 16, 2012, 4:35:45 PM10/16/12
to puppet...@googlegroups.com
Awesome!  I'll try that, thank you.

Craig White

unread,
Oct 16, 2012, 7:02:55 PM10/16/12
to puppet...@googlegroups.com
----
You can use solutions like rvm or rbenv to have more than one version of ruby installed and just tweak the startup scripts to use the non-packaged ruby form rvm or rbenv instead.

I am using rbenv with ubuntu and have been working to abstract the client systems to be happy with whatever version of ruby we employ as we are upgrading some of our test servers to 1.9.3.

The puppet server should probably be running on something newer than CentOS 5.x (a vm perhaps?)

Craig

Jakov Sosic

unread,
Oct 16, 2012, 7:37:52 PM10/16/12
to puppet...@googlegroups.com
On 10/17/2012 01:02 AM, Craig White wrote:
> The puppet server should probably be running on something newer than CentOS 5.x (a vm perhaps?)

Can you run 3.0 server with 2.7 clients?



--
Jakov Sosic
www.srce.unizg.hr

Michael Stahnke

unread,
Oct 16, 2012, 7:50:16 PM10/16/12
to puppet...@googlegroups.com
On Tue, Oct 16, 2012 at 4:37 PM, Jakov Sosic <jso...@srce.hr> wrote:
> On 10/17/2012 01:02 AM, Craig White wrote:
>>
>> The puppet server should probably be running on something newer than
>> CentOS 5.x (a vm perhaps?)
>
>
> Can you run 3.0 server with 2.7 clients?
Yes.

>
>
>
> --
> Jakov Sosic
> www.srce.unizg.hr
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.

Josh Cooper

unread,
Oct 16, 2012, 8:37:13 PM10/16/12
to puppet...@googlegroups.com
On Tue, Oct 16, 2012 at 4:50 PM, Michael Stahnke <sta...@puppetlabs.com> wrote:
> On Tue, Oct 16, 2012 at 4:37 PM, Jakov Sosic <jso...@srce.hr> wrote:
>> On 10/17/2012 01:02 AM, Craig White wrote:
>>>
>>> The puppet server should probably be running on something newer than
>>> CentOS 5.x (a vm perhaps?)
>>
>>
>> Can you run 3.0 server with 2.7 clients?
> Yes.

Also http://docs.puppetlabs.com/guides/upgrading.html#always-upgrade-the-puppet-master-first

Josh

--
Josh Cooper
Developer, Puppet Labs
Reply all
Reply to author
Forward
0 new messages