Ask Your Question
3

Puppet environments using git

asked 2013-07-30 09:52:50 -0500

Luke gravatar image

Hello,

We currently have the following puppet environments setup with correspond to git branches in our puppet repo:

ops dev qa prod

Our environment is setup like this

Core modules - These are the core modules that all sub projects rely on which is maintained by ops -project modules - these are project specific modules that can be very different from each other but they rely upon core.

This works great but the problem we are starting to run into is that we have multiple projects on the in which one set of code isn't ready to move to qa but ... (more)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2013-07-30 10:18:38 -0500

Ancillas gravatar image

We moved to 1 module per git repo. However, the puppet-librarian approach allows individual modules to be deployed from one grand git repo.

Another tool called r10k takes the puppet-librarian approach of using a Puppetfile, and extends it to multiple environments. Each branch of a repo represents a puppet environments, and each environment contains a Puppetfile that defines which modules (and versions/branches/tags) that environment should use.

Both tools are useful for managing modules and environments.

edit flag offensive delete link more

Comments

Thank you. The r10k looks like it could help us out. So how would it work if we want to have a dev, qa, prod environments in puppet but we ...(more)

Luke gravatar imageLuke ( 2013-07-30 14:07:26 -0500 )edit

dev environment mod 'project123', :git => 'git://github.com/derp/project123.git', :ref => 'dev'

Luke gravatar imageLuke ( 2013-07-30 14:09:31 -0500 )edit

In your 'dev' environment, you would specify the branches that your various modules should be deployed from. So, the 'dev' environment could deploy the 'project123' module from the HEAD of ...(more)

Ancillas gravatar imageAncillas ( 2013-07-30 14:34:07 -0500 )edit

Hi, Seems to work great thank you. Do you know of a way to have the managed environments on the fly? If someone does an update to one module can ...(more)

Luke gravatar imageLuke ( 2013-08-01 09:42:54 -0500 )edit

Nothing native to r10k. I'm always a fan of push over pull. A cron job is a pull, but it would work. Every 5 minutes, run r10k to synchronize ...(more)

Ancillas gravatar imageAncillas ( 2013-08-01 12:24:15 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-07-30 09:52:50 -0500

Seen: 1,189 times

Last updated: Jul 30 '13