2. The shortest path to better
modules
• Ramp up your development
environment faster
• Easily get started with best
practices
• Shift left on finding and fixing issues
3. Better experience
• One package installs tools and a
Ruby environment
• Unified CLI for key tools
• Native Windows, OS X and Linux
workstation user experience
4. Better modules
• Improved module skeleton with unit
tests
• Git, Appveyor, Travis and more pre-
configured
• Syntax checking, linting, and unit
testing
6. Building modules with PDK
● Generate new resources
○ class
○ defined_type
○ task
● New resources have basic tests generated for them
● Use PDK to validate and test the new code you write
● Develop everywhere.
PDK provides a consistent development ecosystem for
developers to get the same validation and testing on various
platforms.
7. Introduced in PDK 1.5
● Support for multiple versions of
Puppet
○ Select Puppet version to validate
and test against
○ Informs users of mismatched
PDK version compatibility, and
steps to correct.
8. New Command Flags
--pe-version and --puppet-version
● Applicable to `validate` and `test unit` sub-commands.
● Defaults to the latest puppet gem version available in the PDK package that
your module supports.
● Matches input to the closest match available.
○ e.g. If user inputs “5.5.3”, and PDK only has 5.5.0 in the package, then
PDK use version 5.5.0 and inform the user of the approximate match.
The same applies to PE versions: “2017.3.2” might resolve to 2017.3.5
○ Specifying an invalid/nonexistent version will result in an error
9. Preparing Your Module for Puppet Upgrades
Practical usage of PDK’s Puppet version options:
● Test and validate your module against the version of Puppet or PE you are
currently on.
● Verify that all validations and unit tests pass.
● Test and validate your module against the version of Puppet or PE you want
to upgrade to.
● Verify that all validations and unit tests pass.
● Update metadata.json to add support for the new version of Puppet!
10. Example Case Study
● Run validations and tests
● A module that supports Puppet 4.x
11. Example Case Study (Cont.)
● Validate and Test against the Puppet version you want to update to.
● Once everything checks out, you can update metadata.json
● Default Puppet version for pdk test/validate will now be against latest
Puppet 5.
12. What’s new in PDK 1.7?
● --puppet-dev flag:
○ New option for `validate` and
`test unit` to use Puppet from
source
○ Requires internet access to
https://github.com
○ Use this feature to test your
module against unreleased
versions of Puppet!
14. Join the process!
● New pdk-planning repo
○ Community-driven design process
○ https://github.com/puppetlabs/pdk-planning
○ View and provide feedback on proposed
features and design documents.
○ Propose/request new features with your
own implementation ideas and
requirements.