Do you guys know how one might run r10k properly on a CEntOS 6.7 server with Puppet 3.6? Is that a contradiction in terms?
I checked the r10k source code's list of requirements: https://github.com/puppetlabs/r10k#requirements
It looks like it requires Ruby 1.9. Fair enough.
But...
$ facter rubysitedir rubyversion
rubysitedir => /usr/lib/ruby/site_ruby/1.8
rubyversion => 1.8
Thus begins the ignoble quest for the fabled Ruby.
Third Party Repositories
But most 3rd party repos don't offer Ruby 1.9 for CEntOS 6.7.
I failed to properly install The one package I did find, in good ol' Remi's repo, failed due to a lack of the mockbuild user. I would think that'd only be necessary if built from source.
Ruby 'managers'
I installed RVM.
That, however, required glibc = 2.12-1.166.el6_7.7
, and my system does not have this particular version available (for good reasons).
Regardless, that would only have worked for specific users. Things could get weird with system users that need to use Ruby if RVM was installed. rbenv
, which might have mitigated that issue, gave me the same guff about glibc:
$ mkdir ~/.tmp && export TMPDIR=~/.tmp && rbenv install 1.9.3-p551 ## How did it come to this...
Downloading yaml-0.1.6.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/7da6971b4bd08a986dd2a61353bc422362bd0edcc67d7ebaac68c95f74182749
Installing yaml-0.1.6...
BUILD FAILED (CentOS release 6.7 using ruby-build 20160913)
Inspect or clean up the working tree at /export/home/nger/.tmp/ruby-build.20161117064013.21057
Results logged to /home/nger/.tmp/ruby-build.20161117064013.21057.log
Last 10 log lines:
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/home/nger/.tmp/ruby-build.20161117064013.21057/yaml-0.1.6':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
System Ruby
ANYWAY, I then thought that I might be able to get away with using Ruby 1.8, CEntOS 6's system Ruby:
However, r10k devs later removed support for Ruby 1.8 :(
Puppet Collections
Next, at the behest of commenters, I checked the Puppet Collections documentation.
A. http://yum.puppetlabs.com/el/6/ has nothing for Ruby.
B. The puppet-agent package does not update the system Ruby, as (I thought?) advertised:
HOWEVER, after installing, it looks like this does, indeed, produce a bespoke Ruby just for Puppet. Refer to the answer below for more details.
Is CEntOS 6 even supported by r10k?
Does CEntOS 6 support Ruby 1.9?
I'm close to giving up here, serverfault.com is my 'Hail Mary' play.
I have more options other than actual work, of course. I might just beg the RedHat package maintainers to update their Ruby, or pester certain people (you know who you are) to step up the pace on their CEntOS 7 efforts...
Notes:
Note 1: I did not find much on serverfault about this question. https://serverfault.com/search?q=r10k+on+CEntOS+6
Note 2: I have asked this as part of my research on the following prior question:
How do I add third party puppet modules without committing them to source control?
r10k 1.5.1 is the last version to support ruby 1.8.7. Even if you gem install 1.5.1, newer-than-when-released dependencies will be installed, which are also incompatible with ruby 1.8.7. Obviously resulting in non-r10k errors, and the reason you may be looking at this answer.
The answer was in Puppet Collections, apparently:
r10k
will work just fine with this.However, this gives you a later version of Puppet.
That cannot be resolved by force installing an earlier version of the
puppet-agent
package, though:The real answer, here, is to compile your own version of Ruby, and make it available to your system from FTP or an internal repo.
To answer the explicit question:
YES, YOU MAY INSTALL r10k ON CENTOS 6 USING CURL, RPM, AND YUM.
As to whether you can keep your old, dying Puppet 3.6, while doing so, that's still up in the air.
(Note: Some output has been intentionally omitted by The Management to protect the guilty and/or silly.)