I'm setting up a pair of VM's to do some puppet testing on, and I am trying to figure out how to install puppet without having the the system also install ruby.
I already have ruby installed through RVM, and I'd like to get puppet to use that ruby.
For the record, I'm using CentOS 6.3 as the OS for the 2 VM's. I have the puppet labs repo installed so I'm getting the latest version of puppet straight from puppet labs.
rvm version 1.15.9 is installed and I have ruby 1.9.2-p320 installed (system wide) and set to the default. I also ran 'rvm system' so that ruby is found at /usr/local/rvm/bin/ruby.
Unfortunately every time I start 'yum install puppet-server puppet' yum wants to install ruby because rvm doesn't tell yum that ruby is already installed.
Does anyone know how to work around this? in particular does anyone know how I can make puppet use the rvm ruby after I install everything?
I'm setting up a pair of VM's to do some puppet testing on, and I am trying to figure out how to install puppet without having the the system also install ruby.
I already have ruby installed through RVM, and I'd like to get puppet to use that ruby.
For the record, I'm using CentOS 6.3 as the OS for the 2 VM's. I have the puppet labs repo installed so I'm getting the latest version of puppet straight from puppet labs.
rvm version 1.15.9 is installed and I have ruby 1.9.2-p320 installed (system wide) and set to the default. I also ran 'rvm system' so that ruby is found at /usr/local/rvm/bin/ruby.
Unfortunately every time I start 'yum install puppet-server puppet' yum wants to install ruby because rvm doesn't tell yum that ruby is already installed.
Does anyone know how to work around this? in particular does anyone know how I can make puppet use the rvm ruby after I install everything?
Thanks!
James "Zeke' Dehnert
You have a wrong concept: yum and rpm don't care whether any particular software is installed, they care only about what packages (RPMs) are installed. That's why they don't care about the Ruby you've installed via rvm.
As a system administration principle, I think it's a rather poor idea to install software other than via the system's native package management system. Among other things, that means I have no use for rvm (or gem), and also that I build a fair number of packages myself. If you ignore that principle, then you need to be aware that you thereby start down a slippery slope; in fact, you are beginning to discover that on your own.
So what can you do? Here are some of your options:
1) Use the system's Ruby packages.
2) Build and install your own Ruby packages (you can probably find some source RPMs to adapt)
3) Download the Puppet source and install it manually
John
> As long as we're talking about installing from source, there's a 4th option:
> use RVM's Ruby 1.9.2-p230 to install the Puppet gem. Instructions are here
> (though you'll need to adapt it to your specific environment):
> http://docs.puppetlabs.com/guides/installation.html#installing-from-gems-not-recommended
Also ruby 1.9.2 isn't very compatible with Puppet (at least 2.7.x).
On 09/22/2012 03:21 AM, jdehnert wrote:
> I'm aware of the issues of installing software through source vs. pkg
> management systems. I should have mentioned that I've been in IT for
> over 20 years. Its just puppet and ruby that are new to me, but I'm
> learning fast. We are in agreement about sticking to one type of
> package management. It much easier now that it was back when I was
> installing SunOS 4.1.4 on Sun 3's and Sparc 2's and compiling X11 from
> source.
If you were really aware, then you wouldn't do it...
> I've considered all of these. Does anyone know of a CentOS/RH repo that
> has the latest versions of Ruby available? I have done some searching,
> but not exhaustively so, for a repo with the most recent versions of
> Ruby, but no luck so far. The reason I want to use ruby-1.9.2-p320 on
> these test VM's is because in the production environment that these are
> mimicking the engineering folks are running that release, under RVM, and
> they want to avoid any installs of other versions to eliminate any
> chance of something getting pointed to an older version of Ruby
> accidentally. The dev and production environments will both point to
> Ruby under RVM.
This is wrong approach. Try to figure out why is RHEL/CentOS and Suse
Enterprise sticking to older version of ruby (or every other piece of
software they distribute), and what are the benefits...
> I was hoping someone might know some details about the rpm system that
> might allow me to tell it that ruby was installed without installing
> ruby, as with fake sendmail. Perhaps a lesser known tool that allows one
> to insert entries into the rpm database files.
You are mangling with the system in a way it shouldn't be mangled with.
Try to persuade your developers to use platform that is already used on
production, and not vice versa.
If that doesn't go quite right, then take src.rpm from RedHat/CentOS,
bump version to 1.9.x - or whatever do you want to use, drop in newer
sources, fix patches - and rebuild the RPM - or try to backport latest
feodra build:
http://fedora.aau.at/linux/releases/17/Fedora/source/SRPMS/r/ruby-1.9.3.194-10.1.fc17.src.rpm
but that could bring you back to trouble because that version probably
won't be 100% identical to the one that your dev team uses (if they
stick to sources). So we're back to square one - you *have to* convice
your team to use Ruby from RPM package - either fedora backport or
standard RHEL 1.8.x.
Everything else _*will*_ bit you in the ass in the long run.
--
Jakov Sosic
www.srce.unizg.hr
--
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/-/OEPaTlAP2QIJ.
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.