blob: c173d80fdeccdcf5b5e5b902678d2d6a75a86dfd [file] [log] [blame]
Ales Komarek3446a0a2016-03-08 10:21:00 +01001
OlgaGusarenkocb981942018-07-30 17:26:31 +03002=====
3Usage
4=====
Ales Komarek3446a0a2016-03-08 10:21:00 +01005
OlgaGusarenkocb981942018-07-30 17:26:31 +03006Gerrit provides web based code review and repository management for the Git
7version control system.
Ales Komarek3446a0a2016-03-08 10:21:00 +01008
9Sample pillars
10==============
11
Ales Komarek49a37292016-08-31 16:18:31 +020012Simple gerrit service
Ales Komarek3446a0a2016-03-08 10:21:00 +010013
14.. code-block:: yaml
15
16 gerrit:
17 server:
18 enabled: true
Ales Komarek7f93ce22016-08-29 23:27:47 +020019 source:
20 engine: http
21 address: https://gerrit-ci.gerritforge.com/job/Gerrit-stable-2.13/20/artifact/buck-out/gen/gerrit.war
22 hash: 2e17064b8742c4622815593ec496c571
Ales Komarek3446a0a2016-03-08 10:21:00 +010023
Ales Komarek49a37292016-08-31 16:18:31 +020024Full service setup
25
26.. code-block:: yaml
27
28 gerrit:
29 server:
Martin Polreich5ec9e542018-07-17 13:54:55 +020030 enabled: true
Ales Komarek49a37292016-08-31 16:18:31 +020031 canonical_web_url: http://10.10.10.148:8082/
32 email_private_key: ""
33 token_private_key: ""
34 initial_user:
35 full_name: John Doe
36 email: 'mail@jdoe.com'
37 username: jdoe
38 plugin:
39 download-commands:
40 engine: gerrit
41 # replication:
42 # engine: gerrit
43 reviewnotes:
44 engine: gerrit
45 singleusergroup:
46 engine: gerrit
47 ssh_rsa_key: |
48 -----BEGIN RSA PRIVATE KEY-----
49 MIIEowIBAAKCAQEAs0Y8mxS3dfs5zG8Du5vdBkfOCOng1IEUmFZIirJ8oBgJOd54
50 QgmkDFB7oP9eTCgz9k/rix1uJWhhVCMBzrWzH5IODO+tyy/tK66pv2BWtVfTDhBA
51 nShOLDNbSIBaV8E/NcrbnQN+b0alp4N7rQnavkOYl+JQncKjz1csmCodirscB9Oj
52 rdo6NG9olv9IQd/tDQxEeDyQkoW50aCEWcq7o+QaTzgnlrL+XZEzhzjdcvA9m8go
53 ...
54 jvMXms60iD/A5OpG33LWHNNzQBP486SxG75LB+Xs5sp5j2/b7VF5LJLhpGiJv9Mk
55 ydbuy8iuuvali2uF133kAlLqnrWfVTYQQI1OfW5glOv1L6kv94dU
56 -----END RSA PRIVATE KEY-----
57 ssh_rsa_key_pub: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzRjybFLd1+znMbwO7m90GR84I6eDUgRSYVkiKsnygGAk53nhCCaQMUHug/15MKDP2T+uLHW4laGFUIwHOtbMfkg4M763LL+0rrqm/YFa1V9MOEECdKE4sM1tIgFpXwT81ytudA35vRqWng3utCdq+Q5iX4lCdwqPPVyyYKh2KuxwH06Ot2jo0b2iW/0hB3+0NDER4PJCShbnRoIRZyruj5BpPOCeWsv5dkTOHON1y8D2byCgNGdCBIRx7x9Qb4dKK2F01r0/bfBGxELJzBdQ8XO14bQ7VOd3gTxrccTM4tVS7/uc/vtjiq7MKjnHGf/svbw9bTHAXbXcWXtOlRe51
58 email: mail@domain.com
59 auth:
60 engine: HTTP
61 source:
62 engine: http
63 address: https://gerrit-releases.storage.googleapis.com/gerrit-2.12.4.war
64 hash: sha256=45786a920a929c6258de6461bcf03ddec8925577bd485905f102ceb6e5e1e47c
Jakub Josef09765e12018-01-09 13:28:20 +010065 receive_timeout: 5min
66 sshd:
67 threads: 64
68 batch_threads: 16
69 max_connections_per_user: 64
Ales Komarek49a37292016-08-31 16:18:31 +020070 database:
71 engine: postgresql
72 host: localhost
73 port: 5432
74 name: gerrit
75 user: gerrit
76 password: ${_param:postgresql_gerrit_password}
Jakub Josef09765e12018-01-09 13:28:20 +010077 pool_limit: 250
78 pool_max_idle: 16
79
80Gerrit change auto abandon
81
82.. code-block:: yaml
83
84 gerrit:
85 server:
86 change_cleanup:
87 abandon_after: 3months
Ales Komarek49a37292016-08-31 16:18:31 +020088
Ales Komarek2fc39002016-09-14 11:43:56 +020089
90Gerrit client enforcing groups
91
92.. code-block:: yaml
93
94 gerrit:
95 client:
96 group:
97 Admin001:
98 description: admin 01
99 Admin002:
100 description: admin 02
101
102
Filip Pytloun33d84dd2016-12-20 16:13:24 +0100103Gerrit client enforcing users, install using pip
Ales Komarek2fc39002016-09-14 11:43:56 +0200104
105.. code-block:: yaml
106
107 gerrit:
108 client:
Filip Pytloun33d84dd2016-12-20 16:13:24 +0100109 source:
110 engine: pip
Ales Komarek2fc39002016-09-14 11:43:56 +0200111 user:
112 jdoe:
113 fullname: John Doe
114 email: "jdoe@domain.com"
115 ssh_key: ssh-rsa
116 http_password: password
117 groups:
118 - Admin001
119
120
Ales Komarek49a37292016-08-31 16:18:31 +0200121Gerrit client enforcing projects
122
123.. code-block:: yaml
124
125 gerrit:
126 client:
127 enabled: True
128 server:
129 host: 10.10.10.148
130 user: newt
131 key: |
132 -----BEGIN RSA PRIVATE KEY-----
133 MIIEowIBAAKCAQEAs0Y8mxS3dfs5zG8Du5vdBkfOCOng1IEUmFZIirJ8oBgJOd54
134 QgmkDFB7oP9eTCgz9k/rix1uJWhhVCMBzrWzH5IODO+tyy/tK66pv2BWtVfTDhBA
135 ...
136 l1UrxQKBgEklBTuEiDRibKGXQBwlAYvK2He09hWpqtpt9/DVel6s4A1bbTWDHyoP
137 jvMXms60iD/A5OpG33LWHNNzQBP486SxG75LB+Xs5sp5j2/b7VF5LJLhpGiJv9Mk
138 ydbuy8iuuvali2uF133kAlLqnrWfVTYQQI1OfW5glOv1L6kv94dU
139 -----END RSA PRIVATE KEY-----
Ales Komarek50c558e2016-09-05 23:34:43 +0200140 email: "Project Creator <infra@lists.domain.com>"
Ales Komarek49a37292016-08-31 16:18:31 +0200141 project:
142 test_salt_project:
143 enabled: true
144
Ales Komarek50c558e2016-09-05 23:34:43 +0200145Gerrit client enforcing project, full project example
146
147.. code-block:: yaml
148
149 gerrit:
150 client:
151 enabled: True
152 project:
153 test_salt_project:
154 enabled: true
155 access:
156 "refs/heads/*":
157 actions:
158 - name: abandon
159 group: openstack-salt-core
160 - name: create
161 group: openstack-salt-release
162 labels:
163 - name: Code-Review
164 group: openstack-salt-core
165 score: -2..+2
166 - name: Workflow
167 group: openstack-salt-core
168 score: -1..+1
169 "refs/tags/*":
170 actions:
171 - name: pushSignedTag
172 group: openstack-salt-release
Dmitry Burmistrov9efdff82018-03-21 15:07:05 +0400173 force: true
Alexander Noskov870359d2017-11-02 13:53:15 +0400174 inherit_access: All-Projects
Ales Komarek50c558e2016-09-05 23:34:43 +0200175 require_change_id: true
176 require_agreement: true
177 merge_content: true
Alexander Noskov338d3c72017-09-19 12:10:32 +0400178 action: "fast forward only"
Ales Komarek50c558e2016-09-05 23:34:43 +0200179
Ales Komarek1acb14d2016-09-09 15:14:12 +0200180.. code-block:: yaml
181
182 gerrit:
183 client:
184 enabled: True
185 group:
186 groupname:
187 enabled: true
188 members:
189 - username
190 account:
191 username:
192 enabled: true
193 full_name: hovno
194 email: mail@newt.cz
195 public_key: rsassh
196 http_password: passwd
197
Jiri Broulik90a79c62018-04-25 20:53:45 +0200198Gerrit client proxy
199
200.. code-block:: yaml
201
202 gerrit:
203 client:
204 proxy:
205 http_proxy: http://192.168.10.15:8000
206 https_proxy: http://192.168.10.15:8000
207 no_proxy: 192.168.10.90
Ales Komarek1acb14d2016-09-09 15:14:12 +0200208
Ales Komarek50c558e2016-09-05 23:34:43 +0200209Sample project access
210
211.. code-block:: yaml
212
213 [access "refs/*"]
214 read = group Administrators
215 read = group Anonymous Users
216 [access "refs/for/refs/*"]
217 push = group Registered Users
218 pushMerge = group Registered Users
219 [access "refs/heads/*"]
220 create = group Administrators
221 create = group Project Owners
222 forgeAuthor = group Registered Users
223 forgeCommitter = group Administrators
224 forgeCommitter = group Project Owners
225 push = group Administrators
226 push = group Project Owners
227 label-Code-Review = -2..+2 group Administrators
228 label-Code-Review = -2..+2 group Project Owners
229 label-Code-Review = -1..+1 group Registered Users
230 label-Verified = -1..+1 group Non-Interactive Users
231 submit = group Administrators
232 submit = group Project Owners
233 editTopicName = +force group Administrators
234 editTopicName = +force group Project Owners
235 [access "refs/meta/config"]
236 exclusiveGroupPermissions = read
237 read = group Administrators
238 read = group Project Owners
239 push = group Administrators
240 push = group Project Owners
241 label-Code-Review = -2..+2 group Administrators
242 label-Code-Review = -2..+2 group Project Owners
243 submit = group Administrators
244 submit = group Project Owners
245 [access "refs/tags/*"]
246 pushTag = group Administrators
247 pushTag = group Project Owners
Dmitry Burmistrov9efdff82018-03-21 15:07:05 +0400248 pushSignedTag = +force group Administrators
Ales Komarek50c558e2016-09-05 23:34:43 +0200249 pushSignedTag = group Project Owners
250 [label "Code-Review"]
251 function = MaxWithBlock
252 copyMinScore = true
253 value = -2 This shall not be merged
254 value = -1 I would prefer this is not merged as is
255 value = 0 No score
256 value = +1 Looks good to me, but someone else must approve
257 value = +2 Looks good to me, approved
258 [label "Verified"]
259 function = MaxWithBlock
260 copyMinScore = true
261 value = -1 Fails
262 value = 0 No score
263 value = +1 Verified
264
Ales Komarek3446a0a2016-03-08 10:21:00 +0100265Read more
266=========
267
Ales Komarek7f93ce22016-08-29 23:27:47 +0200268* https://www.gerritcodereview.com/
Ales Komarekf93ac812016-08-31 19:37:43 +0200269* https://gerrit-review.googlesource.com/Documentation/
Ales Komarek7f93ce22016-08-29 23:27:47 +0200270* https://github.com/openstack-infra/puppet-gerrit/
271* https://gerrit-ci.gerritforge.com/
Ales Komarek10526762016-09-19 15:21:46 +0200272* https://github.com/morucci/exzuul
Filip Pytlounc5f32652017-02-02 13:02:03 +0100273
OlgaGusarenkocb981942018-07-30 17:26:31 +0300274Documentation and bugs
Filip Pytlounc5f32652017-02-02 13:02:03 +0100275======================
276
OlgaGusarenkocb981942018-07-30 17:26:31 +0300277* http://salt-formulas.readthedocs.io/
278 Learn how to install and update salt-formulas
Filip Pytlounc5f32652017-02-02 13:02:03 +0100279
OlgaGusarenkocb981942018-07-30 17:26:31 +0300280* https://github.com/salt-formulas/salt-formula-gerrit/issues
281 In the unfortunate event that bugs are discovered, report the issue to the
282 appropriate issue tracker. Use the Github issue tracker for a specific salt
283 formula
Filip Pytlounc5f32652017-02-02 13:02:03 +0100284
OlgaGusarenkocb981942018-07-30 17:26:31 +0300285* https://launchpad.net/salt-formulas
286 For feature requests, bug reports, or blueprints affecting the entire
287 ecosystem, use the Launchpad salt-formulas project
Filip Pytlounc5f32652017-02-02 13:02:03 +0100288
OlgaGusarenkocb981942018-07-30 17:26:31 +0300289* https://launchpad.net/~salt-formulas-users
290 Join the salt-formulas-users team and subscribe to mailing list if required
Filip Pytlounc5f32652017-02-02 13:02:03 +0100291
OlgaGusarenkocb981942018-07-30 17:26:31 +0300292* https://github.com/salt-formulas/salt-formula-gerrit
293 Develop the salt-formulas projects in the master branch and then submit pull
294 requests against a specific formula
Filip Pytlounc5f32652017-02-02 13:02:03 +0100295
OlgaGusarenkocb981942018-07-30 17:26:31 +0300296* #salt-formulas @ irc.freenode.net
297 Use this IRC channel in case of any questions or feedback which is always
298 welcome
Filip Pytlounc5f32652017-02-02 13:02:03 +0100299