Hiera 1: Installing
Included in Puppet Enterprise 3.8. A newer version is available; see the version menu above for details.
###Note: We’ve released a major update to Hiera called Hiera 5.
It’s built into Puppet 4.9 and higher, and includes features like per-environment hierarchies, module data, simplified custom backends, improved debugging with
puppet lookup --explain, and more.
As part of this update, we’ve moved Hiera’s documentation into the Puppet reference manual. Once you’ve upgraded to Puppet 4.9 or higher, see the following pages for more info about the new Hiera:
Note: If you are using Puppet 3 or later, you probably already have Hiera installed. You can skip these steps, and go directly to configuring Hiera.
- Hiera works on *nix and Windows systems.
- It requires Ruby 1.8.5 or later.
- To work with Puppet, it requires Puppet 2.7.x or later.
- If used with Puppet 2.7.x, it also requires the additional
hiera-puppetpackage; see below.
If you are using Hiera with Puppet, you should install it on your puppet master server(s); it is optional and unnecessary on agent nodes. (If you are using a standalone puppet apply site, every node should have Hiera.)
Step 1: Install the
hiera Package or Gem
hiera package, using Puppet or your system’s standard package tools.
Note: You may need to enable the Puppet Labs package repos first.
$ sudo puppet resource package hiera ensure=installed
If your system does not have native Hiera packages available, you may need to install it as a Rubygem.
$ sudo gem install hiera
Step 2: Install the Puppet Functions
If you are using Hiera with Puppet 2.7.x, you must also install the
hiera-puppet package on every puppet master.
$ sudo puppet resource package hiera-puppet ensure=installed
Or, on systems without native packages:
$ sudo gem install hiera-puppet
Note: Puppet 3 does not need the
hiera-puppetpackage, and may refuse to install if it is present. You can safely remove
hiera-puppetin the process of upgrading to Puppet 3.
That’s it: Hiera is installed. Next, configure Hiera with its
hiera.yaml config file.