blob: 0c2990665066986043487d64ee2b864344fa318a [file] [log] [blame] [view]
Hector Oswaldo Caballero28ed83b2018-08-06 07:40:18 -04001
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -04002@PLUGIN@ Configuration
3=========================
4
Hector Oswaldo Caballero28ed83b2018-08-06 07:40:18 -04005The @PLUGIN@ plugin must be installed on all the instances and the following fields
Hugo Arèsa897ed82017-05-31 11:47:03 -04006should be specified in `$site_path/etc/@PLUGIN@.config` file:
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -04007
Hugo Arèsa897ed82017-05-31 11:47:03 -04008File '@PLUGIN@.config'
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -04009--------------------
10
Luca Milanesio77752172019-02-11 17:21:14 +000011### Static definition of the multi-site nodes.
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -040012
Luca Milanesio716282b2018-02-19 15:18:36 -080013```
Christian Halstrick75b54322017-05-04 16:45:19 +020014[main]
Luca Milanesio716282b2018-02-19 15:18:36 -080015 sharedDirectory = /directory/accessible/from/both/instances
Luca Milanesioacb67872018-02-20 15:59:34 -080016[autoReindex]
17 enabled = false
Christian Halstrick75b54322017-05-04 16:45:19 +020018[peerInfo]
Luca Milanesio716282b2018-02-19 15:18:36 -080019 strategy = static
20[peerInfo "static"]
Hector Oswaldo Caballero28ed83b2018-08-06 07:40:18 -040021 url = first_target_instance_url
22 url = second_target_instance_url
Christian Halstrick75b54322017-05-04 16:45:19 +020023[http]
Luca Milanesio716282b2018-02-19 15:18:36 -080024 user = username
25 password = password
Luca Milanesio9cdf46a2019-02-16 00:56:01 +000026
27[kafka]
28 bootstrapServers = kafka-1:9092,kafka-2:9092,kafka-3:9092
29 eventTopic = gerrit_index
30
31[kafka "publisher"]
32 indexEventTopic = gerrit_index
33 streamEventTopic = gerrit_stream
34 enable = true
35
36[kafka "subscriber"]
37 enable = true
38 pollingIntervalMs = 1000
39 autoCommitIntervalMs = 1000
Luca Milanesio716282b2018-02-19 15:18:36 -080040```
41
Luca Milanesio22ffb222018-02-21 10:28:30 -080042```main.sharedDirectory```
Hugo Arèsa897ed82017-05-31 11:47:03 -040043: Path to a directory accessible from both master instances.
Saša Živkovc44904b2017-06-19 15:49:19 +020044 When given as a relative path, then it is resolved against the $SITE_PATH
45 or Gerrit server. For example, if $SITE_PATH is "/gerrit/root" and
46 sharedDirectory is given as "shared/dir" then the real path of the shared
Saša Živkov31304ac2017-05-18 17:14:09 +020047 directory is "/gerrit/root/shared/dir". When not specified, the default
48 is "shared".
Hugo Arèsa897ed82017-05-31 11:47:03 -040049
Luca Milanesioacb67872018-02-20 15:59:34 -080050```autoReindex.enabled```
Luca Milanesio77752172019-02-11 17:21:14 +000051: Enable the tracking of the latest change indexed under data/multi-site
Luca Milanesioacb67872018-02-20 15:59:34 -080052 for each of the indexes. At startup scans all the changes, accounts and groups
53 and reindex the ones that have been updated by other nodes while the server was down.
54 When not specified, the default is "false", that means no automatic tracking
55 and indexing at start.
56
57```autoReindex.delay```
58: When autoReindex is enabled, indicates the delay aftere the plugin startup,
59 before triggering the conditional reindexing of all changes, accounts and groups.
Luca Milanesio6c74c232019-01-03 23:52:13 +000060 Delay is expressed in Gerrit time values:
61 * s, sec, second, seconds
62 * m, min, minute, minutes
63 * h, hr, hour, hours
64 * d, day, days
65 * w, week, weeks (`1 week` is treated as `7 days`)
66 * mon, month, months (`1 month` is treated as `30 days`)
67 * y, year, years (`1 year` is treated as `365 days`)
68 If a time unit suffix is not specified, `hours` is assumed.
69 Defaults to 24 hours.
70
Luca Milanesioacb67872018-02-20 15:59:34 -080071 When not specified, the default is "10 seconds".
72
73```autoReindex.pollInterval```
74: When autoReindex is enabled, indicates the interval between the conditional
75 reindexing of all changes, accounts and groups.
Luca Milanesio6c74c232019-01-03 23:52:13 +000076 Delay is expressed in Gerrit time values as in [autoReindex.delay](#autoReindex.delay).
Luca Milanesioacb67872018-02-20 15:59:34 -080077 When not specified, polling of conditional reindexing is disabled.
78
79```autoReindex.interval```
Luca Milanesio77752172019-02-11 17:21:14 +000080: Enable the tracking of the latest change indexed under data/multi-site
Luca Milanesioacb67872018-02-20 15:59:34 -080081 for each of the indexes. At startup scans all the changes, accounts and groups
82 and reindex the ones that have been updated by other nodes while the server was down.
83 When not specified, the default is "false", that means no automatic tracking
84 and indexing at start.
85
Luca Milanesio22ffb222018-02-21 10:28:30 -080086```peerInfo.strategy```
Luca Milanesio72ccd5f2018-11-04 18:57:09 +000087: Strategy to find other peers. The only supported strategy is `static`.
Christian Halstrick75b54322017-05-04 16:45:19 +020088 Defaults to `static`.
89* The `static` strategy allows to staticly configure the peer gerrit instance using
90the configuration parameter `peerInfo.static.url`.
Christian Halstrick75b54322017-05-04 16:45:19 +020091
Luca Milanesio22ffb222018-02-21 10:28:30 -080092```peerInfo.static.url```
Hector Oswaldo Caballero28ed83b2018-08-06 07:40:18 -040093: Specify the URL for the peer instance. If more than one peer instance is to be
94 configured, add as many url entries as necessary.
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -040095
Luca Milanesio22ffb222018-02-21 10:28:30 -080096```http.user```
David Pursehouse9a778a52017-06-30 10:00:56 +090097: Username to connect to the peer instance.
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -040098
Luca Milanesio22ffb222018-02-21 10:28:30 -080099```http.password```
David Pursehouse9a778a52017-06-30 10:00:56 +0900100: Password to connect to the peer instance.
Hugo Arès4bde0252017-03-10 14:45:15 -0500101
Hugo Arès7eeb21e2017-03-02 22:48:15 -0500102@PLUGIN@ plugin uses REST API calls to keep the target instance in-sync. It
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -0400103is possible to customize the parameters of the underlying http client doing these
104calls by specifying the following fields:
105
Luca Milanesio22ffb222018-02-21 10:28:30 -0800106```http.connectionTimeout```
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -0400107: Maximum interval of time in milliseconds the plugin waits for a connection
108 to the target instance. When not specified, the default value is set to 5000ms.
109
Luca Milanesio22ffb222018-02-21 10:28:30 -0800110```http.socketTimeout```
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -0400111: Maximum interval of time in milliseconds the plugin waits for a response from the
112 target instance once the connection has been established. When not specified,
113 the default value is set to 5000ms.
114
Luca Milanesio22ffb222018-02-21 10:28:30 -0800115```http.maxTries```
Hugo Arès7eeb21e2017-03-02 22:48:15 -0500116: Maximum number of times the plugin should attempt when calling a REST API in
117 the target instance. Setting this value to 0 will disable retries. When not
Hugo Arès895722e2018-04-17 16:09:17 +0200118 specified, the default value is 360. After this number of failed tries, an
Hugo Arès7eeb21e2017-03-02 22:48:15 -0500119 error is logged.
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -0400120
Luca Milanesio22ffb222018-02-21 10:28:30 -0800121```http.retryInterval```
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -0400122: The interval of time in milliseconds between the subsequent auto-retries.
Hugo Arès895722e2018-04-17 16:09:17 +0200123 When not specified, the default value is set to 10000ms.
124
125NOTE: the default settings for `http.timeout` and `http.maxTries` ensure that
126the plugin will keep retrying to forward a message for one hour.
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -0400127
Luca Milanesio22ffb222018-02-21 10:28:30 -0800128```cache.synchronize```
Owen Li66823002017-05-31 15:44:11 -0400129: Whether to synchronize cache evictions.
130 Defaults to true.
131
Luca Milanesio22ffb222018-02-21 10:28:30 -0800132```cache.threadPoolSize```
Hugo Arèsa897ed82017-05-31 11:47:03 -0400133: Maximum number of threads used to send cache evictions to the target instance.
Hugo Arès02843f62018-04-20 08:57:25 +0200134 Defaults to 4.
Hugo Arèsa897ed82017-05-31 11:47:03 -0400135
Luca Milanesio22ffb222018-02-21 10:28:30 -0800136```cache.pattern```
David Pursehouseaffefd92017-08-03 17:18:30 +0200137: Pattern to match names of custom caches for which evictions should be
138 forwarded (in addition to the core caches that are always forwarded). May be
139 specified more than once to add multiple patterns.
140 Defaults to an empty list, meaning only evictions of the core caches are
141 forwarded.
142
Luca Milanesio22ffb222018-02-21 10:28:30 -0800143```event.synchronize```
Owen Li66823002017-05-31 15:44:11 -0400144: Whether to synchronize stream events.
145 Defaults to true.
146
Luca Milanesiof51d7be2018-12-15 00:54:03 +0000147```index.numStripedLocks```
148: Number of striped locks to use for during secondary indexes reindex.
149 Defaults to 10
150
Luca Milanesio22ffb222018-02-21 10:28:30 -0800151```index.synchronize```
Owen Li66823002017-05-31 15:44:11 -0400152: Whether to synchronize secondary indexes.
153 Defaults to true.
154
Luca Milanesio22ffb222018-02-21 10:28:30 -0800155```index.threadPoolSize```
Hector Oswaldo Caballero74a07ab2015-08-10 17:00:43 -0400156: Maximum number of threads used to send index events to the target instance.
Hugo Arès02843f62018-04-20 08:57:25 +0200157 Defaults to 4.
Hugo Arès7eeb21e2017-03-02 22:48:15 -0500158
Luca Milanesio768a4ac2018-06-05 23:39:11 +0100159```index.maxTries```
160: Maximum number of times the plugin should attempt to reindex changes.
161 Setting this value to 0 will disable retries. After this number of failed tries,
162 an error is logged and the local index should be considered stale and needs
163 to be investigated and manually reindexed.
164 Defaults to 2.
165
166```index.retryInterval```
167: The interval of time in milliseconds between the subsequent auto-retries.
168 Defaults to 30000 (30 seconds).
169
Luca Milanesio22ffb222018-02-21 10:28:30 -0800170```healthcheck.enable```
David Pursehouse39033542017-11-30 17:02:24 +0900171: Whether to enable the health check endpoint. Defaults to 'true'.
Luca Milanesio9cdf46a2019-02-16 00:56:01 +0000172
173```kafka.bootstrapServers```
174: List of Kafka broker hosts:port to use for publishing events to the message broker
175
176```kafka.eventTopic```
177: Name of the Kafka topic to use for consuming indexing events
178
179```kafka.publisher.indexEventTopic```
180: Name of the Kafka topic to use for publishing indexing events
181 Defaults to GERRIT.EVENT.INDEX
182
183```kafka.publisher.streamEventTopic```
184: Name of the Kafka topic to use for publishing stream events
185 Defaults to GERRIT.EVENT.STREAM
186
187```kafka.publisher.enable```
188: Enable publishing events to Kafka
189
190```kafka.subscriber.enable```
191: Enable consuming of Kafka events
192
193```kafka.subscriber.pollingIntervalMs```
194: Polling interval for checking incoming events
195
196```kafka.subscriber.autoCommitIntervalMs```
197: Interval for committing incoming events automatically after consumption