blob: aa6d8c849fd2c138742a7f2a56313bdcc4d40f0c [file] [log] [blame]
James E. Blaireff5a9d2017-06-20 00:00:37 -07001:title: Components
2
3.. _components:
4
5Components
6==========
7
8Zuul is a distributed system consisting of several components, each of
James E. Blaire86abe12017-08-04 14:46:00 -07009which is described below.
10
11
12.. graphviz::
13 :align: center
14
15 graph {
16 node [shape=box]
17 Gearman [shape=ellipse]
18 Gerrit [fontcolor=grey]
19 Zookeeper [shape=ellipse]
20 Nodepool
21 GitHub [fontcolor=grey]
22
23 Merger -- Gearman
24 Executor -- Gearman
25 Web -- Gearman
26
27 Gearman -- Scheduler;
28 Scheduler -- Gerrit;
29 Scheduler -- Zookeeper;
30 Zookeeper -- Nodepool;
31 Scheduler -- GitHub;
32 }
33
34
35
36All Zuul processes read the ``/etc/zuul/zuul.conf`` file (an alternate
37location may be supplied on the command line) which uses an INI file
38syntax. Each component may have its own configuration file, though
39you may find it simpler to use the same file for all components.
James E. Blaireff5a9d2017-06-20 00:00:37 -070040
James E. Blair97940192017-08-03 14:47:47 -070041An example ``zuul.conf``:
42
43.. code-block:: ini
44
45 [gearman]
46 server=localhost
47
48 [gearman_server]
49 start=true
50 log_config=/etc/zuul/gearman-logging.yaml
51
52 [zookeeper]
53 hosts=zk1.example.com,zk2.example.com,zk3.example.com
54
55 [webapp]
56 status_url=https://zuul.example.com/status
57
58 [scheduler]
59 log_config=/etc/zuul/scheduler-logging.yaml
60
61A minimal Zuul system may consist of a :ref:`scheduler` and
62:ref:`executor` both running on the same host. Larger installations
63should consider running multiple executors, each on a dedicated host,
64and running mergers on dedicated hosts as well.
James E. Blaireff5a9d2017-06-20 00:00:37 -070065
66Common
67------
68
69The following applies to all Zuul components.
70
71Configuration
72~~~~~~~~~~~~~
73
James E. Blair97940192017-08-03 14:47:47 -070074The following sections of ``zuul.conf`` are used by all Zuul components:
James E. Blaireff5a9d2017-06-20 00:00:37 -070075
James E. Blaireff5a9d2017-06-20 00:00:37 -070076
James E. Blair97940192017-08-03 14:47:47 -070077.. attr:: gearman
James E. Blaireff5a9d2017-06-20 00:00:37 -070078
James E. Blair97940192017-08-03 14:47:47 -070079 Client connection information for Gearman.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -040080
James E. Blair97940192017-08-03 14:47:47 -070081 .. attr:: server
82 :required:
James E. Blaireff5a9d2017-06-20 00:00:37 -070083
James E. Blair97940192017-08-03 14:47:47 -070084 Hostname or IP address of the Gearman server.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -040085
James E. Blair97940192017-08-03 14:47:47 -070086 .. attr:: port
87 :default: 4730
James E. Blaireff5a9d2017-06-20 00:00:37 -070088
James E. Blair97940192017-08-03 14:47:47 -070089 Port on which the Gearman server is listening.
James E. Blaireff5a9d2017-06-20 00:00:37 -070090
James E. Blair97940192017-08-03 14:47:47 -070091 .. attr:: ssl_ca
James E. Blaireff5a9d2017-06-20 00:00:37 -070092
James E. Blair97940192017-08-03 14:47:47 -070093 An openssl file containing a set of concatenated “certification
94 authority” certificates in PEM formet.
James E. Blaireff5a9d2017-06-20 00:00:37 -070095
James E. Blair97940192017-08-03 14:47:47 -070096 .. attr:: ssl_cert
97
98 An openssl file containing the client public certificate in PEM format.
99
100 .. attr:: ssl_key
101
102 An openssl file containing the client private key in PEM format.
James E. Blairfdb111d2017-06-23 20:56:05 +0100103
James E. Blair4f3e6222017-07-05 14:52:08 -0700104.. NOTE: this is a white lie at this point, since only the scheduler
105 uses this, however, we expect other components to use it later, so
106 it's reasonable for admins to plan for this now.
107
James E. Blair97940192017-08-03 14:47:47 -0700108.. attr:: zookeeper
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400109
James E. Blair97940192017-08-03 14:47:47 -0700110 Client connection information for ZooKeeper
James E. Blairfdb111d2017-06-23 20:56:05 +0100111
James E. Blair97940192017-08-03 14:47:47 -0700112 .. attr:: hosts
113 :required:
114
115 A list of zookeeper hosts for Zuul to use when communicating
116 with Nodepool.
117
118
119.. _scheduler:
James E. Blaireff5a9d2017-06-20 00:00:37 -0700120
121Scheduler
122---------
123
124The scheduler is the primary component of Zuul. The scheduler is not
125a scalable component; one, and only one, scheduler must be running at
126all times for Zuul to be operational. It receives events from any
127connections to remote systems which have been configured, enqueues
128items into pipelines, distributes jobs to executors, and reports
129results.
130
131Configuration
132~~~~~~~~~~~~~
133
James E. Blair97940192017-08-03 14:47:47 -0700134The following sections of ``zuul.conf`` are used by the scheduler:
James E. Blaireff5a9d2017-06-20 00:00:37 -0700135
James E. Blaireff5a9d2017-06-20 00:00:37 -0700136
James E. Blair97940192017-08-03 14:47:47 -0700137.. attr:: gearman_server
James E. Blaireff5a9d2017-06-20 00:00:37 -0700138
James E. Blair97940192017-08-03 14:47:47 -0700139 The builtin gearman server. Zuul can fork a gearman process from
140 itself rather than connecting to an external one.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400141
James E. Blair97940192017-08-03 14:47:47 -0700142 .. attr:: start
143 :default: false
James E. Blaireff5a9d2017-06-20 00:00:37 -0700144
James E. Blair97940192017-08-03 14:47:47 -0700145 Whether to start the internal Gearman server.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400146
James E. Blair97940192017-08-03 14:47:47 -0700147 .. attr:: listen_address
148 :default: all addresses
James E. Blaireff5a9d2017-06-20 00:00:37 -0700149
James E. Blair97940192017-08-03 14:47:47 -0700150 IP address or domain name on which to listen.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400151
James E. Blair97940192017-08-03 14:47:47 -0700152 .. attr:: log_config
James E. Blaireff5a9d2017-06-20 00:00:37 -0700153
James E. Blair97940192017-08-03 14:47:47 -0700154 Path to log config file for internal Gearman server.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700155
James E. Blair97940192017-08-03 14:47:47 -0700156 .. attr:: ssl_ca
James E. Blaireff5a9d2017-06-20 00:00:37 -0700157
James E. Blair97940192017-08-03 14:47:47 -0700158 An openssl file containing a set of concatenated “certification
159 authority” certificates in PEM formet.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700160
James E. Blair97940192017-08-03 14:47:47 -0700161 .. attr:: ssl_cert
James E. Blaireff5a9d2017-06-20 00:00:37 -0700162
James E. Blair97940192017-08-03 14:47:47 -0700163 An openssl file containing the server public certificate in PEM
164 format.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400165
James E. Blair97940192017-08-03 14:47:47 -0700166 .. attr:: ssl_key
James E. Blaireff5a9d2017-06-20 00:00:37 -0700167
James E. Blair97940192017-08-03 14:47:47 -0700168 An openssl file containing the server private key in PEM format.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400169
James E. Blair97940192017-08-03 14:47:47 -0700170.. attr:: webapp
James E. Blaireff5a9d2017-06-20 00:00:37 -0700171
James E. Blair97940192017-08-03 14:47:47 -0700172 .. attr:: listen_address
173 :default: all addresses
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400174
James E. Blair97940192017-08-03 14:47:47 -0700175 IP address or domain name on which to listen.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700176
James E. Blair97940192017-08-03 14:47:47 -0700177 .. attr:: port
178 :default: 8001
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400179
James E. Blair97940192017-08-03 14:47:47 -0700180 Port on which the webapp is listening.
James E. Blair4f3e6222017-07-05 14:52:08 -0700181
James E. Blair97940192017-08-03 14:47:47 -0700182 .. attr:: status_expiry
183 :default: 1
James E. Blaireff5a9d2017-06-20 00:00:37 -0700184
James E. Blair97940192017-08-03 14:47:47 -0700185 Zuul will cache the status.json file for this many seconds.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400186
James E. Blair97940192017-08-03 14:47:47 -0700187 .. attr:: status_url
James E. Blaireff5a9d2017-06-20 00:00:37 -0700188
James E. Blair97940192017-08-03 14:47:47 -0700189 URL that will be posted in Zuul comments made to changes when
190 starting jobs for a change.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400191
James E. Blair97940192017-08-03 14:47:47 -0700192 .. TODO: is this effectively required?
James E. Blaireff5a9d2017-06-20 00:00:37 -0700193
James E. Blair97940192017-08-03 14:47:47 -0700194.. attr:: scheduler
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400195
James E. Blair97940192017-08-03 14:47:47 -0700196 .. attr:: tenant_config
197 :required:
James E. Blaireff5a9d2017-06-20 00:00:37 -0700198
James E. Blair97940192017-08-03 14:47:47 -0700199 Path to :ref:`tenant-config` file.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400200
James E. Blair97940192017-08-03 14:47:47 -0700201 .. attr:: log_config
202
203 Path to log config file.
204
205 .. attr:: pidfile
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700206 :default: /var/run/zuul-schedurecr/zuul-scheduler.pid
James E. Blair97940192017-08-03 14:47:47 -0700207
208 Path to PID lock file.
209
210 .. attr:: state_dir
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700211 :default: /var/lib/zuul
James E. Blair97940192017-08-03 14:47:47 -0700212
213 Path to directory in which Zuul should save its state.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700214
215Operation
216~~~~~~~~~
217
218To start the scheduler, run ``zuul-scheduler``. To stop it, kill the
219PID which was saved in the pidfile specified in the configuration.
220
221Most of Zuul's configuration is automatically updated as changes to
222the repositories which contain it are merged. However, Zuul must be
223explicitly notified of changes to the tenant config file, since it is
224not read from a git repository. To do so, send the scheduler PID
James E. Blair97940192017-08-03 14:47:47 -0700225(saved in the pidfile specified in the configuration) a `SIGHUP`
226signal.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700227
228Merger
229------
230
231Mergers are an optional Zuul service; they are not required for Zuul
232to operate, but some high volume sites may benefit from running them.
233Zuul performs quite a lot of git operations in the course of its work.
234Each change that is to be tested must be speculatively merged with the
235current state of its target branch to ensure that it can merge, and to
236ensure that the tests that Zuul perform accurately represent the
237outcome of merging the change. Because Zuul's configuration is stored
238in the git repos it interacts with, and is dynamically evaluated, Zuul
239often needs to perform a speculative merge in order to determine
240whether it needs to perform any further actions.
241
242All of these git operations add up, and while Zuul executors can also
243perform them, large numbers may impact their ability to run jobs.
244Therefore, administrators may wish to run standalone mergers in order
245to reduce the load on executors.
246
247Configuration
248~~~~~~~~~~~~~
249
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700250The following section of ``zuul.conf`` is used by the merger:
James E. Blaireff5a9d2017-06-20 00:00:37 -0700251
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700252.. attr:: merger
James E. Blaireff5a9d2017-06-20 00:00:37 -0700253
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700254 .. attr:: git_dir
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400255
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700256 Directory in which Zuul should clone git repositories.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700257
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700258 .. attr:: git_user_email
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400259
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700260 Value to pass to `git config user.email
261 <https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup>`_.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700262
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700263 .. attr:: git_user_name
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400264
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700265 Value to pass to `git config user.name
266 <https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup>`_.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700267
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700268 .. attr:: log_config
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400269
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700270 Path to log config file for the merger process.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700271
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700272 .. attr:: pidfile
273 :default: /var/run/zuul-merger/zuul-merger.pid
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400274
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700275 Path to PID lock file for the merger process.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700276
277Operation
278~~~~~~~~~
279
280To start the merger, run ``zuul-merger``. To stop it, kill the
281PID which was saved in the pidfile specified in the configuration.
282
David Shrewsburyb040b0a2017-08-03 15:53:59 -0400283.. _executor:
284
James E. Blaireff5a9d2017-06-20 00:00:37 -0700285Executor
286--------
287
288Executors are responsible for running jobs. At the start of each job,
289an executor prepares an environment in which to run Ansible which
290contains all of the git repositories specified by the job with all
291dependent changes merged into their appropriate branches. The branch
292corresponding to the proposed change will be checked out (in all
293projects, if it exists). Any roles specified by the job will also be
294present (also with dependent changes merged, if appropriate) and added
295to the Ansible role path. The executor also prepares an Ansible
296inventory file with all of the nodes requested by the job.
297
298The executor also contains a merger. This is used by the executor to
299prepare the git repositories used by jobs, but is also available to
300perform any tasks normally performed by standalone mergers. Because
301the executor performs both roles, small Zuul installations may not
302need to run standalone mergers.
303
304Trusted and Untrusted Playbooks
305~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
306
307The executor runs playbooks in one of two execution contexts depending
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700308on whether the project containing the playbook is a
309:term:`config-project` or an :term:`untrusted-project`. If the
310playbook is in a config project, the executor runs the playbook in the
311*trusted* execution context, otherwise, it is run in the *untrusted*
312execution context.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700313
314Both execution contexts use `bubblewrap`_ to create a namespace to
315ensure that playbook executions are isolated and are unable to access
316files outside of a restricted environment. The administrator may
317configure additional local directories on the executor to be made
318available to the restricted environment.
319
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700320The trusted execution context has access to all Ansible features,
James E. Blaireff5a9d2017-06-20 00:00:37 -0700321including the ability to load custom Ansible modules. Needless to
322say, extra scrutiny should be given to code that runs in a trusted
323context as it could be used to compromise other jobs running on the
324executor, or the executor itself, especially if the administrator has
325granted additional access through bubblewrap, or a method of escaping
326the restricted environment created by bubblewrap is found.
327
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700328Playbooks run in the untrusted execution context are not permitted to
329load additional Ansible modules or access files outside of the
James E. Blaireff5a9d2017-06-20 00:00:37 -0700330restricted environment prepared for them by the executor. In addition
331to the bubblewrap environment applied to both execution contexts, in
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700332the untrusted context some standard Ansible modules are replaced with
333versions which prohibit some actions, including attempts to access
334files outside of the restricted execution context. These redundant
335protections are made as part of a defense-in-depth strategy.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700336
337.. _bubblewrap: https://github.com/projectatomic/bubblewrap
338
339Configuration
340~~~~~~~~~~~~~
341
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700342The following sections of ``zuul.conf`` are used by the executor:
James E. Blaireff5a9d2017-06-20 00:00:37 -0700343
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700344.. attr:: executor
James E. Blaireff5a9d2017-06-20 00:00:37 -0700345
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700346 .. attr:: finger_port
347 :default: 79
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400348
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700349 Port to use for finger log streamer.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700350
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700351 .. attr:: git_dir
352 :default: /var/lib/zuul/git
James E. Blair7e6e0a12017-07-25 11:04:42 -0700353
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700354 Directory that Zuul should clone local git repositories to. The
355 executor keeps a local copy of every git repository it works
356 with to speed operations and perform speculative merging.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400357
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700358 This should be on the same filesystem as
359 :attr:`executor.job_dir` so that when git repos are cloned into
360 the job workspaces, they can be hard-linked to the local git
361 cache.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700362
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700363 .. attr:: job_dir
364 :default: /tmp
James E. Blair7e6e0a12017-07-25 11:04:42 -0700365
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700366 Directory that Zuul should use to hold temporary job directories.
367 When each job is run, a new entry will be created under this
368 directory to hold the configuration and scratch workspace for
369 that job. It will be deleted at the end of the job (unless the
370 `--keep-jobdir` command line option is specified).
James E. Blair7e6e0a12017-07-25 11:04:42 -0700371
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700372 This should be on the same filesystem as :attr:`executor.git_dir`
373 so that when git repos are cloned into the job workspaces, they
374 can be hard-linked to the local git cache.
James E. Blair7e6e0a12017-07-25 11:04:42 -0700375
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700376 .. attr:: log_config
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400377
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700378 Path to log config file for the executor process.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700379
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700380 .. attr:: pidfile
381 :default: /var/run/zuul-executor/zuul-executor.pid
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400382
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700383 Path to PID lock file for the executor process.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700384
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700385 .. attr:: private_key_file
386 :default: ~/.ssh/id_rsa
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400387
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700388 SSH private key file to be used when logging into worker nodes.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700389
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700390 .. attr:: user
391 :default: zuul
Jamie Lennox7655b552017-03-17 12:33:38 +1100392
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700393 User ID for the zuul-executor process. In normal operation as a
394 daemon, the executor should be started as the ``root`` user, but
395 it will drop privileges to this user during startup.
Jamie Lennox7655b552017-03-17 12:33:38 +1100396
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700397 .. _admin_sitewide_variables:
Jamie Lennox7655b552017-03-17 12:33:38 +1100398
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700399 .. attr:: variables
Jamie Lennox7655b552017-03-17 12:33:38 +1100400
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700401 Path to an Ansible variables file to supply site-wide variables.
402 This should be a YAML-formatted file consisting of a single
403 dictionary. The contents will be made available to all jobs as
404 Ansible variables. These variables take precedence over all
405 other forms (job variables and secrets). Care should be taken
406 when naming these variables to avoid potential collisions with
407 those used by jobs. Prefixing variable names with a
408 site-specific identifier is recommended. The default is not to
409 add any site-wide variables. See the :ref:`User's Guide
410 <user_sitewide_variables>` for more information.
Clint Byrumdc8a0902017-07-20 16:36:27 -0700411
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700412 .. attr:: disk_limit_per_job
413 :default: 250
Clint Byrumdc8a0902017-07-20 16:36:27 -0700414
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700415 This integer is the maximum number of megabytes that any one job
416 is allowed to consume on disk while it is running. If a job's
417 scratch space has more than this much space consumed, it will be
418 aborted.
Monty Taylor01380dd2017-07-28 16:01:20 -0500419
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700420 .. attr:: trusted_ro_paths
Monty Taylor01380dd2017-07-28 16:01:20 -0500421
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700422 List of paths, separated by ``:`` to read-only bind mount into
423 trusted bubblewrap contexts.
Monty Taylor01380dd2017-07-28 16:01:20 -0500424
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700425 .. attr:: trusted_rw_paths
Monty Taylor01380dd2017-07-28 16:01:20 -0500426
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700427 List of paths, separated by ``:`` to read-write bind mount into
428 trusted bubblewrap contexts.
Monty Taylor01380dd2017-07-28 16:01:20 -0500429
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700430 .. attr:: untrusted_ro_paths
Monty Taylor01380dd2017-07-28 16:01:20 -0500431
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700432 List of paths, separated by ``:`` to read-only bind mount into
433 untrusted bubblewrap contexts.
Monty Taylor01380dd2017-07-28 16:01:20 -0500434
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700435 .. attr:: untrusted_rw_paths
Monty Taylor01380dd2017-07-28 16:01:20 -0500436
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700437 List of paths, separated by ``:`` to read-write bind mount into
438 untrusted bubblewrap contexts.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700439
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700440.. attr:: merger
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400441
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700442 .. attr:: git_user_email
James E. Blaireff5a9d2017-06-20 00:00:37 -0700443
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700444 Value to pass to `git config user.email
445 <https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup>`_.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400446
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700447 .. attr:: git_user_name
448
449 Value to pass to `git config user.name
450 <https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup>`_.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700451
452Operation
453~~~~~~~~~
454
455To start the executor, run ``zuul-executor``.
456
457There are several commands which can be run to control the executor's
458behavior once it is running.
459
460To stop the executor immediately, aborting all jobs (they may be
461relaunched according to their retry policy), run ``zuul-executor
462stop``.
463
464To request that the executor stop executing new jobs and exit when all
465currently running jobs have completed, run ``zuul-executor graceful``.
466
James E. Blairafe27e62017-08-03 15:11:47 -0700467To enable or disable running Ansible in verbose mode (with the
468``-vvv`` argument to ansible-playbook) run ``zuul-executor verbose``
469and ``zuul-executor unverbose``.
David Shrewsburyae734d12017-07-11 12:41:59 -0400470
471Web Server
472----------
473
474The Zuul web server currently acts as a websocket interface to live log
475streaming. Eventually, it will serve as the single process handling all
476HTTP interactions with Zuul.
477
478Configuration
479~~~~~~~~~~~~~
480
James E. Blairafe27e62017-08-03 15:11:47 -0700481In addition to the common configuration sections, the following
482sections of ``zuul.conf`` are used by the web server:
David Shrewsburyae734d12017-07-11 12:41:59 -0400483
James E. Blairafe27e62017-08-03 15:11:47 -0700484.. attr:: web
David Shrewsburyae734d12017-07-11 12:41:59 -0400485
James E. Blairafe27e62017-08-03 15:11:47 -0700486 .. attr:: listen_address
487 :default: 127.0.0.1
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400488
James E. Blairafe27e62017-08-03 15:11:47 -0700489 IP address or domain name on which to listen.
David Shrewsburyae734d12017-07-11 12:41:59 -0400490
James E. Blairafe27e62017-08-03 15:11:47 -0700491 .. attr:: log_config
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400492
James E. Blairafe27e62017-08-03 15:11:47 -0700493 Path to log config file for the web server process.
David Shrewsburyae734d12017-07-11 12:41:59 -0400494
James E. Blairafe27e62017-08-03 15:11:47 -0700495 .. attr:: pidfile
496 :default: /var/run/zuul-web/zuul-web.pid
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400497
James E. Blairafe27e62017-08-03 15:11:47 -0700498 Path to PID lock file for the web server process.
David Shrewsburyae734d12017-07-11 12:41:59 -0400499
James E. Blairafe27e62017-08-03 15:11:47 -0700500 .. attr:: port
501 :default: 9000
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400502
James E. Blairafe27e62017-08-03 15:11:47 -0700503 Port to use for web server process.
David Shrewsburyae734d12017-07-11 12:41:59 -0400504
James E. Blairafe27e62017-08-03 15:11:47 -0700505 .. attr:: websocket_url
506
507 Base URL on which the websocket service is exposed, if different
508 than the base URL of the web app.
Tobias Henkelb4407fc2017-07-07 13:52:56 +0200509
David Shrewsburyae734d12017-07-11 12:41:59 -0400510Operation
511~~~~~~~~~
512
513To start the web server, run ``zuul-web``. To stop it, kill the
514PID which was saved in the pidfile specified in the configuration.