Yes, on caliente you can run `java -jar gerrit.war daemon -d site_dir
--slave`. This will setup an SSH server that clients can use to fetch
Git repositories, but they cannot push or execute other commands like
`gerrit review`. We created slave to enable very busy sites to handle
lots of read traffic through slaves, while the less frequent write
traffic goes to the master.
> I'm also wondering if it would be possible to migrate from H2 to MySQL - and
> if so what tool would I use to migrate from H2 to MySQL? Hunting around
> didn't find much of anything hopeful.
The H2 database backup thing is a SQL script (but may be compressed
into a ZIP). You might be able to convince this to load in MySQL.
Gerrit uses very simple SQL constructs... but I don't know of any tool
to do this automatically.
> Lastly I read somewhere that I can't find at the moment that gerrit is
> possibly moving from a database backend to a git based one. Is this
> correct? If so I'll just stick with H2.
This is likely. 2.2.x already moved the project information to Git. We
still need to move the review information and account/group data.
Incorrect configuration for type = JDBC. You need a driver and url key:
[database]
type = JDBC
driver = org.h2.Driver
url = jdbc:h2:tcp://localhost:9101,localhost:9102/ReviewDB
Yikes. That is a bug in H2. I wonder if the H2 folks have fixed it
already, and Gerrit is just out-of-date?
Kevin
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
>
# Get the appropriate version of the library:
java -jar bin/gerrit.war cat lib/h2-1.2.147.jar > lib/h2-1.2.147.jar
# Start the two DB servers.
java -cp /usr/local/foo/lib/h2-1.2.147.jar \
org.h2.tools.Server -tcp -tcpPort 9101 -baseDir /usr/local/foo/db &
java -cp /usr/local/foo/lib/h2-1.2.147.jar \
org.h2.tools.Server -tcp -tcpPort 9102 -baseDir /usr/local/foo/db2 &
# Create the cluster:
java -cp /usr/local/foo/lib/h2-1.2.147.jar \
org.h2.tools.CreateCluster \
-urlSource 'jdbc:h2:tcp://localhost:9101/ReviewDB' \
-urlTarget 'jdbc:h2:tcp://localhost:9102/ReviewDB' \
-user '' -serverList localhost:9101,localhost:9102
# Start gerrit:
/usr/local/foo/bin/gerrit.sh start
My mistake was using the wrong version of the h2 library. Using the
one embedded in the .war file (unzip -l | grep h2 finds it) works
fine.
You can connect to the db from the shell prompt like so:
java -cp /usr/local/foo/lib/h2-1.2.147.jar \
org.h2.tools.Shell -url 'jdbc:h2:tcp://localhost:9101,localhost:9102/ReviewDB'
Perhaps putting something like this in the docs would be nice...
Kevin