Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 1 | = Gerrit Code Review - Automatic Site Initialization on Startup |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 2 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 3 | == Description |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 4 | |
Dave Borowitz | 7141c94 | 2018-12-18 13:04:37 -0800 | [diff] [blame] | 5 | Gerrit supports automatic site initialization on server startup when Gerrit runs |
| 6 | in a servlet container. Both creation of a new site and upgrade of an existing |
| 7 | site are supported. By default, all packaged plugins will be installed when |
| 8 | Gerrit is deployed in a servlet container and the location of the Gerrit |
| 9 | distribution can be determined at runtime. It is also possible to install only a |
| 10 | subset of packaged plugins or not install any plugins. |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 11 | |
Dave Borowitz | 7141c94 | 2018-12-18 13:04:37 -0800 | [diff] [blame] | 12 | This feature may be useful for such setups where Gerrit administrators don't |
| 13 | have direct access to the file system of the server where Gerrit should be |
| 14 | deployed and, therefore, cannot perform the init from their local machine prior |
| 15 | to deploying Gerrit on such a server. It may also make deployment and testing in |
| 16 | a local servlet container faster to set up as the init step could be skipped. |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 17 | |
Yuxuan 'fishy' Wang | 61698b1 | 2013-12-20 12:55:51 -0800 | [diff] [blame] | 18 | == Gerrit Configuration |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 19 | |
Dave Borowitz | 7141c94 | 2018-12-18 13:04:37 -0800 | [diff] [blame] | 20 | In order to perform site initialization, define `gerrit.site_path` with the path |
| 21 | to your site. If the site already exists, this is the only required property. |
| 22 | If your site does not yet exist, set the `gerrit.init` system property to |
| 23 | automatically initialize the site. |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 24 | |
Dave Borowitz | 7141c94 | 2018-12-18 13:04:37 -0800 | [diff] [blame] | 25 | During initialization, if the `gerrit.install_plugins` property is not defined, |
| 26 | then all packaged plugins will be installed. If it is defined, then it is parsed |
| 27 | as a comma-separated list of plugin names to install. If the value is an empty |
| 28 | string then no plugins will be installed. |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 29 | |
Dave Borowitz | 7141c94 | 2018-12-18 13:04:37 -0800 | [diff] [blame] | 30 | === Example |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 31 | |
Dave Borowitz | 7141c94 | 2018-12-18 13:04:37 -0800 | [diff] [blame] | 32 | Prepare Tomcat so that a site is initialized at a given path (if the site |
| 33 | doesn't exist yet), installing all packaged plugins. |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 34 | |
| 35 | ---- |
| 36 | $ export CATALINA_OPTS='-Dgerrit.init -Dgerrit.site_path=/path/to/site' |
| 37 | $ catalina.sh start |
| 38 | ---- |
| 39 | |
Sasa Zivkov | e5fc90e | 2013-05-10 15:12:13 +0200 | [diff] [blame] | 40 | GERRIT |
| 41 | ------ |
| 42 | Part of link:index.html[Gerrit Code Review] |
Yuxuan 'fishy' Wang | 99cb68d | 2013-10-31 17:26:00 -0700 | [diff] [blame] | 43 | |
| 44 | SEARCHBOX |
| 45 | --------- |