Bitbucket and puppet-sync

123 views
Skip to first unread message

tyon

unread,
Mar 5, 2015, 7:24:59 PM3/5/15
to puppet...@googlegroups.com
Hi all,

Is it possible to keep your central repository for Puppet modules in Bitbucket and sync it with your Puppet master with puppet-sync script (something like this one https://github.com/pdxcat/puppet-sync)

I cannot find how to add your custom hooks in Bibucket. I'm curious if it's possible in general or I have to maintain my own git server?

Thank you! 


Jason Wever

unread,
Mar 6, 2015, 10:09:29 AM3/6/15
to puppet-users
I'm doing this currently and used
https://bitbucket.org/itjgray/bitbucket-php-deploy/src as the basis
for what I did. Our Puppet server is already running a web server for
The Foreman and a couple of custom tools, so we opted to use a web
based post-commit hook to do this. Some slight adjustments were made
to git-deploy.sh to cycle through each of the Puppet environments to
update them all when the post-commit hook requests the PHP file on the
Puppet server's web server.

If you can't run the web server on the Puppet server, but you can run
it on a web server that can access your Puppet server, you could
adjust the git-deploy.sh to SSH into the Puppet server and fire off
the appropriate git commands.

Bitbucket also lists the IPs that they will be coming from at
https://confluence.atlassian.com/display/BITBUCKET/What+are+the+Bitbucket+IP+addresses+I+should+use+to+configure+my+corporate+firewall
if you want/need to lock down who can request the URL for
deploy-sh.php

Cheers,
--
Jason Wever

tyon

unread,
Jun 10, 2015, 1:14:09 PM6/10/15
to puppet...@googlegroups.com
Hi Jason,

For some reasons I didn't get your an email with your answer even if the option is chosen. 
Thanks a lot, it's very helpful. My puppet server is running a web server for foreman as well.

I'm planning to use puppet-sync to use dynamic environments, so I'll need to change your scripts a bit. Thanks for sharing them. 
Reply all
Reply to author
Forward
0 new messages