Use "gerrit" as the Gerrit user instead of "gerrit2"

We're still on Gerrit version 2.x but when we move to 3.0 it
will not make sense to have the user named "gerrit2".

Update all the documentation to refer to "gerrit" instead.

Also change the Jetty configuration to use "gerrit" instead.

Change-Id: I43a343669ac936b0585ee15e07d15643f9c3d6eb
This commit is contained in:
David Pursehouse 2017-07-04 21:20:47 +09:00
parent 0bfd454d3e
commit 64df83ae7d
8 changed files with 42 additions and 42 deletions

View File

@ -16,7 +16,7 @@ Sample `etc/gerrit.config`:
packedGitLimit = 200 m
[cache]
directory = /var/cache/gerrit2
directory = /var/cache/gerrit
----
[[accountPatchReviewDb]]
@ -1553,7 +1553,7 @@ records about user accounts and change reviews.
type = POSTGRESQL
hostname = localhost
database = reviewdb
username = gerrit2
username = gerrit
password = s3kr3t
----

View File

@ -1,6 +1,6 @@
[[usersetup]]
== Initial Login
It's time to exit the gerrit2 account as you now have Gerrit running on your
It's time to exit the gerrit account as you now have Gerrit running on your
host and setup your first workspace.
Start a shell with the credentials of the account you will perform
@ -57,9 +57,9 @@ Open a browser and enter the canonical url of your Gerrit server. You can
find the url in the settings file.
----
gerrit2@host:~$ git config -f ~/gerrit_testsite/etc/gerrit.config gerrit.canonicalWebUrl
gerrit@host:~$ git config -f ~/gerrit_testsite/etc/gerrit.config gerrit.canonicalWebUrl
http://localhost:8080/
gerrit2@host:~$
gerrit@host:~$
----
Register a new account in Gerrit through the web interface with the
@ -70,9 +70,9 @@ proxy, and you are using an external OpenID provider, you will need to add the
proxy settings in the configuration file.
----
gerrit2@host:~$ git config -f ~/gerrit_testsite/etc/gerrit.config --add http.proxy http://proxy:8080
gerrit2@host:~$ git config -f ~/gerrit_testsite/etc/gerrit.config --add http.proxyUsername username
gerrit2@host:~$ git config -f ~/gerrit_testsite/etc/gerrit.config --add http.proxyPassword password
gerrit@host:~$ git config -f ~/gerrit_testsite/etc/gerrit.config --add http.proxy http://proxy:8080
gerrit@host:~$ git config -f ~/gerrit_testsite/etc/gerrit.config --add http.proxyUsername username
gerrit@host:~$ git config -f ~/gerrit_testsite/etc/gerrit.config --add http.proxyPassword password
----
Refer to the Gerrit configuration guide for more detailed information about

View File

@ -45,8 +45,8 @@ password, create a database to store the metadata, and grant the user
full rights on the newly created database:
----
$ createuser --username=postgres -RDIElPS gerrit2
$ createdb --username=postgres -E UTF-8 -O gerrit2 reviewdb
$ createuser --username=postgres -RDIElPS gerrit
$ createdb --username=postgres -E UTF-8 -O gerrit reviewdb
----
Visit PostgreSQL's link:http://www.postgresql.org/docs/9.1/interactive/index.html[documentation] for further information regarding
@ -65,9 +65,9 @@ rights on it:
----
mysql
CREATE USER 'gerrit2'@'localhost' IDENTIFIED BY 'secret';
CREATE USER 'gerrit'@'localhost' IDENTIFIED BY 'secret';
CREATE DATABASE reviewdb;
GRANT ALL ON reviewdb.* TO 'gerrit2'@'localhost';
GRANT ALL ON reviewdb.* TO 'gerrit'@'localhost';
FLUSH PRIVILEGES;
----
@ -93,8 +93,8 @@ Create a user for the web application within sqlplus, assign it a
password, and grant the user full rights on the newly created database:
----
SQL> create user gerrit2 identified by secret_password default tablespace users;
SQL> grant connect, resources to gerrit2;
SQL> create user gerrit identified by secret_password default tablespace users;
SQL> grant connect, resources to gerrit;
----
JDBC driver ojdbc6.jar must be obtained from your Oracle distribution. Gerrit
@ -115,7 +115,7 @@ $site_path/etc/gerrit.config:
type = oracle
instance = xe
hostname = localhost
username = gerrit2
username = gerrit
port = 1521
----
@ -134,7 +134,7 @@ recommended only for environments where you intend to run Gerrit on an existing
MaxDB installation to reduce administrative overhead.
In the MaxDB studio or using the SQLCLI command line interface create a user
'gerrit2' with the user class 'RESOURCE' and a password <secret password>. This
'gerrit' with the user class 'RESOURCE' and a password <secret password>. This
will also create an associated schema on the database.
To run Gerrit on MaxDB, you need to obtain the MaxDB JDBC driver. It can be
@ -155,7 +155,7 @@ In $site_path/etc/gerrit.config:
type = maxdb
database = reviewdb
hostname = localhost
username = gerrit2
username = gerrit
----
@ -182,7 +182,7 @@ full rights on the newly created database:
----
db2 => create database gerrit
db2 => connect to gerrit
db2 => grant connect,accessctrl,dataaccess,dbadm,secadm on database to gerrit2;
db2 => grant connect,accessctrl,dataaccess,dbadm,secadm on database to gerrit;
----
JDBC driver db2jcc4.jar and db2jcc_license_cu.jar must be obtained
@ -204,7 +204,7 @@ Sample database section in $site_path/etc/gerrit.config:
type = db2
database = gerrit
hostname = localhost
username = gerrit2
username = gerrit
port = 50001
----

View File

@ -43,8 +43,8 @@ We will run the service as a non-privileged user on your system.
First create the user and then become the user:
----
$ sudo adduser gerrit2
$ sudo su gerrit2
$ sudo adduser gerrit
$ sudo su gerrit
----
If you don't have root privileges you could skip this step and run Gerrit
@ -71,12 +71,12 @@ This tutorial is based on version 2.2.2, and you can download that from this lin
It's time to run the initialization, and with the batch switch enabled, we don't have to answer any questions at all:
----
gerrit2@host:~$ java -jar gerrit.war init --batch -d ~/gerrit_testsite
gerrit@host:~$ java -jar gerrit.war init --batch -d ~/gerrit_testsite
Generating SSH host key ... rsa(simple)... done
Initialized /home/gerrit2/gerrit_testsite
Executing /home/gerrit2/gerrit_testsite/bin/gerrit.sh start
Initialized /home/gerrit/gerrit_testsite
Executing /home/gerrit/gerrit_testsite/bin/gerrit.sh start
Starting Gerrit Code Review: OK
gerrit2@host:~$
gerrit@host:~$
----
When the init is complete, you can review your settings in the
@ -86,22 +86,22 @@ Note that initialization also starts the server. If any settings changes are
made, the server must be restarted before they will take effect.
----
gerrit2@host:~$ ~/gerrit_testsite/bin/gerrit.sh restart
gerrit@host:~$ ~/gerrit_testsite/bin/gerrit.sh restart
Stopping Gerrit Code Review: OK
Starting Gerrit Code Review: OK
gerrit2@host:~$
gerrit@host:~$
----
The server can be also stopped and started by passing the `stop` and `start`
commands to gerrit.sh.
----
gerrit2@host:~$ ~/gerrit_testsite/bin/gerrit.sh stop
gerrit@host:~$ ~/gerrit_testsite/bin/gerrit.sh stop
Stopping Gerrit Code Review: OK
gerrit2@host:~$
gerrit2@host:~$ ~/gerrit_testsite/bin/gerrit.sh start
gerrit@host:~$
gerrit@host:~$ ~/gerrit_testsite/bin/gerrit.sh start
Starting Gerrit Code Review: OK
gerrit2@host:~$
gerrit@host:~$
----
include::config-login-register.txt[]

View File

@ -77,8 +77,8 @@ the path of the site directory to be created as an argument to the
own user account on the host system:
----
sudo adduser gerrit2
sudo su gerrit2
sudo adduser gerrit
sudo su gerrit
java -jar gerrit.war init -d /path/to/your/gerrit_application_directory
----
@ -86,7 +86,7 @@ own user account on the host system:
[NOTE]
If you choose a location where your new user doesn't
have any privileges, you may have to manually create the directory first and
then give ownership of that location to the `'gerrit2'` user.
then give ownership of that location to the `'gerrit'` user.
If run from an interactive terminal, the init command will prompt through a
series of configuration questions, including gathering information
@ -104,8 +104,8 @@ When the init phase is complete, the daemon will be automatically started
in the background and your web browser will open to the site:
----
Initialized /home/gerrit2/review_site
Executing /home/gerrit2/review_site/bin/gerrit.sh start
Initialized /home/gerrit/review_site
Executing /home/gerrit/review_site/bin/gerrit.sh start
Starting Gerrit Code Review: OK
Waiting for server to start ... OK
Opening browser ...

View File

@ -36,8 +36,8 @@ Define a simple predicate and test it:
Copyright(C) 1997-2009 M.Banbara and N.Tamura
(type Ctrl-D or "halt." to exit, "['path/to/file.pl']." to load a file)
{consulting /usr/local/google/users/sop/gerrit2/gerrit/simple.pl ...}
{/usr/local/google/users/sop/gerrit2/gerrit/simple.pl consulted 99 msec}
{consulting /usr/local/google/users/sop/gerrit/gerrit/simple.pl ...}
{/usr/local/google/users/sop/gerrit/gerrit/simple.pl consulted 99 msec}
| ?- food(Type).

View File

@ -2,7 +2,7 @@
export JETTY_HOST=127.0.0.1
export JETTY_PORT=8081
export JETTY_USER=gerrit2
export JETTY_USER=gerrit
export JETTY_PID=/var/run/jetty$JETTY_PORT.pid
export JETTY_HOME=/home/$JETTY_USER/jetty
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.07/jre

View File

@ -42,16 +42,16 @@
<!-- PostgreSQL
<Set name="driverClassName">org.postgresql.Driver</Set>
<Set name="url">jdbc:postgresql:reviewdb</Set>
<Set name="username">gerrit2</Set>
<Set name="username">gerrit</Set>
<Set name="password">secretkey</Set>
-->
<!-- MySQL
<Set name="driverClassName">com.mysql.jdbc.Driver</Set>
<Set name="url">jdbc:mysql://localhost/reviewdb?user=gerrit2&amp;password=secretkey</Set>
<Set name="url">jdbc:mysql://localhost/reviewdb?user=gerrit&amp;password=secretkey</Set>
-->
<!-- MariaDB
<Set name="driverClassName">org.mariadb.jdbc.Driver</Set>
<Set name="url">jdbc:mariadb://localhost/reviewdb?user=gerrit2&amp;password=secretkey</Set>
<Set name="url">jdbc:mariadb://localhost/reviewdb?user=gerrit&amp;password=secretkey</Set>
-->
<!-- H2
<Set name="driverClassName">org.h2.Driver</Set>