...
Replication Use Case - commit change
Make change on gerrit, merge, kick off replication job, view change on gerrit2
Code Block | ||
---|---|---|
| ||
# 3 machines
# obriensystems dev laptop
# gerrit source server
# gerrit2 replication server
# on remote dev host - against gerrit
git clone "ssh://admin@gerrit.ons.zone:29418/test" && scp -p -P 29418 admin@gerrit.ons.zone:hooks/commit-msg "test/.git/hooks/"
cd test/
vi test.sh
git add test.sh
git commit -s --amend
git review
# getting merge conflict - needed to remove old commit id
vi test.sh
git add test.sh
git rebase --continue
git review
# move to gerrit UI, +2 review, merge
# on gerrit server
ssh ubuntu@gerrit.ons.zone
# tail the logs to the gerrit container
# on dev laptop
obrienbiometrics:test michaelobrien$ ssh -p 29418 admin@gerrit.ons.zone gerrit plugin reload replication
[2019-03-28 15:25:57,246] [SSH gerrit plugin reload replication (admin)] INFO com.google.gerrit.server.plugins.PluginLoader : Reloaded plugin replication, version v2.16.6
obrienbiometrics:test michaelobrien$ ssh -p 29418 admin@gerrit.ons.zone replication list
Remote: gerrit2
Url: admin@gerrit2.ons.zone:8080/${name}.git
[2019-03-28 15:26:57,963] [WorkQueue-1] INFO com.google.gerrit.server.plugins.CleanupHandle : Cleaned plugin plugin_replication_190328_0446_6094540689096397413.jar
# debug on
ssh -p 29418 admin@gerrit.ons.zone gerrit logging set DEBUG
# debug off
ssh -p 29418 admin@gerrit.ons.zone gerrit logging set reset
ssh -p 29418 admin@gerrit.ons.zone replication start --wait --all
# nothing yet - debugging container I only see a recent
var/gerrit/data/replication/ref-updates
-rw-r--r-- 1 gerrit gerrit 45 Mar 28 15:25 9cbb43eb3ce03badc8b3c7dc52ef84d8d6e67066
bash-4.2$ cat 9cbb43eb3ce03badc8b3c7dc52ef84d8d6e67066
{"project":"test","ref":"refs/heads/master"}
|
Replication Use Case - new Repo
This should replicate to the slave
Code Block | ||
---|---|---|
| ||
# action create in gui new http://gerrit.ons.zone:8080/admin/repos/test2 # in container on gerrit1 -rw-r--r-- 1 gerrit gerrit 46 Mar 28 15:45 608db0817a4694dc10ee1e0811c2f76b27d3d03f bash-4.2$ cat 608db0817a4694dc10ee1e0811c2f76b27d3d03f {"project":"test2","ref":"refs/heads/master"} |
Helm Charts
Or get the yamls via
...