Skip to content

Module Development Tooling

For years, the standard tool for developing and testing Puppet modules was the Puppet Development Kit (PDK). After PDK moved to a closed-source model, the Vox Pupuli community built open replacements. This course uses two complementary tools:

  • jig — a Go-based reimplementation of PDK. It ships as a single static binary with no Ruby runtime and handles scaffolding modules, creating module components, validating style and syntax, running unit tests, and building/releasing modules.
  • voxbox — a container image bundling the full Vox Pupuli testing toolchain (OpenVox, OpenFact, hiera-eyaml, r10k, rubocop, voxpupuli-test, voxpupuli-acceptance, and more). Its entrypoint is rake, so it runs a module's complete test suite via Podman or Docker without installing any Ruby gems locally.

Use jig for day-to-day scaffolding and quick checks; reach for voxbox when you want the full test matrix (including acceptance tests) in a reproducible environment, especially in CI.

Installing the tools

jig is distributed as a static binary — download a release from the jig repository, or build it from source with Go. Because it has no runtime dependencies, you can drop the binary anywhere on your PATH.

voxbox requires only Podman or Docker; the image is pulled automatically the first time you run it:

$ podman pull ghcr.io/voxpupuli/voxbox:8

Using jig

Create a new module (the --skip-interview flag accepts defaults non-interactively):

$ jig new module mynewmodule --skip-interview

Create a new class within a module:

$ jig new class classname

jig can scaffold the other module components too — jig new defined_type, jig new task, jig new fact, jig new function, and jig new provider — all of which you will use later in this course.

Using voxbox

From inside a module directory, mount it into voxbox and call any rake task. List the available tasks:

$ podman run -it --rm -v $PWD:/repo:Z ghcr.io/voxpupuli/voxbox:8

Run the unit tests (rspec-puppet):

$ podman run -it --rm -v $PWD:/repo:Z ghcr.io/voxpupuli/voxbox:8 spec

Substitute docker for podman if that's what you have, and drop the :Z SELinux label on systems without SELinux.