Add InstanceId configuration in gerrit.config
When Gerrit is setup in a multi-master / multi-site scenario,
the serverId must be the same for all Gerrit masters.
However, it may still be needed to name the different masters
with a configured stable string value, so that it is possible
to identify the different servers across the cluster.
Introduce a new configuration setting called 'gerrit.instanceId'
so that servers can be assigned with a stable-id.
Example of gerrit.config:
[gerrit]
instanceId = foo-instance-1
The value is optional because it is redundant for single Gerrit
master. The configured instanceId value is injected via the
@GerritInstanceId annotation.
Reference design: https://gerrit-review.googlesource.com/c/homepage/+/263710
Feature: Issue 12684
Change-Id: I9caa4e2faee4c0f8b9cdec8bc661fa0fa3299b91
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index d342990..9ba5a0d 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -2224,6 +2224,12 @@
Path for PolyGerrit's favicon after link:#gerrit.canonicalWebUrl[default URL],
including icon name and extension (.ico should be used).
+[[gerrit.instanceId]]gerrit.instanceId::
++
+Optional identifier for this Gerrit instance.
+Used to identify a specific instance within a group of Gerrit instances with the
+same `serverId` (i.e.: a Gerrit cluster).
+Unlike `instanceName` this value is not available in the email templates.
[[gerrit.instanceName]]gerrit.instanceName::
+