Hector Oswaldo Caballero | 28ed83b | 2018-08-06 07:40:18 -0400 | [diff] [blame] | 1 | |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 2 | @PLUGIN@ Configuration |
| 3 | ========================= |
| 4 | |
Hector Oswaldo Caballero | 28ed83b | 2018-08-06 07:40:18 -0400 | [diff] [blame] | 5 | The @PLUGIN@ plugin must be installed on all the instances and the following fields |
Hugo Arès | a897ed8 | 2017-05-31 11:47:03 -0400 | [diff] [blame] | 6 | should be specified in `$site_path/etc/@PLUGIN@.config` file: |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 7 | |
Hugo Arès | a897ed8 | 2017-05-31 11:47:03 -0400 | [diff] [blame] | 8 | File '@PLUGIN@.config' |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 9 | -------------------- |
| 10 | |
Luca Milanesio | 7775217 | 2019-02-11 17:21:14 +0000 | [diff] [blame] | 11 | ### Static definition of the multi-site nodes. |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 12 | |
Luca Milanesio | 716282b | 2018-02-19 15:18:36 -0800 | [diff] [blame] | 13 | ``` |
Christian Halstrick | 75b5432 | 2017-05-04 16:45:19 +0200 | [diff] [blame] | 14 | [main] |
Luca Milanesio | 716282b | 2018-02-19 15:18:36 -0800 | [diff] [blame] | 15 | sharedDirectory = /directory/accessible/from/both/instances |
Luca Milanesio | acb6787 | 2018-02-20 15:59:34 -0800 | [diff] [blame] | 16 | [autoReindex] |
| 17 | enabled = false |
Christian Halstrick | 75b5432 | 2017-05-04 16:45:19 +0200 | [diff] [blame] | 18 | [peerInfo] |
Luca Milanesio | 716282b | 2018-02-19 15:18:36 -0800 | [diff] [blame] | 19 | strategy = static |
| 20 | [peerInfo "static"] |
Hector Oswaldo Caballero | 28ed83b | 2018-08-06 07:40:18 -0400 | [diff] [blame] | 21 | url = first_target_instance_url |
| 22 | url = second_target_instance_url |
Christian Halstrick | 75b5432 | 2017-05-04 16:45:19 +0200 | [diff] [blame] | 23 | [http] |
Luca Milanesio | 716282b | 2018-02-19 15:18:36 -0800 | [diff] [blame] | 24 | user = username |
| 25 | password = password |
Luca Milanesio | 9cdf46a | 2019-02-16 00:56:01 +0000 | [diff] [blame^] | 26 | |
| 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 Milanesio | 716282b | 2018-02-19 15:18:36 -0800 | [diff] [blame] | 40 | ``` |
| 41 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 42 | ```main.sharedDirectory``` |
Hugo Arès | a897ed8 | 2017-05-31 11:47:03 -0400 | [diff] [blame] | 43 | : Path to a directory accessible from both master instances. |
Saša Živkov | c44904b | 2017-06-19 15:49:19 +0200 | [diff] [blame] | 44 | 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 Živkov | 31304ac | 2017-05-18 17:14:09 +0200 | [diff] [blame] | 47 | directory is "/gerrit/root/shared/dir". When not specified, the default |
| 48 | is "shared". |
Hugo Arès | a897ed8 | 2017-05-31 11:47:03 -0400 | [diff] [blame] | 49 | |
Luca Milanesio | acb6787 | 2018-02-20 15:59:34 -0800 | [diff] [blame] | 50 | ```autoReindex.enabled``` |
Luca Milanesio | 7775217 | 2019-02-11 17:21:14 +0000 | [diff] [blame] | 51 | : Enable the tracking of the latest change indexed under data/multi-site |
Luca Milanesio | acb6787 | 2018-02-20 15:59:34 -0800 | [diff] [blame] | 52 | 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 Milanesio | 6c74c23 | 2019-01-03 23:52:13 +0000 | [diff] [blame] | 60 | 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 Milanesio | acb6787 | 2018-02-20 15:59:34 -0800 | [diff] [blame] | 71 | 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 Milanesio | 6c74c23 | 2019-01-03 23:52:13 +0000 | [diff] [blame] | 76 | Delay is expressed in Gerrit time values as in [autoReindex.delay](#autoReindex.delay). |
Luca Milanesio | acb6787 | 2018-02-20 15:59:34 -0800 | [diff] [blame] | 77 | When not specified, polling of conditional reindexing is disabled. |
| 78 | |
| 79 | ```autoReindex.interval``` |
Luca Milanesio | 7775217 | 2019-02-11 17:21:14 +0000 | [diff] [blame] | 80 | : Enable the tracking of the latest change indexed under data/multi-site |
Luca Milanesio | acb6787 | 2018-02-20 15:59:34 -0800 | [diff] [blame] | 81 | 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 Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 86 | ```peerInfo.strategy``` |
Luca Milanesio | 72ccd5f | 2018-11-04 18:57:09 +0000 | [diff] [blame] | 87 | : Strategy to find other peers. The only supported strategy is `static`. |
Christian Halstrick | 75b5432 | 2017-05-04 16:45:19 +0200 | [diff] [blame] | 88 | Defaults to `static`. |
| 89 | * The `static` strategy allows to staticly configure the peer gerrit instance using |
| 90 | the configuration parameter `peerInfo.static.url`. |
Christian Halstrick | 75b5432 | 2017-05-04 16:45:19 +0200 | [diff] [blame] | 91 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 92 | ```peerInfo.static.url``` |
Hector Oswaldo Caballero | 28ed83b | 2018-08-06 07:40:18 -0400 | [diff] [blame] | 93 | : 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 Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 95 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 96 | ```http.user``` |
David Pursehouse | 9a778a5 | 2017-06-30 10:00:56 +0900 | [diff] [blame] | 97 | : Username to connect to the peer instance. |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 98 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 99 | ```http.password``` |
David Pursehouse | 9a778a5 | 2017-06-30 10:00:56 +0900 | [diff] [blame] | 100 | : Password to connect to the peer instance. |
Hugo Arès | 4bde025 | 2017-03-10 14:45:15 -0500 | [diff] [blame] | 101 | |
Hugo Arès | 7eeb21e | 2017-03-02 22:48:15 -0500 | [diff] [blame] | 102 | @PLUGIN@ plugin uses REST API calls to keep the target instance in-sync. It |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 103 | is possible to customize the parameters of the underlying http client doing these |
| 104 | calls by specifying the following fields: |
| 105 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 106 | ```http.connectionTimeout``` |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 107 | : 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 Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 110 | ```http.socketTimeout``` |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 111 | : 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 Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 115 | ```http.maxTries``` |
Hugo Arès | 7eeb21e | 2017-03-02 22:48:15 -0500 | [diff] [blame] | 116 | : 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ès | 895722e | 2018-04-17 16:09:17 +0200 | [diff] [blame] | 118 | specified, the default value is 360. After this number of failed tries, an |
Hugo Arès | 7eeb21e | 2017-03-02 22:48:15 -0500 | [diff] [blame] | 119 | error is logged. |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 120 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 121 | ```http.retryInterval``` |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 122 | : The interval of time in milliseconds between the subsequent auto-retries. |
Hugo Arès | 895722e | 2018-04-17 16:09:17 +0200 | [diff] [blame] | 123 | When not specified, the default value is set to 10000ms. |
| 124 | |
| 125 | NOTE: the default settings for `http.timeout` and `http.maxTries` ensure that |
| 126 | the plugin will keep retrying to forward a message for one hour. |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 127 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 128 | ```cache.synchronize``` |
Owen Li | 6682300 | 2017-05-31 15:44:11 -0400 | [diff] [blame] | 129 | : Whether to synchronize cache evictions. |
| 130 | Defaults to true. |
| 131 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 132 | ```cache.threadPoolSize``` |
Hugo Arès | a897ed8 | 2017-05-31 11:47:03 -0400 | [diff] [blame] | 133 | : Maximum number of threads used to send cache evictions to the target instance. |
Hugo Arès | 02843f6 | 2018-04-20 08:57:25 +0200 | [diff] [blame] | 134 | Defaults to 4. |
Hugo Arès | a897ed8 | 2017-05-31 11:47:03 -0400 | [diff] [blame] | 135 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 136 | ```cache.pattern``` |
David Pursehouse | affefd9 | 2017-08-03 17:18:30 +0200 | [diff] [blame] | 137 | : 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 Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 143 | ```event.synchronize``` |
Owen Li | 6682300 | 2017-05-31 15:44:11 -0400 | [diff] [blame] | 144 | : Whether to synchronize stream events. |
| 145 | Defaults to true. |
| 146 | |
Luca Milanesio | f51d7be | 2018-12-15 00:54:03 +0000 | [diff] [blame] | 147 | ```index.numStripedLocks``` |
| 148 | : Number of striped locks to use for during secondary indexes reindex. |
| 149 | Defaults to 10 |
| 150 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 151 | ```index.synchronize``` |
Owen Li | 6682300 | 2017-05-31 15:44:11 -0400 | [diff] [blame] | 152 | : Whether to synchronize secondary indexes. |
| 153 | Defaults to true. |
| 154 | |
Luca Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 155 | ```index.threadPoolSize``` |
Hector Oswaldo Caballero | 74a07ab | 2015-08-10 17:00:43 -0400 | [diff] [blame] | 156 | : Maximum number of threads used to send index events to the target instance. |
Hugo Arès | 02843f6 | 2018-04-20 08:57:25 +0200 | [diff] [blame] | 157 | Defaults to 4. |
Hugo Arès | 7eeb21e | 2017-03-02 22:48:15 -0500 | [diff] [blame] | 158 | |
Luca Milanesio | 768a4ac | 2018-06-05 23:39:11 +0100 | [diff] [blame] | 159 | ```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 Milanesio | 22ffb22 | 2018-02-21 10:28:30 -0800 | [diff] [blame] | 170 | ```healthcheck.enable``` |
David Pursehouse | 3903354 | 2017-11-30 17:02:24 +0900 | [diff] [blame] | 171 | : Whether to enable the health check endpoint. Defaults to 'true'. |
Luca Milanesio | 9cdf46a | 2019-02-16 00:56:01 +0000 | [diff] [blame^] | 172 | |
| 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 |