Hey; I am a recent convert to puppet and git and have become a huge fan so the concept on keeping modules under git/vcs control is well and truly accepted. I''m not clear on how to keep the /etc/puppet/manifests in sync with the modules, however. Case in point: I have two puppet instances running, one, "prod", running/maintaining a set of physical linux systems and one, "dev", running on a set of KVMs on which I''m doing most of my testing. I use the master branch of the dev instance as the place to test out changes to the things that I eventually want in prod. Put another way, the prod instance pulls changes from the dev master branch. So far, pretty standard The dev instance also has a testing branch in which I can go hog wild. Doing this, though, I occasionally have to update the /etc/puppet/manifests/nodes.pp file to include additional testing modules. When I switch back to the master branch on dev, I have to re update that file manually. It seems there should be a better way to keep these in sync. I pondered putting the entire /etc/puppet directory under one repo; but that would make migrating changes to my prod instance an ugly process. Host names changed, puppet.conf file''s different, etc, etc. The only thing I''ve thought of is creating a softlink from /etc/puppet/manifests/nodes.pp -> /etc/puppet/modules/nodes.pp. I''m sure that''ll work as the nodes would get switched to whatever git branch is current; but, I wanted to find out if there''s a better, cleaner, more standard method. Any hints/tips/suggestions greatly appreciated. Thanks. Doug O''Leary -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/fd275df7-b1f8-4c74-9e37-8ca392a5eb32%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Werner Flamme
2013-Oct-30 14:23 UTC
Re: [Puppet Users] git & puppet, modules & manifests (oh-my)
dkoleary [30.10.2013 14:55]:> Hey;[..]> Doing this, though, I occasionally have to update the > /etc/puppet/manifests/nodes.pp file to include additional testing modules. > When I switch back to the master branch on dev, I have to re update that > file manually. It seems there should be a better way to keep these in sync.Hi Doug, do you want this file in the git version control or not? :-) If not, "echo nodes.pp >> /etc/puppet/manifests/.gitignore" should solve the problem, since git will ignore the file from now on If yes, I''d suggest you open a separate branch for this one file, and to merge it wherever and whenever needed. Regards, Werner -- -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52711664.2070000%40ufz.de. For more options, visit https://groups.google.com/groups/opt_out.
dkoleary
2013-Oct-30 14:35 UTC
Re: [Puppet Users] git & puppet, modules & manifests (oh-my)
Hey; Thanks for the reply. Yes; having it under git control would be optimal. I tried having a separate repo for /etc/puppet/manifests (and still have it); however, when I switch between testing and master, I still have to remember to switch on the manifests repo. I''m a UNIX admin. We''re lazy by nature. I tried the soft link that I mentioned above and it seems to work. Pending any other responses, I''ll keep going with that: # pwd /etc/puppet/modules # git branch * master testing # grep pm /etc/puppet/manifests/nodes.pp node ''pm.olearycomputers.com'' { include base } and switching: # git checkout testing Switched to branch ''testing'' # git branch master * testing # grep pm /etc/puppet/manifests/nodes.pp node ''pm.olearycomputers.com'' { include base,testing } The only (minor) issue is that I''ll have an extra nodes.pp file in my production instance but since the soft link won''t exist in prod, it won''t matter. Thanks again for the response. I appreciate it. Doug O''Leary -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/00cf4e72-c842-4fee-a42f-25a678102b6a%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.