homebloggeppetto 4 2 improved editing module validation and more

Geppetto 4.2: Improved Editing, Module Validation and More

This week, Puppet Labs released a new version of Geppetto. We had five main objectives for this release:

  1. Make Geppetto aware of all recent changes to the metadata.json and the deprecation of the Modulefile.
  2. Replace the forms-driven module metadata editor with a text-based one that will assist in editing of the metadata.json file.
  3. Improved module validation.
  4. Several improvements to the user interface.
  5. Make Geppetto compatible with the new release of Eclipse (Luna, A.K.A. version 4.4).

Module metadata

The Puppet Forge and the Puppet Module Tool (PMT) have undergone a series of changes since Geppetto was last released. These changes are incorporated in Geppetto 4.2.

Modulefile deprecated

As of Puppet 3.6, the Modulefile has been deprecated in favor of the metadata.json file. This change will normally not require any action from the user. Geppetto still supports the Modulefile but will henceforth ignore it once a metadata.json file is present, and the generation takes place automatically.

Geppetto will adjust existing modules using the following rules:

  • If the Modulefile is present and the metadata.json file is missing, then Geppetto will revert to the old behavior of generating the metadata.json file from the Modulefile and notify the user. The new "Deprecated Modulefile is used" notification preference associated with this behavior is set to “warning” by default, but the user can change this to either “ignore” (not recommended) or “error.”
  • The Modulefile is ignored when both the Modulefile and the metadata.json file exist. The new "Deprecated Modulefile Exists" notification preference is set to “ignore” by default.
  • The case when a metadata.json is present and there is no Modulefile is considered normal.

The metadata.json file is no longer a derived artifact. This is regardless of which rule applies. Once generated, it will not be regenerated unless it’s removed. Users are encouraged to drop the Modulefile and always use the metadata.json file instead. If both files exist, then make sure the metadata.json file is up to date before dropping the Modulefile.

metadata.json changes

Geppetto is now aware of the following new metadata.json attributes:

  • requirements
  • operatingsystem_support
  • tags

The following attributes have been deprecated:

  • types
  • checksums (will be generated into separate checksums.json file during publish)
  • description (use “summary” instead)

New metadata.json editor

The forms-based Modulefile editor has been replaced by a text-based editor for the metadata.json file. This editor will assist the user in several ways with features like syntax coloring, tooltips, autocompletion, dependency lookups, quick fixes and formatting. In other words, the experience is very similar to working with the Puppet manifest editor: Colors, fonts, and notifications from the editor are all configurable, using preference settings.

Module validation

A new validation builder in Geppetto 4.2 greatly improves the validation of modules. This builder will detect presence of unknown and deprecated attributes. It will also detect whether any attributes required to publish the module to the Puppet Forge are missing. The validation builder also performs dependency checks, and will detect missing dependencies and circular dependencies.

All notifications issued by the new builder can be configured (Ignore, Warning, Error) using preference settings.

The new editor is integrated with the validation builder, and clicking on markers in the Problems view will immediately take the user to the correct file, and to the line where the problem is.

Improvements to the user interface

Menu changes

In Geppetto, you can create a new project from existing material, or create it from scratch. In order to better distinguish between the two, and also to follow standard Eclipse semantics, the former is now named "Import" and the latter is named "New." Consequently, you will now find the "Import Modules from Forge" wizard under the "Import..." menu choice.

Some top-level choices were removed, since they could be found under the Puppet submenu anyway. We made this change because having the choices as top-level items was considered too intrusive when installing Geppetto into an existing Eclipse IDE.

Wizard improvements

The Import from Forge wizard will now accept keywords to be entered directly on the first wizard page. The resulting list will be sorted with Puppet Enterprise supported modules at the top.

The wizard can also be started as a “Quick Fix” from the metadata.json editor when an unsatisfied dependency is detected.

New wizard: Import Module from Source

This new wizard will let you select a directory on disk that represents a module. Any directory can be imported (your objective might be to turn it into a module), but directories that contain a metadata.json or Modulefile are displayed together with a special icon, making them easy to find.

Platform update

Geppetto is built on top of the Eclipse Luna release train. This means that it uses all the latest stuff from Eclipse, and that it’s guaranteed to install without problems into the latest version of the Eclipse IDE. Eclipse Luna was released on June 25, 2014.

More information on Geppetto

We hope that you will find the improvements in this release helpful, and look forward to your feedback. You can find more information and links on the Geppetto pages on GitHub and the Puppet Labs documentation for Geppetto.

Thomas Hallgren is a software engineer at Puppet Labs.

Learn More

Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.