Page MenuHomePhabricator
Paste P3939

steps to create a Gerrit DB backend instance in labs
ActivePublic

Authored by Paladox on Aug 29 2016, 5:40 PM.
Tags
None
Referenced Files
F4424463: steps to create a Gerrit DB backend instance in labs
Sep 1 2016, 9:43 PM
F4421401: steps to create a Gerrit DB backend instance in labs
Aug 31 2016, 10:35 PM
F4421223: steps to create a Gerrit DB backend instance in labs
Aug 31 2016, 9:57 PM
F4421217: steps to create a Gerrit DB backend instance in labs
Aug 31 2016, 9:54 PM
F4421186: steps to create a Gerrit DB backend instance in labs
Aug 31 2016, 9:44 PM
F4421178: steps to create a Gerrit DB backend instance in labs
Aug 31 2016, 9:42 PM
F4421175: steps to create a Gerrit DB backend instance in labs
Aug 31 2016, 9:41 PM
F4420600: steps to create a Gerrit DB backend instance in labs
Aug 31 2016, 6:07 PM
Subscribers
None
1. create an instance that you will be hosting MySQL on.
2. ssh into your MySQL instance you just created
3. install mysql: apt-get install MySQL-server-5.5 (note it will ask you to create a password, set to something random or leave this blank for testing purposes, there is no private data in labs and users who have access to the instance will be able to reset it anyways)
4. vim /etc/mysql/my.cnf
(add these under [mysqld_safe], [mysqld] and [mysqldump])
character-set-server=utf8
collation-server=utf8_unicode_ci
under [mysqld]
look for
bind-address
you will need to change the ip in bind-address to the one of gerrit host
(press esc and then :wq and enter)
5. mysql -p (enter the password if you have one. If you created the password use the one you just used in the mysql setup)
(press enter again if you haven't a password otherwise enter your password)
6. CREATE USER 'gerrit'@'10.68.23.148' IDENTIFIED BY 'l5uCkoYX+zYtH';
(Note where it says 10.68.23.148 please use your gerrit instance ip there instead)
(This is the puppetized Gerrit application password, in labs it comes from the public so called "labs/private" repo, in prod it's obviously different and comes from an actually private repo.)
7. CREATE DATABASE reviewdb;
8. GRANT ALL ON reviewdb.* TO 'gerrit'@'10.68.23.148';
(Note where it says 10.68.23.148 please use your gerrit instance ip there instead)
9. FLUSH PRIVILEGES; (not really needed but Gerrit docs claim it is :p)
10. type exit, done. continue setting up a seperate Gerrit instance as described in https://phabricator.wikimedia.org/P3637

Event Timeline

Paladox edited the content of this paste. (Show Details)
Dzahn changed the title of this paste from mysql gerrit checklist to steps to create a Gerrit DB backend instance in labs.
Paladox edited the content of this paste. (Show Details)