Solution 1:

The answer really depends on how version-controlled you want to be. There are a few main approaches:

  1. House everything in a single flat Git repository, and just clone it on your masters (or nodes if you're running masterless).

    This is by far the simplest option, but means that you'll have multiple copies of the same module across your production and development environments (though you could get around it with symlinks).


  1. Have your main Puppet code in a single Git repository, with Git submodules pointing to your custom modules. Deployment is the same as above, with the addition of --recursive to the git clone.

    The advantage of this approach is that you can easily reference external modules (the PuppetLabs Apache module for example) and it's relatively easy to pull in upstream changes, but you also have the overhead of having to deal with Git submodules, which are notoriously messy.


  1. Run your own Puppet Forge, and use Librarian-puppet or R10K to manage the installation of your modules.

    This has the advantage of being able to fully control the versions of your modules via SemVer without publishing them publicly - though rolling your own Puppet Forge is still considered "bleeding edge" by some.