问题
There are two develop sites in my company to cooperate on develop SW for customer, and my job is collecting fix from both sites to make vendor release of our company, and delivered it to customer release hub. (customer release hub using another git server in site C, and besides me, there were CM from other companies would provide similar vendor release to customer release hub for releasing.)
after self-study, now I had created gerrit/git system on Site A sucessfully, developer in site A could using gerrit to clone code/review changes with no problem, but developer from site B complains the gerrit site A performance is not acceptable for them, the clone/push/pull take several hours, it is not possible to do dailywork.
So they suggested to setup somekind of a mirror git repo in Site B, then they could clone code from the mirror server more effectively, and meanwhile develepers in site B also need to using gerrit in site A to do code review, because I need to collect all site A/B changes from code_develop branch in site A, then make a company vendor release, and push it to site C, where customer make the main product release.
Then below are issues i am not surely how to do:
how to create the mirror git repo in site B?
Is it all just using command "git clone --mirror siteA_admin@siteA_IP:29418/product_code" on server in site B?After site B mirror branch created, what is the best effective way to keep update between gerrit repo of site A and the mirror repo in site B? Using some hook? or git mirror repo would update automatically? or should anyone in Site B have to do fetch manually everytime?
what is the best way to update site B developer comment on gerrit effectively and in time? should developer using some command to push directly to gerrit in site A? or should developer just push code to mirror repo, then push again to site A from mirror? I am lost.. needs your supports.
because customer repo C is not same git repo in our company, how should I delivery code to release hub? should I just copy vendor release to git repo cloned from siteC, then push again? or is it OK I using some kind of comamnd to push code directly from site A working repo to site C git release repo?
after new release made by customer release hub in site C, how should I keep update site A and site B git repos?
P.S: Due to I am new leaner in China, to aovid unnessary communication cost for time difference, please try to give some suggestion in very detailed way. :p Thank you very much for all your help in advance.
回答1:
Have a look at this, this is about scaling and setting up replication for Gerrit
来源:https://stackoverflow.com/questions/17258874/how-should-the-other-remote-site-using-gerrit-server-based-on-a-mirror-repo