Here's some reference information on Gerrit's scalability and hardware requirements, file/directory structure, database, ports and connectivity.
Sub-directories of GERRIT_SITE (/opt/collabnet/gerrit):
- GERRIT_SITE
- .ssh: contains the SSH key for the gerrit user; generated during installation and needs to be backed up.
- bin: binaries, startup script
- gerrit.war: the main Gerrit service
- gerrit-sync.jar: the Gerrit-TeamForge synchronization service
- gerrit.sh: SYSV-style init script; launches and shuts down; linked to /etc/init.d/gerrit
- cache: disk cache; does not need to be backed up; can always be re-generated on the fly.
- etc: contains all configuration information; needs to be backed up.
- gerrit.config: Gerrit's main configuration file
- secure.config: contains obfuscated passwords and secrets
- log4j-ng.properties: contains logging settings in log4j format
- TeamForgeGerritMappings.xml: defines how TeamForge access permissions are mapped to Gerrit access rights
- GerritSite.css: .css file for Gerrit Web interface branding
- GerritSiteFooter.html: renders the customized footer in the Gerrit Web interface
- lib: libraries, potentially customer-specific extensions, treat like the bin directory
- logs: Gerrit log files; default configuration rotates logs daily, gzips old logs; debug files are rotated after they reach 10 MB; we keep 10 copies. You can make changes in Gerrit’s log4j-ng.properties file in /opt/collabnet/gerrit/etc.
- audit.log: audit events
- system.log: INFO-level logging
- sshd.log: logs connections to Gerrit's SSH port (not system shell SSH)
- *.gc.log: information on garbage collector usage
Note: In co-hosted mode, TeamForge log rotation behavior will be used as default.
- plugins: The Gerrit plugins directory includes jar files for all CollabNet plugins — TeamForge-Sync, TeamForge-History Protection and so on.
- static: The content of this directory is served as gerrit/static/ to http clients. You can include logos and other custom content you refer to in your branding here. By default, it contains the schema for the TeamForge-to-Gerrit access right mapping file which can be accessed from a browser at http://<Git Integration server>/gerrit/static/TeamForgeGerritMappings-8.0.0.xsd
You need to back up this directory if it includes custom content.
- doc: contains README-NG.pdf, gerrit.config and log4j-ng properties templates.
- /gitroot: default location for Git repositories. The default location can be changed using the setting in gerrit.config or by symlinking the directory. You need to back up this directory.
host reviewdb gerrit samehost md5
host all all 127.0.0.1/32 identIf it exists, you need to comment it out (using #) to avoid clashing with this line inserted by installer:
host reviewdb gerrit samehost md5
In the Local (or co-hosted mode), TeamForge talks to the Gerrit REST API over localhost. Gerrit talks to TeamForge over its default SOAP URL.
The Git integration needs bidirectional connectivity to the TeamForge host. In the Remote (or distributed) mode, TeamForge talks to the Gerrit REST API over an Apache proxy rule (SSL-enabled if Apache is SSL-enabled on the integration server where Gerrit is running). Gerrit talks to TeamForge over its default SOAP URL.
Do not expose this port to the outside.