0

So in our environment, we are using a custom build of Zabbix as a monitoring solution. We have Zabbix deployed to four different sites, and would like to ensure that the build is consistent across all four sites.

So far, we have a Git repo holding a copy of our Zabbix build, and that gets updated automatically every night via cron.

However, I'd like to do away with the cron task and set up some sort of "automatic sync" mechanism, whereby as soon as someone does a git push on one node, all the other nodes do a git pull with no intervention from the user.

Has anyone heard of perhaps a FUSE driver that might supply this functionality? or some other kind of solution?

Thanks!!

2 Answers 2

1

Assuming you're committing to a bare/shared repo, it's pretty straightforward to add a post-receive hook to ssh to each server, cd to the appropriate directory, and run a git pull.

#!/bin/bash

for node in $(cat nodelist)
do
    ssh $node "cd /path/do/working/directory && git pull"
done

If you want to clobber any changes someone may have made without going through git, you can do something like git fetch --all followed by git reset --hard origin/master in place of a pull.

Some other options include using Jenkins to monitor the repo for changes and run a job on the other nodes to update their working directories, or using something like Puppet/Chef to manage your configs and update configs as needed.

0

maybe sparkleshare fits your needs?

from it's site:

How does it work?

SparkleShare creates a special folder on your computer. You can add remotely hosted folders (or "projects") to this folder. These projects will be automatically kept in sync with both the host and all of your peers when someone adds, removes or edits a file.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .