We started using dynamic environments in November. Some of our manifests
are sensitive and my employer's policy forbids us from storing this type
of information in any kind of third-party service, so I built my own
Gitlab server. I wrote a brief note on how to do this on my employer's blog:
http://unix.bris.ac.uk/2014/11/17/building-a-gitlab-server-with-puppet/
I thought I'd also written a blog post about puppet-sync but apparently
I didn't, so I'll say a few words about that here. We are using the
pdxcat/puppet-sync which is installed to the gitlab server in
/usr/local/bin. Gitlab provides a way of using web hooks through the GUI
but not "proper" git hooks, so you have to fiddle in the filesystem. I
configured public keys and installed the post-receive hook in:
/var/opt/gitlab/git-data/repositories/<user>/<repo>.git/hooks/post-receive
... which references puppet-sync. Now, every time something is pushed to
a branch in Gitlab, the gitlab server ssh's to the puppet master and
pulls that branch into /etc/puppet/environments. Now all the developers
can make their own branches/environments without affecting production.
The solution works well for us.
You would only be able to do this with Bitbucket if they allow you to
configure git hooks. We are currently looking at how to switch to web
hooks instead of git hooks. This would allow us to use Gitlab more
easily, and to use Github or Bitbucket. I think we would need to write a
simple web-based API that runs on the puppet master to receive the web
hooks and act upon them.
Cheers,
Jonathan
On 04/03/15 18:13, tyon wrote:
Hi everybody.
I recently started using Puppet directory environments. I really like
the idea of Dynamic Puppet environments with Git branches and Git
hooks to sync Puppet master after any changes were pushed to the Git
server.
Can I use external service like Bitbucket as a Git master or do I need
to have my own Git server? If I can use Bitbucket how I can add my
puppet-sync post receive hook there? Can anybody point me to an
article on how to do this?
Thanks!
--
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+unsubscr...@googlegroups.com
<mailto:puppet-users+unsubscr...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/2a02f21a-3df4-4d6c-b664-2f6c1b134f2e%40googlegroups.com
<https://groups.google.com/d/msgid/puppet-users/2a02f21a-3df4-4d6c-b664-2f6c1b134f2e%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/54F98D77.5070709%40bristol.ac.uk.
For more options, visit https://groups.google.com/d/optout.