Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6 - 15 August 2018

190 views

Published on

Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6 - 15 August 2018

Published in: Technology
  • Be the first to comment

Virtual Puppet User Group: Puppet Development Kit (PDK) and Puppet Platform 6 - 15 August 2018

  1. 1. Upgrade Testing with PDK Multi-Puppet Support
  2. 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. 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. 4. Better modules • Improved module skeleton with unit tests • Git, Appveyor, Travis and more pre- configured • Syntax checking, linting, and unit testing
  5. 5. Better tools Unit testing tools: • rspec-puppet • rspec-puppet-facts • puppetlabs_spec_helper Static code quality tools: • puppet-syntax • puppet-lint • metadata-json-lint • rubocop plus rules
  6. 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. 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. 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. 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. 10. Example Case Study ● Run validations and tests ● A module that supports Puppet 4.x
  11. 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. 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!
  13. 13. Example Usage ● Validate and Test against the Puppet from source:
  14. 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.
  15. 15. Review Design Proposals
  16. 16. Q&A

×