You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Gerrit: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Aklapper
m (replace redirect link by direct link)
imported>BCornwall
(Moved version checking command to Gerrit/Administration)
 
Line 31: Line 31:
[https://gerrit.devtools.wmflabs.org/ Gerrit test install] ''(hosted in [[Nova_Resource:Devtools|devtools Cloud VPS project]])''
[https://gerrit.devtools.wmflabs.org/ Gerrit test install] ''(hosted in [[Nova_Resource:Devtools|devtools Cloud VPS project]])''
}}
}}
We use Gerrit for our code review system for Git https://www.gerritcodereview.com/
We use [https://www.gerritcodereview.com/ Gerrit] for our code review system.


Gerrit is installed on [[gerrit1001]] in the prefix <code>/var/lib/gerrit2</code> and serves public request at https://gerrit.wikimedia.org/r/) . A replica runs on gerrit2001 which serves requests at https://gerrit-replica.wikimedia.org/r/ ), it is intended for a switch over and for various bots in order to offload the primary instance.
Gerrit is installed on [[gerrit1001]] in the prefix <code>/var/lib/gerrit2</code> and serves public request at https://gerrit.wikimedia.org/r/) . A replica runs on gerrit2001 which serves requests at https://gerrit-replica.wikimedia.org/r/ ), it is intended for a switch over and for various bots in order to offload the primary instance.
Line 42: Line 42:


Gerrit uses the LDAP instance shared with [[Help:Cloud Services introduction|Wikimedia Cloud Services]] for authentication. Accounts under <code>ou=people,dc=wikimedia,dc=org</code> and groups under <code>ou=groups,dc=wikimedia,dc=org</code> are exposed to Gerrit. The Gerrit account name is the <code>cn</code> field in LDAP.  In order to log in to Gerrit, a user needs to already have a Wikimedia developer account.  See [[Help:Getting Started]] for the process of getting a developer account.
Gerrit uses the LDAP instance shared with [[Help:Cloud Services introduction|Wikimedia Cloud Services]] for authentication. Accounts under <code>ou=people,dc=wikimedia,dc=org</code> and groups under <code>ou=groups,dc=wikimedia,dc=org</code> are exposed to Gerrit. The Gerrit account name is the <code>cn</code> field in LDAP.  In order to log in to Gerrit, a user needs to already have a Wikimedia developer account.  See [[Help:Getting Started]] for the process of getting a developer account.
To find out what version of Gerrit is running, you can use either of the following two commands:
java -jar /var/lib/gerrit2/review_site/bin/gerrit.war version
ssh -p 29418 gerrit.wikimedia.org gerrit version


As of July 2021, Gerrit runs with Java 11 ({{Phabricator|T268225}}).
As of July 2021, Gerrit runs with Java 11 ({{Phabricator|T268225}}).

Latest revision as of 15:58, 29 June 2022

We use Gerrit for our code review system.

Gerrit is installed on gerrit1001 in the prefix /var/lib/gerrit2 and serves public request at https://gerrit.wikimedia.org/r/) . A replica runs on gerrit2001 which serves requests at https://gerrit-replica.wikimedia.org/r/ ), it is intended for a switch over and for various bots in order to offload the primary instance.

Gerrit is a Java daemon which listens for HTTP connections (TCP port 8080) and SSH connections (TCP port 29418). Apache proxies the relevant URLs on port 80 and 443 through to Gerrit. The SSH port provides a restricted shell for Git upload pack, reviews and administrative commands.

Since the Gerrit v3.2 upgrade in summer 2020, Gerrit no longer uses a conventional, relational database. So if you read somewhere about Gerrit's MySQL (or similar) database or "reviewdb", it is stale information. Instead of a relational database, Gerrit now stores the needed data directly in the git repositories (NoteDB). To speed up lookup, it creates indices also known has secondary index. These indices are Lucene backed indices and H2 (flat file database engine from the Java world).

Git repositories are stored at /srv/gerrit/git/.

Gerrit uses the LDAP instance shared with Wikimedia Cloud Services for authentication. Accounts under ou=people,dc=wikimedia,dc=org and groups under ou=groups,dc=wikimedia,dc=org are exposed to Gerrit. The Gerrit account name is the cn field in LDAP. In order to log in to Gerrit, a user needs to already have a Wikimedia developer account. See Help:Getting Started for the process of getting a developer account.

As of July 2021, Gerrit runs with Java 11 (task T268225).

End users documentations

Alternatively, you can follow the Git & Gerrit codelab.