Ask Your Question
0

Using Git for version control of Puppet Config - Dynamic Environments

asked 2013-01-11 13:17:51 -0500

thewellington gravatar image

updated 2013-01-11 13:18:59 -0500

I am trying to set up dynamic environments in Puppet, using Git branches to create each environment. I am also using gitolite to manage access to the repository.

I have read the page at http://puppetlabs.com/blog/git-workflow-and-puppet-environments/, and taken the ruby script there, changed the ENVIRONMENT_BASEDIR to /etc/puppetlabs/puppet/environments, and then followed the git example at the bottom of the page for "Creating and using a new environment" and ended up with the following:

inara:environments bwelling$ git branch
* master
  this-is-a-test
inara:environments bwelling$ git checkout -b test1234
Switched to a new branch 'test1234'
inara:environments ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-01-11 18:14:19 -0500

Adrien Thebo gravatar image

Setting ENVIRONMENT_BASEDIR to /etc/puppetlabs/puppet/environments is a perfectly good solution, however you'll need to pick a method to let the git user write to that directory. For instance, you could do something like chgrp git /etc/puppetlabs/puppet/environments; chmod g+s /etc/puppetlabs/puppet/environments so that the git user running the post-receive hook is able to actually modify those files.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2013-01-11 13:17:51 -0500

Seen: 1,231 times

Last updated: Jan 11 '13