Page MenuHomePhabricator

steps to create a Gerrit test instance in labs

Authored By
Paladox
Sep 1 2016, 8:55 PM
Size
1 KB
Referenced Files
None
Subscribers
None

steps to create a Gerrit test instance in labs

1. Create a fresh instance to run Gerrit itself
2. Before you apply any role on it, make sure if you: either use the existing "gerrit-mysql" instance as db backend or follow mysql setup instructions at https://phabricator.wikimedia.org/P3939 to make a new one. (don't manually install mysql on localhost). If you don't use "gerrit-mysql",make sure the "gerrit::jetty::db_host" is set to the correct server in Hiera (example: https://wikitech.wikimedia.org/w/index.php?title=Hiera%3AGit&type=revision&diff=819031&oldid=816844) The DB part should be running _before_ you start the Gerrit service.
3. Look in https://wikitech.wikimedia.org/wiki/Special:NovaInstance (Instance ID) for instance address to put in "gerrit::jetty::db_host": <id>
4. go to hiera in wikitech (Hiera:<project_name>) https://wikitech.wikimedia.org/wiki/Hiera:Git and add this unless it's already there from before
"gerrit::jetty::db_host": <from step 3>
"role::gerrit::server::ipv4": <instance-ip>
"gerrit::host": <the domain you setup in horizon>
5. apply role::gerrit::server in wikitech
6. sudo puppet agent -tv
7. sudo apt-get --purge remove gerrit
8. sudo puppet agent -tv (<< that should reinstall it).
9. cd /var/lib/gerrit2/
10. java -jar gerrit.war reindex -d review_site --threads 4
11. sudo puppet agent -tv
12. sudo service gerrit
13. sudo service gerrit start

File Metadata

Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3951845
Default Alt Text
steps to create a Gerrit test instance in labs (1 KB)

Event Timeline