Oracle Linux puppet, facter and hiera installation using Ruby

This config briefly describes an installation of Puppet configuration management system on Oracle Linux using Ruby. The installation procedure is simple to follow and we will install three main puppet’s components: puppet, facter and hiera.

Install Puppet’s installation prerequisites

First, we start by installation prerequisites:

# yum install curl ruby tar which

Puppet Installation

In the next step we download all latest version components into a temporary installation directory /tmp/puppet:

# mkdir /tmp/puppet
# cd  /tmp/puppet

The following linux command will download, extract and install each of the three components. Please update below URL’s with desired/newer tarball version numbers:

# curl -s http://downloads.puppetlabs.com/facter/facter-2.4.4.tar.gz | tar xz; ruby facter*/install.rb
# curl -s https://downloads.puppetlabs.com/hiera/hiera-2.0.0.tar.gz | tar xz; ruby hiera*/install.rb
# curl -s https://downloads.puppetlabs.com/puppet/puppet-4.1.0.tar.gz | tar xz; ruby puppet*/install.rb

All done. What remains is to check our installation:

# facter -v
2.4.4
]# hiera -v
2.0.0
# puppet --version
4.1.0

and optionally remove our temporary puppet installation directory:

# rm -fr /tmp/puppet

Troubleshooting

The following error message may appear during puppet installation if you are missing which package:

install.rb:138:in ``': No such file or directory - which (Errno::ENOENT)
        from install.rb:138:in `block in do_man'
        from install.rb:126:in `each'
        from install.rb:126:in `do_man'
        from install.rb:484:in `block in <main>'
        from /usr/share/ruby/fileutils.rb:125:in `chdir'
        from /usr/share/ruby/fileutils.rb:125:in `cd'
        from install.rb:467:in `<main>'

To resolve this error simply install which package:

# yum install which