Strategies for Source Control with Puppet 4

57 views
Skip to first unread message

Rachel Andrew

unread,
Jul 5, 2015, 11:26:09 AM7/5/15
to puppet...@googlegroups.com
Hi all

just wondering how you are all managing source control.

I’m setting up a new Puppet Master and migrating my nodes to it (I’ve only got 7 servers so we’re small fry). I only have need for the default production environment right now and I like to keep simple things simple as we’re not about to end up with 100s of nodes.

I *could* just check the code directory into git, although I’d probably want to .gitignore the puppetlabs and other 3rd party modules we use, however it occurs to me that I could create a bunch of repositories, one for each of our custom modules, one for the heiradata and so on. Is there an accepted best practice for this? Any issues people have encountered?

--

Rachel Andrew

http://www.rachelandrew.co.uk
http://twitter.com/rachelandrew



Gareth Rushgrove

unread,
Jul 5, 2015, 4:47:08 PM7/5/15
to puppet...@googlegroups.com
Hi Rachel

I'd probably take at least a look at r10k, which is an opinionated
deployment tool for the problem you describe.

https://github.com/puppetlabs/r10k

The official documentation covers Puppet Enterprise but I think the
majority of it will be applicable, especially in terms of getting a
sense of what and why.

https://docs.puppetlabs.com/pe/latest/r10k.html

And as always Gary has a bunch of blog posts which cover more the workflow.

http://garylarizza.com/blog/2014/02/18/puppet-workflow-part-3/
http://garylarizza.com/blog/2014/03/07/puppet-workflow-part-3b/

You could probably get away without given the size of deployment, but
I definitely prefer using a Puppetfile to bring in first or third
party modules from separate repos anyway, at which point you pretty
much have what r10k refers to as a control repo. r10k then just gives
you nearly-free environments based on git branches - which given the
low cost then opens up some possibilities which might prove useful.

If you just want the modules in separate repos part then also take a
look at librarian-puppet which just does that part:
https://github.com/rodjek/librarian-puppet

And sure lots of other folks here have opinions and workflows too that
work for them

Gareth
> --
> 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...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6FE5FEFB-CF7A-43F8-8A1E-0176C55CB824%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.



--
Gareth Rushgrove
@garethr

devopsweekly.com
morethanseven.net
garethrushgrove.com
Reply all
Reply to author
Forward
0 new messages