Gerrit role important information

This role will install gerrit from a pre-installed version. It is not suitable to install a gerrit from scratch. Some users already exists.

The pre-installed version was created by Réda Housni Alaoui.

This role depends on 2 other roles:

The config for httpd is defined in the vars folder of this role.

Mandatory variables

Gerrit need its postgresql database password, which cannot be changed (encoded in the original archive). But for security issue, you must define it in the host vault file with this variable:

gerrit_pg_pass: xxxxxxxxxxxxxxxx

You also need to define the domain name of your gerrit installation:

gerrit_domain: "gerrit.example.org"

Optional variables

Bellow are optional variables, either because a default it shipped with this role, or because the whole feature is optional.

docker images and storage

This will define where the data will be stored for gerrit, it can be anywhere:

gerrit_docker_volume: "/srv/gerrit"

You can also change where postgresql store its data, but in this case you will have to move it manually first because the archive store it at this location:

gerrit_docker_pg_volume: "{{ gerrit_docker_volume }}/postgres"

Gerrit main configuration file

The whole configuration is done using the dictionary "gerrit". You can configure any number of categories from the official documentation with it: https://gerrit-review.googlesource.com/Documentation/config-gerrit.html

To do so, the dictionary must be in this form:

gerrit:
  category1:
    item1: value1
    item2: value2
  category2
    item1: value1
    item2: value2
  ...
  categoryN
    item1: value1
    item2: value2

This will generate a configuration like this: (tabs are used because when gerrit itself modifies the file, it uses tabs)

[category1]
	item1 = value1
	item2 = value2

[category2]
	item1 = value1
	item2 = value2

[category3]
	item1 = value1
	item2 = value2

Some categories have default values if undefined, you can see those in the template file "gerrit.config".

TODO

debug mode

This role has an undefined variable gerrit_debug that add a port 4000 to the gerrit container if defined. This currently does nothing because the debug mode of gerrit needs other settings.

make an installation from scratch

This role currently does not create a gerrit from scratch.

use postgresql 10

This role should use pg 10 (currently it uses pg 9.6). It also should have a way to upgrade its postgresql from one version to the next.