gerrit/Documentation
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
..
images First Cut of Gerrit Walkthrough Introduction documentation. 2011-12-28 12:33:39 -07:00
man Add SSH command to set group members 2013-06-14 20:30:32 +02:00
.gitignore Move documentation to gerrit.googlecode.com website 2009-01-29 08:53:07 -08:00
access-control.txt Fix documentation 2013-08-29 15:14:50 -07:00
asciidoc.defs Switch from asciidoc to asciidoctor 2013-09-05 16:47:50 -07:00
BUCK Switch from asciidoc to asciidoctor 2013-09-05 16:47:50 -07:00
cmd-ban-commit.txt Add SSH command to ban commits 2012-03-30 16:12:42 +02:00
cmd-cherry-pick.txt Tell curl to follow redirects for commit-msg hook 2013-05-10 16:17:10 +01:00
cmd-create-account.txt Improve documentation of the create-account command 2013-08-24 12:10:25 +09:00
cmd-create-group.txt Fix and complete synopsis of commands in documentation 2012-07-16 13:53:22 +02:00
cmd-create-project.txt Add REBASE_IF_NECESSARY in documentation of add-project and set-project 2013-09-16 22:26:48 +09:00
cmd-flush-caches.txt Access control documentation: Flush caches capability 2012-03-21 17:43:29 +01:00
cmd-gc.txt Add SSH command to run Git garbage collection 2013-03-20 21:36:09 -07:00
cmd-gsql.txt Add gsql format that returns result set as single Json object 2013-08-17 00:46:36 +02:00
cmd-hook-commit-msg.txt Document that the commit-msg hook honors gerrit.createChangeId 2013-08-08 15:11:31 +09:00
cmd-index.txt Improve documentation of the create-account command 2013-08-24 12:10:25 +09:00
cmd-kill.txt Access control documentation: Kill and priority capabilities 2012-03-21 17:43:29 +01:00
cmd-ls-groups.txt Support to check via REST if a group is owned by the calling user 2013-02-08 14:48:38 +01:00
cmd-ls-members.txt Added a ls-members command to the ssh daemon. 2013-05-08 07:51:59 -07:00
cmd-ls-projects.txt ls-projects: Add option to list projects on which a certain group is used 2012-08-31 15:53:04 +02:00
cmd-ls-user-refs.txt Fix ls-user-refs command name in documentation 2013-05-01 12:19:28 +02:00
cmd-plugin-enable.txt Add ssh command to enable plugins 2012-07-26 16:24:47 -05:00
cmd-plugin-install.txt Document SSH commands gerrit plugin {ls|install|remove|reload} 2012-07-17 16:07:02 +02:00
cmd-plugin-ls.txt Document SSH commands gerrit plugin {ls|install|remove|reload} 2012-07-17 16:07:02 +02:00
cmd-plugin-reload.txt Document that on reload of a plugin a new plugin configuration gets active 2012-07-18 12:48:36 +02:00
cmd-plugin-remove.txt Document SSH commands gerrit plugin {ls|install|remove|reload} 2012-07-17 16:07:02 +02:00
cmd-query.txt Add clarifications in the documentation of the query command 2013-05-02 14:29:41 +00:00
cmd-receive-pack.txt Add options to refs/for/ magic branch syntax 2013-02-27 16:07:30 -08:00
cmd-rename-group.txt Add new SSH command to rename groups 2011-10-27 00:28:11 +02:00
cmd-review.txt Remove --force-message option from the review command 2013-05-07 10:44:55 +01:00
cmd-set-account.txt Update HTTP password from SSH commands. 2012-09-13 09:15:02 +02:00
cmd-set-members.txt Add SSH command to set group members 2013-06-14 20:30:32 +02:00
cmd-set-project-parent.txt Support to reparent all children of a parent project 2011-11-16 09:34:26 +01:00
cmd-set-project.txt Add REBASE_IF_NECESSARY in documentation of add-project and set-project 2013-09-16 22:26:48 +09:00
cmd-set-reviewers.txt Fix and complete synopsis of commands in documentation 2012-07-16 13:53:22 +02:00
cmd-show-caches.txt Add --wide option to show-connections 2013-06-11 01:36:31 -05:00
cmd-show-connections.txt Add --wide option to show-connections 2013-06-11 01:36:31 -05:00
cmd-show-queue.txt Fix spelling mistakes in the documentation 2013-06-24 10:16:28 +09:00
cmd-stream-events.txt Fix typos in stream-events documentation 2013-09-10 20:19:40 +09:00
cmd-suexec.txt suexec: Honor Run As capability like HTTP REST API 2013-06-11 13:56:13 -07:00
cmd-test-submit-rule.txt Add REST APIs to test submit_rule and submit_filter 2013-03-04 11:13:36 -08:00
cmd-test-submit-type.txt Add documentation for the SSH 'test-submit type' command 2013-03-26 10:50:19 +01:00
cmd-version.txt Fix documentation 2013-08-29 15:14:50 -07:00
config-auto-site-initialization.txt Optionally, initialize site from WebAppInitializer. 2013-09-18 12:52:17 -07:00
config-cla.txt Minor documentation tidy-up 2013-01-07 17:30:55 +09:00
config-contact.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
config-gerrit.txt Add Switch Account link to the current user popdown 2013-08-29 23:59:27 -07:00
config-gitweb.txt Remove non-ASCII character from documentation 2013-05-10 10:23:31 -07:00
config-hooks.txt Send event and execute hooks when topic is changed 2013-07-12 15:24:29 +09:00
config-labels.txt Support branch specific labels 2013-09-13 13:57:44 +08:00
config-login-register.txt Fix documentation 2013-08-29 15:14:50 -07:00
config-mail.txt Update documentation of new change and patch set mail notifications 2013-07-11 22:32:36 +09:00
config-reverseproxy.txt Documentation: Reverse Proxy Configuration 2013-06-05 08:55:10 +02:00
config-sso.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
config-themes.txt Allow projects to specify themes 2013-04-10 10:47:03 -07:00
config-validation.txt Add merge validation interface 2013-08-08 11:32:21 +09:00
config.defs Switch from asciidoc to asciidoctor 2013-09-05 16:47:50 -07:00
database-setup.txt Fix documentation 2013-08-29 15:14:50 -07:00
dev-buck.txt Explain how to create symbolic link for buckd in buck install instructions 2013-09-16 07:31:16 +00:00
dev-contributing.txt Document how to set commit-msg hook for plugin submodules 2013-07-10 22:10:20 +09:00
dev-design.txt Fix spelling mistakes in the documentation 2013-06-24 10:16:28 +09:00
dev-eclipse.txt Delete Maven based build 2013-05-21 20:28:56 -07:00
dev-plugins.txt Add syntax highlighting for source code examples in documentation 2013-09-09 07:30:12 +00:00
dev-readme.txt Fix path to gerrit war file in developer documentation 2013-06-17 15:44:20 +02:00
dev-release-deploy-config.txt Update URLs for Google Cloud Storage 2013-06-21 11:01:45 -07:00
dev-release-subproject.txt Update URLs for Google Cloud Storage 2013-06-21 11:01:45 -07:00
dev-release.txt Fix documentation 2013-08-29 15:14:50 -07:00
dev-rest-api.txt Document how to send file content without conversion using curl 2013-05-30 17:03:31 +02:00
doc.css Switch from asciidoc to asciidoctor 2013-09-05 16:47:50 -07:00
error-branch-not-found.txt Adapt documentation to having 'Projects' as top level menu 2012-12-12 13:09:05 +01:00
error-change-closed.txt Add documentation of "change closed" error when using ssh review 2012-06-27 10:10:23 +02:00
error-change-does-not-belong-to-project.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-change-not-found.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-change-upload-blocked.txt Added explanation for "One or more refs/for/ ..." error 2011-02-03 08:53:46 +01:00
error-commit-already-exists.txt Add documentation of "commit already exists" error message 2012-12-11 17:54:13 +09:00
error-contains-banned-commit.txt Added explanation for "contains banned commit" error 2011-04-08 11:00:40 +02:00
error-has-duplicates.txt Fix documentation 2013-08-29 15:14:50 -07:00
error-invalid-author.txt Correct documentation of "invalid author/committer" errors 2012-06-26 09:24:47 +02:00
error-invalid-changeid-line.txt Clarify error messages related to commit message footer content 2012-11-13 12:18:16 +09:00
error-invalid-committer.txt Correct documentation of "invalid author/committer" errors 2012-06-26 09:24:47 +02:00
error-messages.txt Fix error documentation for NoSuchProjectException 2013-02-19 08:39:18 +01:00
error-missing-changeid.txt Add another case to the documentation of the missing Change-Id error 2013-07-05 09:21:35 +02:00
error-multiple-changeid-lines.txt Clarify error messages related to commit message footer content 2012-11-13 12:18:16 +09:00
error-no-changes-made.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-no-common-ancestry.txt Added explanation for "no common ancestry" error 2011-01-25 15:33:40 +01:00
error-no-new-changes.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-non-fast-forward.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-not-a-gerrit-administrator.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-not-allowed-to-upload-merges.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-not-permitted-to-create.txt Added explanation for "Not permitted to create" error 2011-02-04 10:22:50 +01:00
error-not-signed-off-by.txt Clarify error messages related to commit message footer content 2012-11-13 12:18:16 +09:00
error-not-valid-ref.txt Added explanation for "not valid ref" error 2011-01-12 07:12:36 -08:00
error-permission-denied.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-prohibited-by-gerrit.txt Remove wrong error message if pushing a new ref fails 2013-01-23 09:59:48 +01:00
error-project-not-found.txt Fix error documentation for NoSuchProjectException 2013-02-19 08:39:18 +01:00
error-push-fails-due-to-commit-message.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-squash-commits-first.txt Documentation: Various corrections 2012-06-12 14:54:54 +02:00
error-upload-denied.txt Access control documentation: Read and Submit 2012-01-23 16:46:57 +01:00
gen_licenses.py Rename licenses.py to gen_licenses.py 2013-05-18 14:08:02 -07:00
GEN-DOC-VERSION documentation: Fix version number to only consider x.y.z format 2010-02-22 14:14:53 -08:00
i18n-readme.txt Document new project-specific label configuration 2013-03-14 14:22:27 -07:00
index.txt Optionally, initialize site from WebAppInitializer. 2013-09-18 12:52:17 -07:00
install-j2ee.txt Optionally, initialize site from WebAppInitializer. 2013-09-18 12:52:17 -07:00
install-quick.txt Separate the initial user setup instructions to a shared file 2012-11-28 16:54:10 +09:00
install.txt Optionally, initialize site from WebAppInitializer. 2013-09-18 12:52:17 -07:00
intro-quick.txt Document new project-specific label configuration 2013-03-14 14:22:27 -07:00
js-api.txt Add syntax highlighting for source code examples in documentation 2013-09-09 07:30:12 +00:00
json.txt Bring draft status to PatchSetAttribute 2013-07-05 23:13:08 +02:00
pgm-daemon.txt Add --init option to Daemon to initialize site on daemon start. 2013-05-24 13:31:11 +02:00
pgm-gsql.txt Minor documentation formatting and white space errors fixed 2012-10-21 16:27:18 -07:00
pgm-index.txt Add initial documentation for the 'reindex' program 2013-08-23 12:32:07 +09:00
pgm-init.txt Add '--install-plugin' option to init step 2013-07-20 12:10:43 +02:00
pgm-LocalUsernamesToLowerCase.txt Enable case insensitive login to Gerrit WebUI for LDAP authentication 2011-10-26 23:01:57 +02:00
pgm-prolog-shell.txt Fix spelling mistakes in the documentation 2013-06-24 10:16:28 +09:00
pgm-reindex.txt Add documentation section for secondary index configuration 2013-08-23 17:06:38 +09:00
pgm-rulec.txt Fix spelling mistakes in Gerrit documentation 2011-10-27 02:24:06 +02:00
pgm-ScanTrackingIds.txt Fix spelling mistakes in Gerrit documentation 2011-10-27 02:24:06 +02:00
project-setup.txt Improve explanation of path conflicts in project config doc 2013-05-14 17:45:32 +09:00
prolog-change-facts.txt Expose basic commit statistics for the prolog rule engine. 2012-10-23 10:32:25 -04:00
prolog-cookbook.txt Fix spelling mistakes in the documentation 2013-06-24 10:16:28 +09:00
replace_macros.py Remove asciidoc.conf 2013-09-04 21:31:03 -07:00
rest-api-access.txt Include in ProjectAccessInfo whether the calling user is project owner 2013-07-12 13:21:15 +02:00
rest-api-accounts.txt Remove empty 'Endpoints' sections from REST API documentation 2013-09-03 10:51:53 +02:00
rest-api-changes.txt Add REST endpoints for draft changes 2013-09-17 00:26:53 +02:00
rest-api-config.txt Move start replication capability to replication plugin 2013-08-12 22:43:31 +02:00
rest-api-groups.txt Fixed invalid JSON in REST API examples 2013-08-06 16:25:24 -04:00
rest-api-plugins.txt Merge "Remove empty 'Endpoints' sections from REST API documentation" 2013-09-03 08:57:45 +00:00
rest-api-projects.txt Remove empty 'Endpoints' sections from REST API documentation 2013-09-03 10:51:53 +02:00
rest-api.txt Document REST endpoint to install plugins 2013-08-30 16:03:25 +02:00
user-changeid.txt Tell curl to follow redirects for commit-msg hook 2013-05-10 16:17:10 +01:00
user-dashboards.txt Document: Improve the dashboards document 2013-08-09 13:14:11 +08:00
user-notify.txt Add clarification of email notifications in documentation 2013-07-08 16:51:55 +09:00
user-search.txt Remove file: warning about searches 2013-09-13 14:12:09 -07:00
user-signedoffby.txt Fix spelling mistakes in the documentation 2013-06-24 10:16:28 +09:00
user-submodules.txt Improve submodule subscription documentation 2013-05-08 00:17:16 +02:00
user-upload.txt Allow opening new changes on existing commits 2013-04-22 11:57:40 -07:00