blob: cfca8b7bae2286ed1af7496779edae76242bc79f [file] [log] [blame]
[gerrit]
basePath = git
canonicalWebUrl = http://localhost
serverId = 0f56469f-dfe4-4f28-aca7-803eba7845e0
instanceId = {{ GERRIT_INSTANCE_ID }}
{% if MULTISITE_ENABLED is defined and MULTISITE_ENABLED == "true" %}
installDbModule = com.googlesource.gerrit.plugins.multisite.GitModule
installModule = com.googlesource.gerrit.plugins.multisite.Module
installModule = com.gerritforge.gerrit.eventbroker.BrokerApiModule
{% elif REFS_DB_ENABLED is defined and REFS_DB_ENABLED == "true" %}
installDbModule = com.ericsson.gerrit.plugins.highavailability.ValidationModule
installModule = com.gerritforge.gerrit.globalrefdb.validation.LibModule
{% endif %}
[core]
packedGitLimit = {{ JGIT_CACHE_SIZE }}
packedGitOpenFiles = {{ JGIT_OPEN_FILES }}
[database]
type = h2
database = db/ReviewDB
[index]
type = LUCENE
paginationType = NONE
[auth]
type = ldap
gitBasicAuth = true
{% if COOKIE_DOMAIN is defined %}
cookiedomain = .{{ COOKIE_DOMAIN }}
{% endif %}
[ldap]
server = {{ LDAP_SERVER }}
username = {{ LDAP_USERNAME }}
accountBase = {{ LDAP_ACCOUNT_BASE }}
accountPattern = {{ LDAP_ACCOUNT_PATTERN }}
accountFullName = displayName
accountEmailAddress = mail
groupBase = {{ LDAP_GROUP_BASE }}
{% if SMTP_SERVER %}
[sendemail]
smtpServer = {{ SMTP_SERVER }}
connectTimeout = 30 s
threadPoolSize = 2
smtpEncryption = {{ SMTP_ENCRYPTION }}
smtpServerPort = {{ SMTP_SERVER_PORT }}
sslVerify = {{ SMTP_SSL_VERIFY }}
smtpUser = {{ SMTP_USER }}
enable = true
from = ${user} (Gerrit) <gerrit@{{ SMTP_DOMAIN }}>
{% endif %}
[sshd]
listenAddress = *:29418
{% if SSHD_ADVERTISED_ADDRESS %}
advertisedAddress = {{ SSHD_ADVERTISED_ADDRESS }}
{% endif %}
[httpd]
listenUrl = http://*:8080/
requestLog = true
[cache]
directory = cache
[plugins]
allowRemoteAdmin = true
[container]
heapLimit = {{ GERRIT_HEAP_LIMIT }}
javaOptions = "-Dflogger.backend_factory=com.google.common.flogger.backend.log4j.Log4jBackendFactory#getInstance"
javaOptions = "-Dflogger.logging_context=com.google.gerrit.server.logging.LoggingContext#getInstance"
javaOptions = "-verbose:gc -XX:+PrintGCDetails -Xloggc:/var/gerrit/logs/gc_log"
{% if XRAY_ENABLED == "true" %}
javaOptions = "-javaagent:/tmp/disco/disco-java-agent.jar=pluginPath=/tmp/disco/disco-plugins:loggerfactory=software.amazon.disco.agent.reflect.logging.StandardOutputLoggerFactory:verbose"
{% endif %}
user = gerrit
javaHome = /usr/lib/jvm/jre
javaOptions = -Djava.security.egd=file:/dev/./urandom
[receive]
enableSignedPush = false
{% if METRICS_CLOUDWATCH_ENABLED == "true" %}
[plugin "metrics-reporter-cloudwatch"]
namespace = {{ METRICS_CLOUDWATCH_NAMESPACE }}
rate = {{ METRICS_CLOUDWATCH_RATE }}
jvmMetrics = {{ METRICS_CLOUDWATCH_JVM_ENABLED }}
initialDelay = {{ METRICS_CLOUDWATCH_INITIAL_DELAY }}
dryRun = {{ METRICS_CLOUDWATCH_DRY_RUN }}
{%- if METRICS_CLOUDWATCH_EXCLUDE_METRICS_LIST is defined and METRICS_CLOUDWATCH_EXCLUDE_METRICS_LIST|length %}
{%- set excludedMetricsList = METRICS_CLOUDWATCH_EXCLUDE_METRICS_LIST.split(',') %}
{%- for excluded in excludedMetricsList %}
excludeMetrics = {{ excluded }}
{%- endfor %}
{% endif %}
{% endif %}
{% if PROMETHEUS_BEARER_TOKEN is defined %}
[plugin "javamelody"]
allowTopMenu = true
prometheusBearerToken = {{ PROMETHEUS_BEARER_TOKEN }}
storage-directory = data/javamelody
[plugin "metrics-reporter-prometheus"]
prometheusBearerToken = {{ PROMETHEUS_BEARER_TOKEN }}
excludeMetrics = caches/.*
{% endif %}
{% if MULTISITE_ENABLED is defined and MULTISITE_ENABLED == "true" %}
[plugin "events-kafka"]
sendAsync = true
bootstrapServers = {{ MULTISITE_KAFKA_BROKERS }}
groupId = {{ GERRIT_INSTANCE_ID }}
numberOfSubscribers = 6
autoCommitIntervalMs = 1000
maxRequestSize = 10485760
securityProtocol = SSL
{% endif %}
{% if (MULTISITE_ENABLED is defined and MULTISITE_ENABLED == "true") or (REFS_DB_ENABLED is defined and REFS_DB_ENABLED == "true") %}
[plugin "aws-dynamodb-refdb"]
locksTableName = {{ DYNAMODB_LOCKS_TABLE_NAME }}
refsDbTableName = {{ DYNAMODB_REFS_TABLE_NAME }}
{% endif %}