RETIRED, Gerrit as used by OpenStack
Go to file
Sasa Zivkov e5fc90eb67 Optionally, initialize site from WebAppInitializer.
This supports automatic site initialization on Gerrit server startup
when Gerrit runs in a servlet container. Both creation of a new site
and upgrade of an existing site are supported.

This feature may be useful for such setups where Gerrit admins don't
have direct access to the database and the file system of the server
where Gerrit should be deployed and, therefore, cannot perform the
init from their local machine prior to deploying Gerrit on such a
server. It may also make deployment and testing in a local servlet
container faster to setup as the init step could be skipped.

The site initialization will be performed only if the 'gerrit.init'
system property exists (the value of the property is not, used only the
existence of the property matters).

If the 'gerrit.site_path' system property is defined then the init is
run for that site. The database connectivity, in that case, is defined
in the etc/gerrit.config.

If 'gerrit.site_path' is not defined then Gerrit will try to find an
existing site by looking into the system_config table in the database
defined via the 'jdbc/ReviewDb' JNDI property. If system_config table
exists then the site_path from that table is used for initialization.
Database connectivity is defined by the jdbc/ReviewDb JNDI property.

Finally, if neither 'gerrit.site_path' property nor the system_config
table exists, the 'gerrit.init_path' system property, if defined, will
be used to determine the site path. Database connectivity, also for this
case,is defined by the jdbc/ReviewDb JNDI property.

Example 1:
  Prepare Tomcat so that a site is initialized at a given path using
  the H2 database (if the site doesn't exist yet) or using whatever
  database is defined in the etc/gerrit.config of that site:

  $ export CATALINA_OPTS='-Dgerrit.init -Dgerrit.site_path=/path/to/site'
  $ catalina.sh start

Example 2:
  Prepare Tomcat so that an existing site with the path defined in the
  system_config table is initialized (upgraded) on Gerrit startup. The
  assumption is that the jdbc/ReviewDb JNDI property is defined in
  Tomcat:

  $ export CATALINA_OPTS='-Dgerrit.init'
  $ catalina.sh start

Example 3:
  Assuming the database schema doesn't exist in the database defined
  via the jdbc/ReviewDb JNDI property, initialize a new site using that
  database and a given path:

  $ export CATALINA_OPTS='-Dgerrit.init -Dgerrit.init_path=/path/to/site'
  $ catalina.sh start

Change-Id: Ic3e8c993087d2fbb38e14479a539dc62495ad908
2013-09-18 12:52:17 -07:00
.settings Suppress Eclipse warning "annotation should not be used as a superinterface" 2013-05-10 10:31:19 -07:00
contrib Add bash completion script for gerrit.sh 2013-08-22 16:18:42 +09:00
Documentation Optionally, initialize site from WebAppInitializer. 2013-09-18 12:52:17 -07:00
gerrit-acceptance-tests Acceptance tests framework: Allow tests to change Gerrit configuration 2013-09-18 10:50:20 +02:00
gerrit-antlr Document that QueryParseException message is shown to end users 2013-08-22 11:51:26 -07:00
gerrit-cache-h2 Use CacheBuilder returned from CacheBuilder.removalListener(...) 2013-08-22 15:37:02 +02:00
gerrit-common Support branch specific labels 2013-09-13 13:57:44 +08:00
gerrit-extension-api Add an event for project deletion 2013-09-13 07:47:13 +00:00
gerrit-gwtdebug Delete Maven based build 2013-05-21 20:28:56 -07:00
gerrit-gwtexpui CopyableLabel: Do not hide instances in the current dialog 2013-08-22 10:57:33 -07:00
gerrit-gwtui Revert "Make SubmitRecord.Label's fields @Columns" 2013-09-12 23:42:45 +00:00
gerrit-httpd Optimized "IncludedIn" Algorithm 2013-09-16 08:19:35 +00:00
gerrit-launcher Fix lazy initialization of non-volatile static field in GerritLauncher 2013-08-23 19:06:12 +09:00
gerrit-lucene Lucene: disable default english stop words set 2013-09-13 22:55:51 +02:00
gerrit-main Delete Maven based build 2013-05-21 20:28:56 -07:00
gerrit-openid Prevent possible NPE in LoginForm 2013-08-23 17:52:36 +09:00
gerrit-patch-commonsnet Delete Maven based build 2013-05-21 20:28:56 -07:00
gerrit-patch-jgit Delete Maven based build 2013-05-21 20:28:56 -07:00
gerrit-pgm Optionally, initialize site from WebAppInitializer. 2013-09-18 12:52:17 -07:00
gerrit-plugin-api Delete Maven based build 2013-05-21 20:28:56 -07:00
gerrit-plugin-archetype Remove invalid references to parent pom from plugin archetype poms 2013-08-27 09:43:11 +02:00
gerrit-plugin-gwt-archetype Remove invalid references to parent pom from plugin archetype poms 2013-08-27 09:43:11 +02:00
gerrit-plugin-gwtui Delete Maven based build 2013-05-21 20:28:56 -07:00
gerrit-plugin-js-archetype Remove invalid references to parent pom from plugin archetype poms 2013-08-27 09:43:11 +02:00
gerrit-prettify Merge branch 'stable-2.7' 2013-07-05 18:55:30 -07:00
gerrit-reviewdb Revert "Make SubmitRecord.Label's fields @Columns" 2013-09-12 23:42:45 +00:00
gerrit-server Merge "Add REST endpoints for draft changes" 2013-09-18 09:50:06 +00:00
gerrit-solr Push limit term into secondary index queries 2013-08-09 01:14:53 +00:00
gerrit-sshd Add REST endpoints for draft changes 2013-09-17 00:26:53 +02:00
gerrit-util-cli Exclude Guava Maven data and javax sources from Guice JARs 2013-08-06 09:39:50 -07:00
gerrit-util-ssl Delete Maven based build 2013-05-21 20:28:56 -07:00
gerrit-war Optionally, initialize site from WebAppInitializer. 2013-09-18 12:52:17 -07:00
lib Add dependency on the Google protocol buffer library 2013-09-10 15:59:25 -07:00
plugins Update replication plugin to the latest revision 2013-08-27 10:00:33 +09:00
ReleaseNotes Update the 2.6.2 release notes 2013-09-18 15:27:15 +09:00
tools Remove asciidoc.conf 2013-09-04 21:31:03 -07:00
website/releases Use new cached URL for Diffy logo on releases page 2013-09-09 15:18:08 -07:00
.buckconfig Let buck ignore the .git folder 2013-09-17 08:48:35 +02:00
.buckversion Update Buck 2013-08-15 17:25:45 +00:00
.gitignore Add org.eclipse.ltk.core.refactoring.prefs to .gitignore 2013-07-11 18:02:25 +09:00
.gitmodules Replace helloworld plugin with cookbook plugin 2013-08-13 11:41:58 +09:00
.pydevproject Set python version back to 2.6.5 in .pydevproject 2013-05-20 11:36:08 +09:00
BUCK Buck: add javax.http package to gerrit-plugin-api 2013-08-13 09:18:06 +02:00
COPYING Initial project setup of Gerrit 2 2008-11-14 16:59:34 -08:00
INSTALL Remove Gerrit 1.x to 2.x import tools 2009-03-27 20:20:10 -07:00
SUBMITTING_PATCHES Update push URL in SUBMITTING_PATCHES 2012-03-29 00:57:14 -04:00
VERSION Cleanup maven_deploy, maven_install build rules 2013-07-29 14:05:26 -07:00