Table of contents
1.
🤔Introduction
2.
🌐Installing Puppet Development Kit
2.1.
📜Install Puppet Development Kit on Windows
2.1.1.
⚙️Installing with Chocolatey
2.1.2.
⚙️Download and Install the Package
2.1.3.
⚙️Add the Puppet Development Kit module to Powershell
2.2.
📜Installing Puppet Development Kit on Ubuntu
2.2.1.
⚙️For Ubuntu 18.04
2.2.2.
⚙️For Ubuntu 20.04
3.
🌐Upgrading Puppet Development Kit
3.1.
📜Update a Module with Template Changes
4.
🌐Creating Modules
4.1.
📜Create a Module
5.
🌐Converting Modules
5.1.
📜Convert a Module
6.
Frequently Asked Questions
6.1.
What is Puppet Development Kit?
6.2.
What is a puppet agent?
6.3.
What is PDK Linux?
6.4.
What is a module in Puppet?
6.5.
How do puppet manifests work?
7.
Conclusion
Last Updated: Aug 13, 2025
Medium

Overview of Puppet Development Kit

Author Mayank Goyal
0 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

🤔Introduction

The Puppet Development Kit (PDK) provides a simple and consistent interface to a set of useful tools for everyone who develops or consumes Puppet code. Puppet Development Kit made it simpler than ever to design and test Puppet modules. In this article, we will study various aspects related to Puppet Development Kit.

Puppet Development Kit

🌐Installing Puppet Development Kit

Before installing PDK, ensure your system and language versions meet the requirements. PDK supports Puppet 4 or later. 

Only modules generated or converted using PDK are supported for PDK functions like class creation, testing, and validation.

In this article, I will walk you through the installation process of windows and ubuntu. You can review this documentation for your system.

📜Install Puppet Development Kit on Windows

We can install PDK on windows using downloading and installing packages or using chocolatey, a package manager for windows.

⚙️Installing with Chocolatey

Firstly download chocolatey to your system if you haven't. Then follow the below steps to install Puppet.

Run choco install PDK to install PDK.

Open a PowerShell window to re-source your profile and make PDK available to your PATH.

🚨PDK loads automatically on PowerShell 4.0 and subsequent versions, and pdk commands are available at the prompt. You must add the PowerShell module to your profile in PowerShell 2.0 or 3.0.

⭐Note: Run choco upgrade pdk to upgrade to the most recent package.

⚙️Download and Install the Package

Download the package from the PDK download site.

⏩Open a new PowerShell window to re-source your profile and make PDK available to your PATH.

⚙️Add the Puppet Development Kit module to Powershell

If you are using Powershell version 2.0 or 3.0, the PDK module doesn't load automatically, so we do it manually.

Add the below module to the PowerShell profile:

`Import-Module-Name "$($env:ProgramFiles)\WindowsPowerShell\Modules\PuppetDevelopmentKit"`


Open a new PowerShell window to re-source your profile and make PDK available to your PATH.

After adding the module, PDK will automatically load when you open PowerShell.

📜Installing Puppet Development Kit on Ubuntu

🎯Install PDK with the help of APT Package Manager.

🎯Download and install the software and its dependencies. Use the below command appropriate to your system.

⚙️For Ubuntu 18.04

wget https://apt.puppet.com/puppet-tools-release-bionic.deb
sudo dpkg -i puppet-tools-release-bionic.deb
sudo apt-get update
sudo apt-get install pdk


⚙️For Ubuntu 20.04

wget https://apt.puppet.com/puppet-tools-release-focal.deb
sudo dpkg -i puppet-tools-release-focal.deb
sudo apt-get update
sudo apt-get install pdk


Now, open a new terminal to re-source your profile and make PDK available to your PATH.

To upgrade your PDK module, run the following command:

sudo apt-get update
sudo apt-get install pdk


After installing, you might want to upgrade PDK to the latest version to get new features, improvements, fixes, etc. So, let's see how to upgrade our PDK version.

🌐Upgrading Puppet Development Kit

Use the same procedure you did to install PDK when upgrading it. Then, update your modules to incorporate any modifications to the module template.

📜Update a Module with Template Changes

Update your module to keep it current with PDK or custom module template changes. 

Based on the template you used to generate or convert your module, the pdk update function changes your module. PDK updates your module to reflect those changes if that template has undergone modifications.

👉To check for template changes without making any modifications run the following command:

Run update with the --noop option.


This "noop" option executes the command in "no operation" mode, which displays the proposed modifications but doesn't carry them out.

👉Now, coming to the important part, follow the below steps to update a module:

Change into the module's directory with cd <MODULE_NAME> with the command line interface.

👉Run the below update command:

pdk update


👉If any module metadata is missing, interact with PDK prompts to provide metadata information.

👉Confirm the change summary PDK displays and either continue or cancel the update. 

PDK creates a thorough change report, update report.txt, in the top directory of the module whether you approve or reject modifications. Each time you issue the update command, this report is updated.

Note: PDK updates the module with the reported changes if approved.

So far, we have seen how to install and update modules in PDK, but how to create one? In the further article, I will walk you through creating a module.

🌐Creating Modules

The Puppet Development Kit creates classes, defined types, and tasks in your module and generates a brand-new module that includes all necessary metadata. It also creates the infrastructure needed to test and validate your module.

PDK prompts you with several questions to establish the metadata for your module. If you choose to skip a question, PDK will use the default response for that question. Your responses to these inquiries are recorded and utilized as the new defaults for subsequently created modules. Optionally, you can use the default responses for all metadata and omit the interview process.

With command line parameters, you can override the default template used by PDK to produce the empty module. 

Note: Before you add classes or new code to a module you've already created, validate and test it first. You can use this to check if the module files and directories were produced properly.

By executing pdk commands after the module has been validated, you can add classes, defined types, and tasks to your module.

The manifest and test file templates are created for the class or defined by the new class and defined type commands.

📜Create a Module

The pdk new module command generates a default module skeleton and testing templates.

👉Run the new module command using the module's name as a parameter from the command line: pdk new module <MODULE_NAME>

👉Add the skip-interview flag to the command: pdk new module <MODULE_NAME> --skip-interview. This will optionally bypass the interview questions and create the module with default metadata settings.

👉Answer the dialog questions. Each question indicates the default value it will use if you press Enter. 

Some of the dialog questions are:

✍️Forge username

✍️Version

✍️Author

✍️License

✍️Operating System Support

✍️Description

✍️Source code repository

✍️Where others can learn more

✍️Where others can report issues

In the end, confirm or cancel the module creation.

Note: Make sure the PDK package is installed. Ensure that the appropriate environment variables are added if you are running PDK behind a proxy. Details can be found in the instructions for running PDK behind a proxy.

After creating a module, we can create a class, a defined type, and a task. 

To create a class, run the following command:

pdk new class <CLASS_NAME>


To create a defined-type run the following command:

pdk new defined_type <DEFINED_TYPE_NAME>


To create a task, run the following command:

pdk new task <TASK_NAME>


After following the above, we can create our custom modules. But how to convert our custom modules into standardized ones? Well, let's look into that.

🌐Converting Modules

An existing module can be transformed into a standardized Puppet Development Kit module with a testing infrastructure. This enables you to use your module with all of PDK's features.

When you convert a module, PDK modifies it per a predefined module template. The PDK utilizes this template every time it does a new module.

If your module already contains a metadata.json file, it is combined with the module template's default metadata data. PDK conducts an interview and creates the module's metadata if the metadata is missing.

After that, Puppet Development Kit shows you a list of the files that will change during conversion and asks if you want to go on or stop it. In either case, PDK creates a thorough change report, converts report.txt, and places it in the module's top directory. Every time you use the convert command, a newer version of this report is created.

📜Convert a Module

👉Run the pdk convert command to convert the current module into a PDK-compatible module.

Follow the below steps to convert a module:

🚨Change the module's directory using the command line's <MODULE_NAME>.

🚨Run pdk convert.

🚨Answer PDK metadata interview prompts to supply metadata information if the present module lacks a metadata.json file.

🚨View the modifications. The decision to continue or stop the conversion is one that PDK is about to make. A thorough change report is available in convert report.txt in the module's root folder.

That way, we can create a module and convert it into a standardized one. 

That's all from the overview of the PDK tool. I hope you all got a basic grasp of PDK. You can refer to the documentation here for more thorough information.

Frequently Asked Questions

What is Puppet Development Kit?

The Puppet Development Kit (PDK) offers a straightforward, consistent interface to a set of useful tools for everyone who produces or consumes Puppet code, making it simpler than ever to design and test Puppet modules.

What is a puppet agent?

The program that controls the configurations on your nodes is called a puppet agent. A Puppet primary server is required to retrieve configuration catalogs. You can administer systems using Puppet agent as a service, cron job, or on-demand according to your infrastructure and requirements.

What is PDK Linux?

You can install a single package containing all the tools you need to generate and validate new modules by installing the Puppet Creation Kit (PDK), which comprises essential Puppet code development and testing tools for Linux, Windows, and OS X workstations.

What is a module in Puppet?

Puppet modules are a grouping of data and manifests, which may comprise information, files, and templates. Modules allow you to organize and reuse Puppet code by dividing the code into various manifests. The main site is the exception.

How do puppet manifests work?

All Ruby-coded applications with the .pp file extensions are manifest in the Puppet programming language. All Puppet programs developed to generate or administer any target host machine are collectively referred to as manifests.

Conclusion

In this article, we have a detailed overview of the Puppet Development Kit. We learned many aspects of the Puppet Development Kit, like installing and upgrading Puppet Development Kit. That's it from the article. I hope you all like it.

Also, you can check our courses and test series for your interview preparations: Coding Ninja Test SeriesCoding QuestionsInterview Preparation ResourcesCoding ContestsProduct-based Company Course, Data Science & ML courseMaster Data Analytics, and ML for beginners. You can also refer to other IT subjects like compiler design and software engineering

Happy Learning!

Live masterclass