blob: 2253ed0968fc3ce4209afcea77dbc60f13657b9d [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= Gerrit Code Review - Automatic Site Initialization on Startup
Sasa Zivkove5fc90e2013-05-10 15:12:13 +02002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== Description
Sasa Zivkove5fc90e2013-05-10 15:12:13 +02004
Dave Borowitz7141c942018-12-18 13:04:37 -08005Gerrit supports automatic site initialization on server startup when Gerrit runs
6in a servlet container. Both creation of a new site and upgrade of an existing
7site are supported. By default, all packaged plugins will be installed when
8Gerrit is deployed in a servlet container and the location of the Gerrit
9distribution can be determined at runtime. It is also possible to install only a
10subset of packaged plugins or not install any plugins.
Sasa Zivkove5fc90e2013-05-10 15:12:13 +020011
Dave Borowitz7141c942018-12-18 13:04:37 -080012This feature may be useful for such setups where Gerrit administrators don't
13have direct access to the file system of the server where Gerrit should be
14deployed and, therefore, cannot perform the init from their local machine prior
15to deploying Gerrit on such a server. It may also make deployment and testing in
16a local servlet container faster to set up as the init step could be skipped.
Sasa Zivkove5fc90e2013-05-10 15:12:13 +020017
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080018== Gerrit Configuration
Sasa Zivkove5fc90e2013-05-10 15:12:13 +020019
Dave Borowitz7141c942018-12-18 13:04:37 -080020In order to perform site initialization, define `gerrit.site_path` with the path
21to your site. If the site already exists, this is the only required property.
22If your site does not yet exist, set the `gerrit.init` system property to
23automatically initialize the site.
Sasa Zivkove5fc90e2013-05-10 15:12:13 +020024
Dave Borowitz7141c942018-12-18 13:04:37 -080025During initialization, if the `gerrit.install_plugins` property is not defined,
26then all packaged plugins will be installed. If it is defined, then it is parsed
27as a comma-separated list of plugin names to install. If the value is an empty
28string then no plugins will be installed.
Sasa Zivkove5fc90e2013-05-10 15:12:13 +020029
Dave Borowitz7141c942018-12-18 13:04:37 -080030=== Example
Sasa Zivkove5fc90e2013-05-10 15:12:13 +020031
Dave Borowitz7141c942018-12-18 13:04:37 -080032Prepare Tomcat so that a site is initialized at a given path (if the site
33doesn't exist yet), installing all packaged plugins.
Sasa Zivkove5fc90e2013-05-10 15:12:13 +020034
35----
36 $ export CATALINA_OPTS='-Dgerrit.init -Dgerrit.site_path=/path/to/site'
37 $ catalina.sh start
38----
39
Sasa Zivkove5fc90e2013-05-10 15:12:13 +020040GERRIT
41------
42Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070043
44SEARCHBOX
45---------