**Not yet released.** Entered RC2 on March 24, 2014. The RC2 changes included a fix for which directories are allowed to be used in the `manifest` setting, a fix for dynamic environments that use the `manifestdir` setting, and several fixes to the future parser. (RC1: March 14.)
3.5.0 is a backward-compatible features and fixes release in the Puppet 3 series. The biggest things in this release are:
* Better support for dynamic environments
* A cleaner replacement for the classic `import nodes/*.pp` pattern
* Scriptable configuration with a new `puppet config set` command
* A new global `$facts` hash
* Early support for hashes and arrays in fact values
* Improvements to the future parser
* Support for RHEL 7, Ruby 2.1, and Facter 2.0
...along with the usual flurry of smaller improvements and bug fixes.
### Dynamic Environments
Lots of people have been using dynamic temporary environments based on VCS checkouts to test and roll out their Puppet code, as described in this classic blog post (
http://puppetlabs.com/blog/git-workflow-and-puppet-environments). This pattern is great, but it pretty much works by accident, so we wanted a better way to support it.
Now we have one! The short version is:
* Create a `$confdir/environments` directory on your puppet master.
* Each new environment is a subdirectory of that directory. The name of the directory will become the name of the environment.
* Each environment dir contains a `modules` directory and a `manifests` directory.
* The `modules` directory will get stuck in front of the `modulepath`.
* The `manifests` directory will be used as the `manifest` setting (see "Auto-Import" below).
* No other configuration is needed. Puppet will automatically discover environments.
So basically, you do a `git clone` or `git-new-workdir` in your `environments` directory, and nodes can immediately start requesting catalogs in that environment.
This feature isn't _quite_ finished yet: it's missing the ability to set the `config_version` setting per-environment, which is something we're hoping to add in 3.6. But depending on what you're doing, it's probably good enough to start using today.
Related issues:
### Auto-Import (Use a Directory as Main Manifest)
You can now set the `manifest` setting to a **directory** instead of a single file. (E.g. `manifest = $confdir/manifests`) If you do, the puppet master will parse every `.pp` file in that directory in alphabetical order (without descending into subdirectories) and use the whole set as the site manifest. Similarly, you can give puppet apply a directory as its argument, and it'll do the same thing.
We did this because:
* `import` is horrible...
* ...but the `import nodes/*.pp` pattern is good.
Lots of people like to use and keep every node in a separate file. In Puppet 3.4 and earlier, this meant putting an `import` statement in puppet.conf and storing the node files in another directory. Now, you can just put all your nodes in the main manifest dir and point the `manifest` setting at it.
And since this was the last real reason to use `import`, we can deprecate it now! (See "Deprecations and Removals" below.)
Related issues:
### Scriptable Configuration (`puppet config set`)
You can now change Puppet's settings without parsing the config file, using the `puppet config set` command. This is mostly useful for configuring Puppet as part of your provisioning process, but can be convenient for one-off changes as well.
Related issues:
### Global `$facts` Hash
You have to manually enable this (along with the `$trusted` hash) by on your puppet master(s). It'll be on by default in Puppet 4.
In addition to using `$fact_name`, you can now use `$facts[fact_name]` to get a fact value. The `$facts` hash is protected and can't be overridden locally, so you won't need the `$::` idiom when using this.
Our hope is that this will visibly distinguish facts from normal variables, make Puppet code more readable, and eventually clean up the global variable namespace. (That'll take a while, though --- we probably won't be able to disable `$fact_name` until, like, Puppet 5.)
Related issues:
### Structured Facts (Early Version)
You have to manually enable this by setting `stringify_facts = false` in puppet.conf on your puppet master(s). It'll be enabled by default in Puppet 4.
In Facter 2.0 and later, fact values can be any data type, including hashes, arrays, and booleans. (This is a change from Facter 1.7, where facts could only be strings.) If you enable structured facts in Puppet, you can do more cool stuff in your manifests and templates with any facts that use this new feature.
These are the early days of structured facts support --- they work in Puppet and Facter now, but none of the built-in facts use data structures yet, and external systems like PuppetDB haven't yet been updated to take advantage of them. (Any structured facts will still get smooshed into strings when they're sent to PuppetDB.) But if you have a use for hashes or arrays in your custom facts, turn this on and give it a try.
### Future Parser is Faster and Better
We think the future parser is fast enough to use in a large environment now --- we haven't done extensive benchmarking with real-life manifests, but the testing we've done suggests it's about on par with the default parser. So if you've been waiting to try it out, give it a spin and let us know how it goes.
It also has some new tricks in this release:
* HEREDOCs are now allowed! This is a much more convenient way to handle large strings.
* A new template language was added, based on the Puppet language instead of on Ruby.
* There's a new "future" evaluator that goes along with the future parser.
Related issues:
### Platform Support Updates
Newly supported:
* Puppet now supports RHEL 7, with packages and acceptance testing. This mostly involved cleaning up resource providers to handle things like systemd more cleanly.
* We're running acceptance tests on Fedora 19 and 20, now, too.
* Facter 2.0.1 works with Puppet 3.5, including its new structured facts support (see above).
* We have _early_ support for Ruby 2.1. We're running spec tests on it, so we think it works fine! But since none of our testing platforms ship with it, we aren't running acceptance tests on it, which means there might be problems we don't know about yet.
Newly abandoned:
* Support for Fedora 18 is done, since it EOL-ed in January; no more acceptance tests or packages.
* Facter 1.6 is no longer supported with Puppet 3.5.
Related issues:
### Smaller New Features
In addition to the big-ticket improvements above, we added a lot of smaller features.
Misc features:
* Pluginsync can now sync external facts to agent nodes! This requires Facter 2.0.1 or later. (At the time of RC1, Facter 2.0.1 was still in RC.)
* Certificate extensions will now appear in the `$trusted` hash.
* There's a new `strict_variables` setting; if set to true, it will throw parse errors when accessing undeclared variables. Right now, this will wreak havoc; eventually, it will make Puppet code easier to debug.
* Related to the last: The `defined` function can now test whether a variable is defined. Note that you have to _single-quote_ the variable name, like this: `defined('$my_var')` --- otherwise, the function will receive the _value_ of the variable instead of its _name._ Anyway, going forward, this will be a more accurate way to distinguish between `false`, `undef`, and uninitialized variables, especially if you're using `strict_variables = true`.
* The `http` report processor can use basic auth now when forwarding reports.
* Puppet apply now has a `--test` option that acts much like puppet agent's `--test`.
* On Windows, the puppet agent service will now log activity using the Windows Event Log instead of a logfile.
* Environment and transaction UUID information is now included when submitting facts to PuppetDB. (This will be used in a future version of PuppetDB.)
Type and provider features:
* The `ssh_authorized_key` type can use ssh-ed25519 keys now.
* When `service` resources fail to start or restart, they'll log the exit code, stdin, and stderr text as Puppet errors to help with debugging.
* The `rpm` package provider now accepts virtual packages.
* The `rpm` package provider now supports `uninstall_options`.
* The `package` type has a new `package_settings` attribute. This is a property that can be implemented differently per-provider; currently nothing uses it, but there are plans to make the FreeBSD provider use it for port options.
* The `user` type now validates the `shell` attribute, to make sure it actually exists and is executable.
* You can now use msgpack as the on-disk cache format for some of Puppet's generated data types.
* The `file` type has a new `validate_cmd` attribute that can help protect against accidentally writing broken config files.
* The `resources` type has a new `unless_uid` attribute that acts like an improved version of the `unless_system_user` attribute --- it lets you protect multiple UIDs and ranges of UIDs from deletion when purging `user` resources.
* You can now purge unmanaged `cron` resources with the `resources` type.
Features for extension writers:
* The Puppet::Util::Profiler#profile API is now public, and can be used by extensions like indirector termini and report handlers.
* There's a new v2.0 HTTP API, which doesn't have to abide by the (sometimes inconsistent and weird) semantics of the main API. Right now, the only v2.0 endpoint is for getting information about environments via the API. See the developer documentation for details.
Related issues:
### Deprecations and Removals
As we start to get ready for Puppet 4, we're deprecating some features we're hoping to remove or replace. (Be ready for more of these in Puppet 3.6, too.) Using deprecated features will cause warnings to be logged on the puppet master; these features will be removed in Puppet 4.
Deprecations in the Puppet language:
* The `import` keyword is deprecated. Instead of importing, you should set your `manifest` setting to a directory of .pp files.
* Modifying arrays and hashes in Puppet code or templates is deprecated. (This actually should never have been possible, but we can't kill it in a minor version because it might break something.)
Deprecations in the type and provider API:
* Using the `:parent` option when creating a type is deprecated. This actually hasn't worked for a long while, but now it will warn you that it won't do anything.
Removals:
* The experimental bindings-based Hiera2/data-in-modules code has been removed. We're back to the drawing board on this.
Related issues:
### Performance Improvements
3.5 is faster! We found a situation where defined types were a lot slower than they needed to be, some slow cases in `puppet cert list` and the module tool, and a few other performance wins.
Related issues:
### Bug Fixes and Clean-Ups
We fixed a bunch of bugs in types and providers (including a big cleanup of the yumrepo type), improved standards-compliance in our use of certificates, fixed a bunch of Windows-specific problems, cleaned up some inconsistencies, and fixed some bugs that don't fit in any particular bucket.
Type and provider bugs:
Windows-related bugs:
Standards compliance improvements:
Clean-ups:
General bugs:
Bugs discovered during the RC period:
### All Resolved Issues for 3.5.0
### Contributors
Andrew Parker, Erik Dalén, Henrik Lindberg, Josh Partlow, Ken Barber
### Contributions
Andrew Parker (3):
680cdf6 (PUP-1210) Error if missing password info on OSX 10.8
bcea068 (PUP-1210) Provide clear guidance on OSX passwords
571b446 (maint) Check for files by full name
Erik Dalén (1):
1ea8384 (PUP-1962) Fix class relationships
Henrik Lindberg (5):
6b7640b (PUP-1973) Fix getting scope vars to template for inherited scope
dc41d16 (PUP-1279) Make Class[::p] remove the ::
92ae79c (PUP-1978) Fix issues with [] operator error reporting
0172475 (PUP-1944) Fix issue with manifest being a directory when initializing
9c8e515 (PUP-2017) Change TupleType size to mean total number of entries
Josh Partlow (1):
e56d2df (PUP-2009) Lookup environment from settings in interpolation
Ken Barber (2):
ea1a04b PUP-1975 Add environment information to facts save during compilation
593f8bf PUP-1975 Include transaction_uuid in facts terminus save during compilation
--
Ryan McKern
Release Engineer, Puppet Labs
Register now and save $350!