blob: 66c16dcda2ad429e8d4f5aae0f055fa206bab70c [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:
30 canonical_web_url: http://10.10.10.148:8082/
31 email_private_key: ""
32 token_private_key: ""
33 initial_user:
34 full_name: John Doe
35 email: 'mail@jdoe.com'
36 username: jdoe
37 plugin:
38 download-commands:
39 engine: gerrit
40 # replication:
41 # engine: gerrit
42 reviewnotes:
43 engine: gerrit
44 singleusergroup:
45 engine: gerrit
46 ssh_rsa_key: |
47 -----BEGIN RSA PRIVATE KEY-----
48 MIIEowIBAAKCAQEAs0Y8mxS3dfs5zG8Du5vdBkfOCOng1IEUmFZIirJ8oBgJOd54
49 QgmkDFB7oP9eTCgz9k/rix1uJWhhVCMBzrWzH5IODO+tyy/tK66pv2BWtVfTDhBA
50 nShOLDNbSIBaV8E/NcrbnQN+b0alp4N7rQnavkOYl+JQncKjz1csmCodirscB9Oj
51 rdo6NG9olv9IQd/tDQxEeDyQkoW50aCEWcq7o+QaTzgnlrL+XZEzhzjdcvA9m8go
52 ...
53 jvMXms60iD/A5OpG33LWHNNzQBP486SxG75LB+Xs5sp5j2/b7VF5LJLhpGiJv9Mk
54 ydbuy8iuuvali2uF133kAlLqnrWfVTYQQI1OfW5glOv1L6kv94dU
55 -----END RSA PRIVATE KEY-----
56 ssh_rsa_key_pub: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzRjybFLd1+znMbwO7m90GR84I6eDUgRSYVkiKsnygGAk53nhCCaQMUHug/15MKDP2T+uLHW4laGFUIwHOtbMfkg4M763LL+0rrqm/YFa1V9MOEECdKE4sM1tIgFpXwT81ytudA35vRqWng3utCdq+Q5iX4lCdwqPPVyyYKh2KuxwH06Ot2jo0b2iW/0hB3+0NDER4PJCShbnRoIRZyruj5BpPOCeWsv5dkTOHON1y8D2byCgNGdCBIRx7x9Qb4dKK2F01r0/bfBGxELJzBdQ8XO14bQ7VOd3gTxrccTM4tVS7/uc/vtjiq7MKjnHGf/svbw9bTHAXbXcWXtOlRe51
57 email: mail@domain.com
58 auth:
59 engine: HTTP
60 source:
61 engine: http
62 address: https://gerrit-releases.storage.googleapis.com/gerrit-2.12.4.war
63 hash: sha256=45786a920a929c6258de6461bcf03ddec8925577bd485905f102ceb6e5e1e47c
Jakub Josef09765e12018-01-09 13:28:20 +010064 receive_timeout: 5min
65 sshd:
66 threads: 64
67 batch_threads: 16
68 max_connections_per_user: 64
Ales Komarek49a37292016-08-31 16:18:31 +020069 database:
70 engine: postgresql
71 host: localhost
72 port: 5432
73 name: gerrit
74 user: gerrit
75 password: ${_param:postgresql_gerrit_password}
Jakub Josef09765e12018-01-09 13:28:20 +010076 pool_limit: 250
77 pool_max_idle: 16
78
79Gerrit change auto abandon
80
81.. code-block:: yaml
82
83 gerrit:
84 server:
85 change_cleanup:
86 abandon_after: 3months
Ales Komarek49a37292016-08-31 16:18:31 +020087
Ales Komarek2fc39002016-09-14 11:43:56 +020088
89Gerrit client enforcing groups
90
91.. code-block:: yaml
92
93 gerrit:
94 client:
95 group:
96 Admin001:
97 description: admin 01
98 Admin002:
99 description: admin 02
100
101
Filip Pytloun33d84dd2016-12-20 16:13:24 +0100102Gerrit client enforcing users, install using pip
Ales Komarek2fc39002016-09-14 11:43:56 +0200103
104.. code-block:: yaml
105
106 gerrit:
107 client:
Filip Pytloun33d84dd2016-12-20 16:13:24 +0100108 source:
109 engine: pip
Ales Komarek2fc39002016-09-14 11:43:56 +0200110 user:
111 jdoe:
112 fullname: John Doe
113 email: "jdoe@domain.com"
114 ssh_key: ssh-rsa
115 http_password: password
116 groups:
117 - Admin001
118
119
Ales Komarek49a37292016-08-31 16:18:31 +0200120Gerrit client enforcing projects
121
122.. code-block:: yaml
123
124 gerrit:
125 client:
126 enabled: True
127 server:
128 host: 10.10.10.148
129 user: newt
130 key: |
131 -----BEGIN RSA PRIVATE KEY-----
132 MIIEowIBAAKCAQEAs0Y8mxS3dfs5zG8Du5vdBkfOCOng1IEUmFZIirJ8oBgJOd54
133 QgmkDFB7oP9eTCgz9k/rix1uJWhhVCMBzrWzH5IODO+tyy/tK66pv2BWtVfTDhBA
134 ...
135 l1UrxQKBgEklBTuEiDRibKGXQBwlAYvK2He09hWpqtpt9/DVel6s4A1bbTWDHyoP
136 jvMXms60iD/A5OpG33LWHNNzQBP486SxG75LB+Xs5sp5j2/b7VF5LJLhpGiJv9Mk
137 ydbuy8iuuvali2uF133kAlLqnrWfVTYQQI1OfW5glOv1L6kv94dU
138 -----END RSA PRIVATE KEY-----
Ales Komarek50c558e2016-09-05 23:34:43 +0200139 email: "Project Creator <infra@lists.domain.com>"
Ales Komarek49a37292016-08-31 16:18:31 +0200140 project:
141 test_salt_project:
142 enabled: true
143
Ales Komarek50c558e2016-09-05 23:34:43 +0200144Gerrit client enforcing project, full project example
145
146.. code-block:: yaml
147
148 gerrit:
149 client:
150 enabled: True
151 project:
152 test_salt_project:
153 enabled: true
154 access:
155 "refs/heads/*":
156 actions:
157 - name: abandon
158 group: openstack-salt-core
159 - name: create
160 group: openstack-salt-release
161 labels:
162 - name: Code-Review
163 group: openstack-salt-core
164 score: -2..+2
165 - name: Workflow
166 group: openstack-salt-core
167 score: -1..+1
168 "refs/tags/*":
169 actions:
170 - name: pushSignedTag
171 group: openstack-salt-release
Dmitry Burmistrov9efdff82018-03-21 15:07:05 +0400172 force: true
Alexander Noskov870359d2017-11-02 13:53:15 +0400173 inherit_access: All-Projects
Ales Komarek50c558e2016-09-05 23:34:43 +0200174 require_change_id: true
175 require_agreement: true
176 merge_content: true
Alexander Noskov338d3c72017-09-19 12:10:32 +0400177 action: "fast forward only"
Ales Komarek50c558e2016-09-05 23:34:43 +0200178
Ales Komarek1acb14d2016-09-09 15:14:12 +0200179.. code-block:: yaml
180
181 gerrit:
182 client:
183 enabled: True
184 group:
185 groupname:
186 enabled: true
187 members:
188 - username
189 account:
190 username:
191 enabled: true
192 full_name: hovno
193 email: mail@newt.cz
194 public_key: rsassh
195 http_password: passwd
196
Jiri Broulik90a79c62018-04-25 20:53:45 +0200197Gerrit client proxy
198
199.. code-block:: yaml
200
201 gerrit:
202 client:
203 proxy:
204 http_proxy: http://192.168.10.15:8000
205 https_proxy: http://192.168.10.15:8000
206 no_proxy: 192.168.10.90
Ales Komarek1acb14d2016-09-09 15:14:12 +0200207
Ales Komarek50c558e2016-09-05 23:34:43 +0200208Sample project access
209
210.. code-block:: yaml
211
212 [access "refs/*"]
213 read = group Administrators
214 read = group Anonymous Users
215 [access "refs/for/refs/*"]
216 push = group Registered Users
217 pushMerge = group Registered Users
218 [access "refs/heads/*"]
219 create = group Administrators
220 create = group Project Owners
221 forgeAuthor = group Registered Users
222 forgeCommitter = group Administrators
223 forgeCommitter = group Project Owners
224 push = group Administrators
225 push = group Project Owners
226 label-Code-Review = -2..+2 group Administrators
227 label-Code-Review = -2..+2 group Project Owners
228 label-Code-Review = -1..+1 group Registered Users
229 label-Verified = -1..+1 group Non-Interactive Users
230 submit = group Administrators
231 submit = group Project Owners
232 editTopicName = +force group Administrators
233 editTopicName = +force group Project Owners
234 [access "refs/meta/config"]
235 exclusiveGroupPermissions = read
236 read = group Administrators
237 read = group Project Owners
238 push = group Administrators
239 push = group Project Owners
240 label-Code-Review = -2..+2 group Administrators
241 label-Code-Review = -2..+2 group Project Owners
242 submit = group Administrators
243 submit = group Project Owners
244 [access "refs/tags/*"]
245 pushTag = group Administrators
246 pushTag = group Project Owners
Dmitry Burmistrov9efdff82018-03-21 15:07:05 +0400247 pushSignedTag = +force group Administrators
Ales Komarek50c558e2016-09-05 23:34:43 +0200248 pushSignedTag = group Project Owners
249 [label "Code-Review"]
250 function = MaxWithBlock
251 copyMinScore = true
252 value = -2 This shall not be merged
253 value = -1 I would prefer this is not merged as is
254 value = 0 No score
255 value = +1 Looks good to me, but someone else must approve
256 value = +2 Looks good to me, approved
257 [label "Verified"]
258 function = MaxWithBlock
259 copyMinScore = true
260 value = -1 Fails
261 value = 0 No score
262 value = +1 Verified
263
Ales Komarek3446a0a2016-03-08 10:21:00 +0100264Read more
265=========
266
Ales Komarek7f93ce22016-08-29 23:27:47 +0200267* https://www.gerritcodereview.com/
Ales Komarekf93ac812016-08-31 19:37:43 +0200268* https://gerrit-review.googlesource.com/Documentation/
Ales Komarek7f93ce22016-08-29 23:27:47 +0200269* https://github.com/openstack-infra/puppet-gerrit/
270* https://gerrit-ci.gerritforge.com/
Ales Komarek10526762016-09-19 15:21:46 +0200271* https://github.com/morucci/exzuul
Filip Pytlounc5f32652017-02-02 13:02:03 +0100272
OlgaGusarenkocb981942018-07-30 17:26:31 +0300273Documentation and bugs
Filip Pytlounc5f32652017-02-02 13:02:03 +0100274======================
275
OlgaGusarenkocb981942018-07-30 17:26:31 +0300276* http://salt-formulas.readthedocs.io/
277 Learn how to install and update salt-formulas
Filip Pytlounc5f32652017-02-02 13:02:03 +0100278
OlgaGusarenkocb981942018-07-30 17:26:31 +0300279* https://github.com/salt-formulas/salt-formula-gerrit/issues
280 In the unfortunate event that bugs are discovered, report the issue to the
281 appropriate issue tracker. Use the Github issue tracker for a specific salt
282 formula
Filip Pytlounc5f32652017-02-02 13:02:03 +0100283
OlgaGusarenkocb981942018-07-30 17:26:31 +0300284* https://launchpad.net/salt-formulas
285 For feature requests, bug reports, or blueprints affecting the entire
286 ecosystem, use the Launchpad salt-formulas project
Filip Pytlounc5f32652017-02-02 13:02:03 +0100287
OlgaGusarenkocb981942018-07-30 17:26:31 +0300288* https://launchpad.net/~salt-formulas-users
289 Join the salt-formulas-users team and subscribe to mailing list if required
Filip Pytlounc5f32652017-02-02 13:02:03 +0100290
OlgaGusarenkocb981942018-07-30 17:26:31 +0300291* https://github.com/salt-formulas/salt-formula-gerrit
292 Develop the salt-formulas projects in the master branch and then submit pull
293 requests against a specific formula
Filip Pytlounc5f32652017-02-02 13:02:03 +0100294
OlgaGusarenkocb981942018-07-30 17:26:31 +0300295* #salt-formulas @ irc.freenode.net
296 Use this IRC channel in case of any questions or feedback which is always
297 welcome
Filip Pytlounc5f32652017-02-02 13:02:03 +0100298