0

I followed some "best practices" from Puppet 2.7 Cookbook and created agent - puppet master framework, with git cvs. Unfortunately, the book doesn't cover Gepetto, so I am forced to improvise that part.

I have one main git repository that contains manifests and modules folders. I want to add a custom module in the modules, but when doing so I encountered problems.

First of all, I cannot find anything like "master configuration" project type, which by default would contain the manifests and modules folders. So I created a bare "Puppet project" project, and created the folders manually.

Because - as I understand it - in this configuration Gepetto doesn't really know, that this project will actually hold all the modules, it doesn't provide an option to create "Puppet module project" subproject, which would be nested inside the "Puppet project"'s modules folder.

When I nest it manually (by specifying a custom location in the New Puppet Module Project wizard), I get an 'Auto share git projects' has encountered a problem error:

Unable to ignore resources Attempted to beginRule: F/puppet@puppetmaster/modules/unnamed, does not match outer scope rule: MultiRule[P/mymodule]

Did anyone of you managed to get Gepetto working with modules when everything is covered by something like "master project" that encapsulates all configuration?

1
  • I have cross-posted this question with Gepetto Puppet Google group. I'll update the answer here, if I ever get one. Jan 30, 2014 at 9:32

1 Answer 1

1

This is the answer I've got from Thomas Hallgren:

Geppetto does not currently support projects with nested modules in them. It assumes that you have one project per module. A project however, isn't the same thing as a physical location on disk so most layouts can be mapped successfully to the Geppetto workspace. For the use case you mention below (a Git repository with a "modules" folder) I think the best way to map it is to take the following steps:

  1. Open the "Git Repositories" view. You'll find it under "Window" -> "Show View" -> "Other..." -> "Git"
  2. Add the repository in question to the view, either by appointing an existing local clone (yellow drum with a green plus sign) or by cloning a remote repository (two yellow drums with a green arrow)
  3. Expand the repository and then expand the "Working Directory" and the "modules" folder.
  4. Right click on one of the modules and choose "Import projects...". A wizard pops up
  5. Choose "Import as general project" and click "Finish". The project now shows up in the Project Explorer view.
  6. Right click on the project and choose "Add Puppet Project Nature"

Repeat steps 4-6 for all desired modules.

You can now work with the modules individually and Geppetto will recognize the projects as module projects and map them accordingly so that cross references etc. works properly.

To add a new module to the "modules" directory in the same Git repository:

  1. Right click in the Project Explorer and choose "New" -> "Project" -> "Puppet Module Project"
  2. Enter a name for the project, leave the "Use default location" checked, and click finish
  3. Right click on the project and choose "Team" -> "Share project".
  4. Choose "Git" in the wizard that pops up
  5. Click "Next" and then choose the repository in the drop down
  6. Enter "modules" in the "Path within repository" field
  7. Click Finish

Some more information can be found in the Geppetto documentation here: http://docs.puppetlabs.com/geppetto/4.0/#geppetto-and-pe

Ideas on how to improve this flow are very welcome.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .