How to do a complex project setup for Puppet modules

Hi,

I've a question on how to set up a complex puppet project in RubyMine. To start things off, a littlbe bit of background:

I'm working on a big project das DevOps engineer. We are using puppet for managing, deploying and orchestrating a failry complex distributed application.  We have around 90 puppet modules from which 46 are self developed and maintained by my team. Each module lives in it's own git repository  and about 12 people are constantly developing those modules. The modules have a lot of interdependencies. We have used Eclipse with Geppetto as IDE for quite a while know. But geppetto is no longer maintained so we were looking for an alternative IDE for puppet development in Windows

Because our project already has a  IntelliJ all Products Pack for every team member, we tried RubyMine. While things looked promising, we are having difficulties to set up our Project in RubyMine.

I first tried to open every module in a single project window in RubyMine. But there seems to be now way of managing  dependencys other than putting them in a local directory inside of your module (either trough fixtures, or through librarian-puppet). That leaves us with a lot of duplicated module folders and a big pain to manage them all.

So the second thing I tried is opening our Puppetfile-Repository (Puppet Control Repo) as primary projects and then adding all of the other modules as projects in the same window. While this works really well for dependency management, it does not for two other aspects:

1. VCS - Git. VCS doesn't seem to work anymore, because every project has it's own repo. Adding and comming files seems bugged, diff constantly says it cannot be displayed because of indexing actions.

2. Performance - The overall GUI performance with that many projects opened in one IDE is really bad (it worked well in Eclipse).

 

So, here are my questions:

Has anybody experience with setting up such a complex Puppet Module structure in RubyMine? Is there a guide on how to do it and what to do to improve performance when you have that many modules loaded?

 

Kind Regards

 

Benny

 

8 comments
Comment actions Permalink

Could you please show me: how do you see your project?

I've got the idea that you have a number of modules (custom and public), but how should it look like as a whole?

It's not necessary to reveal your real project, just some example.

Here I've created a project with 3 modules from the github, each has it's own repository.

0
Comment actions Permalink

Hi Alexandr,

 

thanks for you reply. Here is a screenshot of my current setup (each module as own project in RubyMine):

Please note the scroolbar in the project overview :).

Your approach with one project with different modules looks very promising. Can you elaborate more on how to set that up?

 

Regards

 

Benny

0
Comment actions Permalink

 

How I did this:

1. Created an empty project

2. Use VCS -> Checkout from Version Control -> Git

3. Typed apache repo address, current project dir as root dir and desired subdirectory name (apache) to clone apache module

4. Clicked clone

5. After cloning process clicked NO in the "would you like to open dir" dialog, to avoid opening cloned repo as new project.

6. New directory appeared in my project and recognized as a module (should have a metadata.json file for this)

7. Repeated for other repos

 

You may just create an empty project and move there directories containing your module.

0
Comment actions Permalink

Please, note that if your modules should resolve to each other, you should put them to dependencies in metadata.json file, at least for now.

More information available here: https://www.jetbrains.com/help/ruby/puppet.html

 

1
Comment actions Permalink

Hi Alexandr,

 

from the first look and feel, your approach seems to work really well. I'm able to work with VCS again, it's fast and reliable. The module dependencys are correctly detected and processed. I'll keep using it for a couple of days and will report back.

 

Thanks a lot

 

Regards

 

Benny

0
Comment actions Permalink

Hi Alexandr,

 

I've an issue with Rake Tasks in this setup. Previously I was able to run Rake Taks via the Tools menu. With the current setupe (empty project and modules inside of it) I'm not able to run Rake Tasks anymore. This is what I try to do:

  1. Highlight a module folder in the Project Window
  2. Klick Tools->Run Rake Tasks
  3. Klick Reload Rake Tasks Lists

I get an error stating "Rake action cannot be launched in current project context."

Any Ideas on that?

 

Regards

 

Benny

 

0
Comment actions Permalink

This may be a problem. If I remember right, RubyMine looks for Rake Tasks in the project root. But with such structure we've got nothing there and Rake tasks are in puppet modules. You probably should create an issue for this.

0
Comment actions Permalink

Hi

This was a really useful thread. I have been modernising a very large Puppet project, with Ruby templates (erb), Hiera, YAML configurations, spec tests and numerous custom resources.

Are there any other useful plugins, configurations, or advice I should know about?

 

0

Please sign in to leave a comment.