@@@ Console nochrome
$ puppet module generate author-modulename --skip-interview
$ cd modulename
...Lots of editing...
@@@ Console nochrome
$ puppet module build
...Upload to Forge...
- Module skeleton quality varied wildly.
- Often easier to create everything from scratch.
- The skeleton was only used as an initial template.
puppet module generate
was deprecated in Puppet 5.4.0.
@@@ Console nochrome
$ pdk new module author-modulename
$ cd modulename
$ pdk new class modulename
...Lots of editing...
@@@ Console nochrome
$ pdk validate
$ pdk test unit
$ pdk build
...Upload to Forge...
- Generated code follows best practices.
pdk new class classname
creates manifests/classname.pp and spec/classes/classname_spec.rb.- Testing out of the box!
- The default templates (https://github.com/puppetlabs/pdk-templates) include lots of goodies:
- CI configurations for Travis CI, GitLab CI/CD, and AppVeyor
- operatingsystem_support and requirements in metadata.json
- Git configuration (.gitignore, .gitattributes)
- Puppet Strings in generated code
- Updates to the templates can be applied to (some files in) the module.
- Interaction with Ruby tooling (
bundle
,rake
) is not required. - Did I mention that
puppet module generate
was deprecated in Puppet 5.4.0?
@@@ Console nochrome
$ pdk new module mynewmodule
(Or you can skip the interview...)
@@@ Console nochrome
$ pdk new module mynewmodule --skip-interview
@@@ Console nochrome
$ pdk convert
(Note that this does not add tests for existing classes, defined types, etc.)
@@@ Console nochrome
$ pdk update
@@@ Console nochrome
$ pdk new class classname
@@@ Console nochrome
$ pdk new defined_type typename
@@@ Console nochrome
$ pdk new task taskname