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.

PuppetConf 2017: Puppet Development Kit: A Seamless Workflow for Module Development and Testing- Bryan Jen & Jesse Scott, Puppet


Published on

For too long, creating and testing a new module required you to go find and learn tools and techniques on your own. Today the new Puppet Development Kit (PDK) gives you tools and workflows to make module creation, testing and maintenance easier. In this talk, you'll learn about the tools PDK provides, module development and testing workflow and where we’re headed next with the PDK. After the talk you'll have a prescriptive path for: * How to start new module development * How to move existing modules to the SDK workflow * Which tools are provided, how they provide value * Where to start with testing your modules

Published in: Technology
  • Login to see the comments

  • Be the first to like this

PuppetConf 2017: Puppet Development Kit: A Seamless Workflow for Module Development and Testing- Bryan Jen & Jesse Scott, Puppet

  1. 1. Develop & Test Code Easily with the Puppet Development Kit Bryan Jen Sr. Software Engineer Jesse Scott Sr. Software Engineer
  2. 2. Puppet Developer Experience Team Charter Growing the depth and breadth of the Puppet ecosystem by making it easier for partners and contributors to create high quality content while making it easier for users to adopt content and ensure that the infrastructure they manage is fully configured and ready to work.
  3. 3. What is the PDK?
  4. 4. The shortest path to better modules • One package installs tools and a Ruby environment • Unified CLI for key tools • Native Windows, macOS, and Linux workstation user experience
  5. 5. Why use the PDK?
  6. 6. Better experience • Ramp up your development environment faster • Easily get started with best practices • Shift left on finding and fixing issues
  7. 7. Better modules • Improved module skeleton with unit tests • Git, Appveyor, Travis, and more pre-configured • Syntax checking, linting, and unit testing • Puppet tasks support
  8. 8. 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
  9. 9. Who should use the PDK?
  10. 10. Everyone! • Super awesome for new Puppet users and developers • Also great for existing developers who want to get started with validating and testing their modules • More features coming to help PDK “adopt” existing modules
  11. 11. Demo Time
  12. 12. • Start with a fresh clone of your module • Check your Gemfile compatibility and make appropriate changes. • Copy the ‘.rubocop.yml’ file from the pdk-module-template into your module root ( • Run ‘pdk validate’, so that PDK can resolve and install missing gem dependencies into its cache • The fun part: Fix all of the lint errors and warnings! Adapting your modules to PDK
  13. 13. Demo Time
  14. 14. • Machine readable output formatting is available via ‘--format junit’ • Can output text to stdout and junit to a file in the same run • Reliable exit codes on validation and unit test runs Using PDK in CI
  15. 15. ● Use cases: ○ Changes to template files ○ Including additional files ● PDK offers the ability to generate modules or resources using custom templates ○ Fork the pdk-module-template ○ Make the desired modifications to the template ○ Run pdk with the ‘--template-url’ flag ○ Keep track of the main puppetlabs repo for changes! Custom Module Templates
  16. 16. What’s Next? ● Make PDK supported with PE license ● Workflow for adapting existing modules to be PDK compatible ● Improved workflows for using PDK for unit testing in CI/CD pipelines ● Packaging improvements ■ Native package management ■ Relocatable and non-admin installable ■ Additional platforms
  17. 17. Contact Us! Jesse Scott Email: Twitter: @scotje Bryan Jen Email: Twitter: @wowsuchbryan PDK Team: Slack: #forge-modules
  18. 18. More Info and Q&A Download the PDK: Documentation: Project Repo: Module Template: