Components of the DevKit
The Vox Pupuli developer toolkit is spread amongst many Ruby gems and other tools.
Most will be automatically pulled in via Bundler and the Gemfile, and some of the main ones will be listed at the bottom of this page for convenience.
We’ll focus on the tools that you may want to be aware of and install or use directly.
- Jig is useful for scaffolding content for new and existing modules. All content it generates includes the appropriate barebones unit tests ready for you to fill out. It can also publish modules to the Puppet Forge.
- ModuleSync helps maintain a portfolio of many modules at once.
It does this by maintaining both common static files (like contributing guides, licenses, or testing boilerplate) as well as templated files like
metadata.jsonacross multiple module repositories. This allows you to keep them all in a consistent state with minimal fuss. - VoxBox is a container that lets you run many of the developer tools without installing anything but a container runtime like Docker or Podman. See Using VoxBox in CI for how to run it locally and in GitLab pipelines.
- OnceOver is used for basic validation of your control repository.
It can sometimes be insurmountable to get proper unit testing for every single module you use, especially when most of them are maintained by others.
OnceOver will do basic
it_compilesspec tests for each of your profile classes, giving you some confidence in them. - Catalog Diff and Viewer show you differences between two catalogs. This can be used for impact analysis of upcoming code changes or infrastructure updates. You can see a quick demo of the graphical interface by choosing the “Demo 1” report.
voxpupuli-test Test Suite
When you set up the voxpupuli-test suite, this is a quick overview of the tooling that becomes accessible.
The individual pages in this guide will have more information about how to use each of them.
voxpupuli-testis the suite itself. It pulls in other tools as dependencies.rspec-puppetis the standard unit testing framework for Puppet and OpenVox. It allows you to assert certain expectations about your compiled catalog, such as whether it does or does not contain certain resources with specific parameters. Tests are written in Ruby, which allows tests to be constructed programmatically as needed.facterdbis a database of representative facts for various platforms. This will let you test your module as if it were being applied on each platform.rspec-puppet-factsusesfacterdbto loop over all supported platforms frommetadata.json.
puppet-syntaxwill syntax check Puppet manifests,.erband.epptemplates, and Hiera data files.- Linters enforce consistency in code and other files. The suite includes several types of linters.
puppet-lintlints Puppet manifests against the OpenVox Language Style Guide.voxpupuli-puppet-lint-pluginsare various plugins that enforce various optional extensions to the style guide. See the.gemspecfor a list of the enabled checks.metadata-json-lintvalidates the module’smetadata.jsonfile for maximum compatibility.rubocopis a Ruby static code checker (linter) and formatter based on the community-driven Ruby Style Guide.
openvox-stringsautomatically generates references for Puppet code and extensions.parallel_testsspeed up your tests by safely running them in parallel.puppet_fixturesmanages fixtures for your tests. Many times modules will depend on others for their functionality, and that means that dependencies need to be installed for testing. These are called fixtures.