gerrit/Documentation/index.txt
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

92 lines
3.1 KiB
Plaintext

Gerrit Code Review for Git
==========================
Index
-----
. General info
.. link:licenses.html[Licenses and Notices]
. Installing
.. link:intro-quick.html[A Quick Introduction To Gerrit]
.. link:install.html[Installation Guide]
. Tutorial
.. Get started
... External link: link:http://source.android.com/submit-patches/workflow[Default Android Workflow]
.. Web
... Registering a new Gerrit account
... link:user-search.html[Searching Changes]
... link:user-notify.html[Subscribing to Email Notifications]
.. Ssh
... ssh connection details
... link:cmd-index.html[Command Line Tools]
.. Git
... git connection details
... Commands, scenarios
.... link:user-upload.html[Uploading Changes]
.... link:error-messages.html[Error Messages]
... Changes
.... link:user-changeid.html[Change-Id Lines]
.... link:user-signedoffby.html[Signed-off-by Lines]
... Patch sets
. Project management
.. link:project-setup.html[Project Setup]
.. link:access-control.html[Access Controls]
... link:config-labels.html[Review Labels]
.. Multi-project management
... Submodules
... Repo
.. Prolog rules
... link:prolog-cookbook.html[Prolog Cookbook]
... link:prolog-change-facts.html[Prolog Facts for Gerrit Changes]
.. link:user-submodules.html[Subscribing to Git Submodules]
.. Project sunset
. Customization and integration
.. link:user-dashboards.html[Dashboards]
.. link:rest-api.html[REST API]
.. link:config-gitweb.html[Gitweb Integration]
.. link:config-themes.html[Themes]
.. link:config-sso.html[Single Sign-On Systems]
.. link:config-hooks.html[Hooks]
.. link:config-mail.html[Mail Templates]
.. link:config-cla.html[Contributor Agreements]
. Server administration
.. link:config-gerrit.html[System Settings]
.. Backup
.. Performance tuning
... link:cmd-index.html[Command Line Tools]
... Reading show-caches efficiently
... How to read stats from the JVM
.. High availability
.. Replication
.. Plugins
.. link:dev-design.html[System Design]
.. link:config-contact.html[User Contact Information]
.. link:config-reverseproxy.html[Reverse Proxy]
.. link:config-auto-site-initialization.html[Automatic Site Initialization on Startup]
.. link:pgm-index.html[Server Side Administrative Tools]
. Developer
.. link:dev-readme.html[Developer Setup]
.. link:dev-buck.html[Building with Buck]
.. link:dev-eclipse.html[Eclipse Setup]
.. link:dev-contributing.html[Contributing to Gerrit]
.. Documentation formatting guide for contributions
.. link:dev-design.html[System Design]
.. link:i18n-readme.html[i18n Support]
.. Plugin development
... link:dev-plugins.html[Developing Plugins]
... link:js-api.html[JavaScript Plugin API]
... link:config-validation.html[Commit Validation]
. Maintainer
.. link:dev-release.html[Developer Release]
.. link:dev-release-subproject.html[Developer Subproject Release]
Resources
---------
* link:http://code.google.com/p/gerrit/[Homepage]
* link:http://code.google.com/p/gerrit/downloads/list[Downloads]
* link:http://code.google.com/p/gerrit/issues/list[Issue Tracking]
* link:http://code.google.com/p/gerrit/source/checkout[Source Code]
* link:http://code.google.com/p/gerrit/wiki/Background[A History of Gerrit Code Review]