Published on 12 January 2017 by

Puppet modules are designed to be self-contained bundles of code, wrapping up into a single package all the classes, files, and templates having to do with any one component. This means that the Puppet Apache module will manage only Apache, and the MySQL module will manage only MySQL.

But a lot of components have dependencies. For example, many modules will reuse resources from the puppetlabs-firewall module to create rules allowing network access, or they'll use resources from puppetlabs-concat to build configuration files. That's traditionally made it a little difficult to manage your development environment, since each module needed access to all of its dependencies for testing, and it's left up to you, the programmer, to go look up the documentation for each resource type you want to use.

xyz
RubyMine automatically manages module dependencies within your Puppet module project. Image courtesy of the RubyMine blog.

JetBrains is changing that with their recently announced RubyMine 2017.1 EAP release, containing a new feature, Puppet Project Structure. (RubyMine, in case you don't know about it already, is a Ruby and Rails integrated development environment (IDE).) The new dependency management features allow you to install the proper version of each dependency of your module using the existing metadata.json file inside a module or the Puppetfile in an environment, and then use the resource types within the dependencies to provide intelligent code completion as you work.

This uses the open source librarian-puppet tool, which manages all dependencies recursively, so it will minimize the administrivia headaches you must deal with. Head on over to the JetBrains blog and read Artem Sarkisov's post about the new release, or just sign up for the early access program and try out Puppet Project Structure for yourself.

Ben Ford is a principal training solutions engineer at Puppet.

Learn more

Share via:
Posted in:
Tagged:

Worth mentioning that you can use Puppet plugin on a Community Edition of PyCharm or IDEA. Those are free and open-source. You won't get the support for ERB templates nor any Ruby code in that case, but you'll get all the Puppet-only goodies.

Also, if you have a license for any of JetBrains products, vote up for EPP support in the Puppet plugin here:

https://youtrack.jetbrains.com/issue/RUBY-19108

Hey Darrin! RubyMine is a JetBrains product, not a Puppet product. So it's not a "replacement". That said, development on Geppetto has been deprioritized since building IDEs is not really our core competency. If you're currently using Geppetto, I'd recommend evaluating RubyMine as a replacement.

I've been using RubyMine as my primary tool for working on Puppet code for the last couple months and it's quite nice!

The main problem I have with it (vs `vim-puppet`) is lack of support for some of the more "obscure" features of the DSL. E.g. type aliases, which are in the language spec, work in current versions of Puppet, but are not in the actual language docs. Similarly, until recently, it supported in-DSL functions, but not when specifying a return value data type. Those sorts of things.

That said, for day-to-day writing of Puppet code and Ruby extensions to Puppet, it's absolutely fantastic. 

The content of this field is kept private and will not be shown publicly.

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.