Alternative Replication tool in Gerrit:

187 views
Skip to first unread message

Renuka Holimath

unread,
Apr 3, 2017, 3:36:52 AM4/3/17
to Repo and Gerrit Discussion
Hi Team,

Currently we have setup Gerrit 2.13.2 in our environment and are using default "Replication" plugin to replicate the changes from Master to slave or from one Gerrit to another Gerrit site.
We are interested to know if there is any other tool or mechanism (external to Gerrit) which supports replication in Gerrit.

Regards,
Renuka

Andrew Grimberg

unread,
Apr 3, 2017, 9:06:48 AM4/3/17
to Renuka Holimath, Repo and Gerrit Discussion
Greetings Renuka,

My understanding is that the replication plugin is the best method for
mirroring from Gerrit to another location.

The Linux Foundation (where I work) also use a tool that was developed
in house for large mirroring that works in a more polled manner. It
does, however, require that you add a hook to Gerrit and it will also
only mirror repositories that are anonymous accessible and won't mirror
anything but standard git refs. Which means it will only mirror merged
code on branches.

The tool I'm referring to is grokmirror (
https://github.com/mricon/grokmirror ) which at least on Fedora and EL
systems is available in the upstream package repositories as
python-grokmirror I don't know about other distributions.

-Andy-
> --
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
> ---
> You received this message because you are subscribed to the Google
> Groups "Repo and Gerrit Discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to repo-discuss...@googlegroups.com
> <mailto:repo-discuss...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

Martin Fick

unread,
Apr 3, 2017, 12:27:15 PM4/3/17
to repo-d...@googlegroups.com, Renuka Holimath
Gerrit fire's a refUpdated event (and hook) that can be used
to trigger another replication mechanism. It is possible
(not that I would recommend it directly), to even run git
this way to replicate to your destination. However, I
suspect that any such solution will mostly evolve to very
closely resemble the replication plugin eventually once such
features as reliability, thread control, ACLS... are
desired.

Is there some specific problem you are trying to over come?
If so, perhaps it makes more sense to improve the
replication plugin to handle this problem?

-Martin
--
The Qualcomm Innovation Center, Inc. is a member of Code
Aurora Forum, hosted by The Linux Foundation

David Hayes

unread,
Apr 3, 2017, 1:36:38 PM4/3/17
to Repo and Gerrit Discussion
In terms of replicating the git data, it's possible to use a shared filesystem such as NFS in a master/slave setup.

Renuka Holimath

unread,
Apr 4, 2017, 2:33:35 AM4/4/17
to Repo and Gerrit Discussion, renukah...@gmail.com
Hi Andy,

Thank you for this info.

Regards,
Renuka

Renuka Holimath

unread,
Apr 4, 2017, 2:38:34 AM4/4/17
to Repo and Gerrit Discussion, renukah...@gmail.com
Hi Martin,

Thank you for the info.We are interested in the external tools which supports replication. This was the valuable info though. Thanks again.

Regards,
Renuka

mannemgo...@gmail.com

unread,
Apr 12, 2017, 3:19:04 AM4/12/17
to Repo and Gerrit Discussion, renukah...@gmail.com
Hi Martin,

While trying to replicate using replication plugin, the mirrors are not getting automatically synced.
And also can we replicate only particular repo's on where the changes are done(like:-"ref-updated hook"), if yes please guide me. I want ot use that ref-updated hook, please help me with the configurations to be done.
Please let me  know what changes to be done on the replication.config below:

My replication config looks like below:
[remote "************"]
  url = gerrit@****.ad.example.com:/path/${name}.git
  push = +refs/heads/*:refs/heads/*
  push = +refs/tags/*:refs/tags/*
#  push = +refs/for*:refs/for*
  timeout = 45
  replicationDelay = 5
  authGroup = Administrators
  autoReload = true
  replicateOnStartup = true
  defaultForceUpdate = true
  threads = 4



Thanks in advance!
Gopi

On Monday, April 3, 2017 at 9:57:15 PM UTC+5:30, MartinFick wrote:
Reply all
Reply to author
Forward
0 new messages