Puppet 5 Platform has been released: What’s new and noteworthy
© Shutterstock / Brown
Puppet 5 Platform comes bearing gifts: In addition to the new features, this release also contains some substantial performance boosts. Let’s have a look at the new features, enhancements and deprecations.
Puppet 5 Platform is here. According to Eric Sorenson, director of product management at Puppet, the primary goals of this release are the following:
- To standardize the version numbering of all the major Puppet components (Puppet Agent, PuppetDB, Puppet Server) to 5, as a first step towards delivering these components as a unified platform.
- To include Hiera 5 with eyaml as a built-in capability.
- To provide clean UTF-8 support.
- To move network communications to fast, interoperable JSON.
Puppet 5 Platform: The making
If these goals seem familiar, here’s why: Sorenson and Ryan Coleman, director of product management for Enterprise at Puppet, wrote in a blog post in mid-May that conversations with customers and community and the input they received from the puppet-dev mailing list community helped them define a few patterns:
- The version numbering we’d landed on was extremely confusing. To get Puppet 4, you needed the right combination of puppet-server-2.x and puppet-agent-1.x, and…
- It wasn’t clear exactly which combination you needed in order to get a working installation, nor where the components should come from.
- The guarantee of a new Puppet Collection on each major version boundary didn’t make a lot of sense, given that both Facter 3 and PuppetDB 3 rolled into PC1 without a fuss.
The patterns led to the goals presented in the most recent blog post and in the piece written a couple of months ago.
According to Sorenson and Coleman, the prime directive of Puppet 5 is the following:
Modules that work on Puppet 4 will work unchanged under Puppet 5.
call(name, args...) has been added to allow calling a function by name.
unique is now available directly in Puppet. It no longer requires the
stdlib module to be included. The new version of the function also handles
Iterable data types. It is now also possible to give a code block that determines if the uniqueness is computed.
Puppet Server request metrics available
Puppet Server 5 includes an http-client metric
puppetlabs.<localhost>.http-client.experimental.with-metric-id.puppet.report.http.full-response that tracks how long requests from Puppet Server to a configured HTTP report processor take (during handling of /puppet/v3/reports requests, if the HTTP report processor is configured).
Switched from PSON to JSON as default
In Puppet 5, agents download node information, catalogs, and file metadata in JSON (instead of PSON) by default. By moving to JSON, Puppet ensures maximum interoperability with other languages and tools. Users will notice better performance, especially when the master is parsing JSON facts and reports from agents. The Puppet master can now also accept JSON-encoded facts.
Puppet now uses Ruby 2.4, which ships in the
puppet-agent package. After you upgrade to Puppet agent 5.0, make sure to reinstall user-installed Puppet agent gems —reinstallation is necessary due to Ruby API changes between Ruby 2.1 and 2.4, any user-installed Puppet agent gems (Ruby gems installed using Puppet agent’s gem binary)—. Furthermore, some gems may also require upgrade to versions that are compatible with Ruby 2.4.
HOCON gem is now a dependency
The HOCON gem [previously shipped in
puppet-agent packages] is also now a dependency of the Puppet gem.
Warnings can be silenced from metadata.json
Warnings from faulty metadata.json can now be turned off by setting
You can use Portage with Puppet
The Portage package manager is now installable and uninstallable.
Updated Puppet Module Tool’s dependencies
Puppet Module Tool’s gem dependencies are updated to use
puppetlabs_spec_helper 1.2.0 or later (which runs
metadata-json-lint as part of the
validate rake task).
Hiera 5 default file
Hiera 5 compliant default files go in your
- New installs: Pupppet creates appropriate v5 hiera.yaml in $confdir and $environment
- On upgrade: If Puppet detects a hiera.yaml in either
$environment, it won’t install a new file in either location, or remove
Head on over to the Puppet 5.0 release notes to see the complete list of enhancements and removals.
external_factsfeature has been deprecated. The version of Facter Puppet depends on now always includes this functionality.
- The experimental “data in environments and modules” support implementation has been deprecated in favor of Hiera version 5. Implementors of custom experimental data providers using the experimental “version 4” should migrate their implementations as soon as possible because there is no guarantee that the experimental APIs will continue to work. Users of the hiera.yaml version 4 format, and the built in data providers for JSON and YAML, as well as the
data()function can migrate at their own pace as those features are deprecated but still supported.
- The keywords
producesthat were earlier opt-in via the
app_managementsetting are now always keywords. The
app_managementsetting is now also deprecated, but will remain as a setting without any effect until a future Puppet release. This means that Puppet will always be enabled for application management without the earlier required opt-in.
- The system now behaves as if the setting
--trusted_server_factsis always set to true, and the setting itself is deprecated but is still present; this is to avoid errors if you already had set it to true (which is now the default). The setting will be removed in a future major version update, and before then any use of the setting
trusted_server_factsshould have been removed.
Sorenson also revealed a few performance boosts [and gave Doug Rosser, Senior Performance Engineer at Puppet a shout-out]:
- Puppet 5 agent run times were 30 percent lower at equivalent loads. (from an average of 8 seconds to 5.5 seconds.)
- Puppet 5 server CPU utilization was at least 20 percent lower than Puppet 4 in all scenarios.
- CPU utilization for Puppet 5 PuppetDB and PostgreSQL were also lower in all scenarios.
- Puppet 5 catalog compile times reported by Puppet Server were 7 to 10 percent lower than Puppet 4.
- Puppet 5 was able to scale to 40 percent more agents with no deterioration in runtime performance. For comparison, Puppet 4 agent run times became dangerously long when scaled to the same number of agents.
The Puppet 5 Platform is available for download. This release should be incorporated into the next Puppet Enterprise release in autumn 2017.