blob: 890405d952ab6c3059b5d2c07136821ff0166829 [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
9which is described below. All Zuul processes read the
James E. Blair97940192017-08-03 14:47:47 -070010``/etc/zuul/zuul.conf`` file (an alternate location may be supplied on
James E. Blaireff5a9d2017-06-20 00:00:37 -070011the command line) which uses an INI file syntax. Each component may
12have its own configuration file, though you may find it simpler to use
13the same file for all components.
14
James E. Blair97940192017-08-03 14:47:47 -070015An example ``zuul.conf``:
16
17.. code-block:: ini
18
19 [gearman]
20 server=localhost
21
22 [gearman_server]
23 start=true
24 log_config=/etc/zuul/gearman-logging.yaml
25
26 [zookeeper]
27 hosts=zk1.example.com,zk2.example.com,zk3.example.com
28
29 [webapp]
30 status_url=https://zuul.example.com/status
31
32 [scheduler]
33 log_config=/etc/zuul/scheduler-logging.yaml
34
35A minimal Zuul system may consist of a :ref:`scheduler` and
36:ref:`executor` both running on the same host. Larger installations
37should consider running multiple executors, each on a dedicated host,
38and running mergers on dedicated hosts as well.
James E. Blaireff5a9d2017-06-20 00:00:37 -070039
40Common
41------
42
43The following applies to all Zuul components.
44
45Configuration
46~~~~~~~~~~~~~
47
James E. Blair97940192017-08-03 14:47:47 -070048The following sections of ``zuul.conf`` are used by all Zuul components:
James E. Blaireff5a9d2017-06-20 00:00:37 -070049
James E. Blaireff5a9d2017-06-20 00:00:37 -070050
James E. Blair97940192017-08-03 14:47:47 -070051.. attr:: gearman
James E. Blaireff5a9d2017-06-20 00:00:37 -070052
James E. Blair97940192017-08-03 14:47:47 -070053 Client connection information for Gearman.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -040054
James E. Blair97940192017-08-03 14:47:47 -070055 .. attr:: server
56 :required:
James E. Blaireff5a9d2017-06-20 00:00:37 -070057
James E. Blair97940192017-08-03 14:47:47 -070058 Hostname or IP address of the Gearman server.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -040059
James E. Blair97940192017-08-03 14:47:47 -070060 .. attr:: port
61 :default: 4730
James E. Blaireff5a9d2017-06-20 00:00:37 -070062
James E. Blair97940192017-08-03 14:47:47 -070063 Port on which the Gearman server is listening.
James E. Blaireff5a9d2017-06-20 00:00:37 -070064
James E. Blair97940192017-08-03 14:47:47 -070065 .. attr:: ssl_ca
James E. Blaireff5a9d2017-06-20 00:00:37 -070066
James E. Blair97940192017-08-03 14:47:47 -070067 An openssl file containing a set of concatenated “certification
68 authority” certificates in PEM formet.
James E. Blaireff5a9d2017-06-20 00:00:37 -070069
James E. Blair97940192017-08-03 14:47:47 -070070 .. attr:: ssl_cert
71
72 An openssl file containing the client public certificate in PEM format.
73
74 .. attr:: ssl_key
75
76 An openssl file containing the client private key in PEM format.
James E. Blairfdb111d2017-06-23 20:56:05 +010077
James E. Blair4f3e6222017-07-05 14:52:08 -070078.. NOTE: this is a white lie at this point, since only the scheduler
79 uses this, however, we expect other components to use it later, so
80 it's reasonable for admins to plan for this now.
81
James E. Blair97940192017-08-03 14:47:47 -070082.. attr:: zookeeper
David Shrewsbury6b3b49b2017-07-11 13:00:38 -040083
James E. Blair97940192017-08-03 14:47:47 -070084 Client connection information for ZooKeeper
James E. Blairfdb111d2017-06-23 20:56:05 +010085
James E. Blair97940192017-08-03 14:47:47 -070086 .. attr:: hosts
87 :required:
88
89 A list of zookeeper hosts for Zuul to use when communicating
90 with Nodepool.
91
92
93.. _scheduler:
James E. Blaireff5a9d2017-06-20 00:00:37 -070094
95Scheduler
96---------
97
98The scheduler is the primary component of Zuul. The scheduler is not
99a scalable component; one, and only one, scheduler must be running at
100all times for Zuul to be operational. It receives events from any
101connections to remote systems which have been configured, enqueues
102items into pipelines, distributes jobs to executors, and reports
103results.
104
105Configuration
106~~~~~~~~~~~~~
107
James E. Blair97940192017-08-03 14:47:47 -0700108The following sections of ``zuul.conf`` are used by the scheduler:
James E. Blaireff5a9d2017-06-20 00:00:37 -0700109
James E. Blaireff5a9d2017-06-20 00:00:37 -0700110
James E. Blair97940192017-08-03 14:47:47 -0700111.. attr:: gearman_server
James E. Blaireff5a9d2017-06-20 00:00:37 -0700112
James E. Blair97940192017-08-03 14:47:47 -0700113 The builtin gearman server. Zuul can fork a gearman process from
114 itself rather than connecting to an external one.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400115
James E. Blair97940192017-08-03 14:47:47 -0700116 .. attr:: start
117 :default: false
James E. Blaireff5a9d2017-06-20 00:00:37 -0700118
James E. Blair97940192017-08-03 14:47:47 -0700119 Whether to start the internal Gearman server.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400120
James E. Blair97940192017-08-03 14:47:47 -0700121 .. attr:: listen_address
122 :default: all addresses
James E. Blaireff5a9d2017-06-20 00:00:37 -0700123
James E. Blair97940192017-08-03 14:47:47 -0700124 IP address or domain name on which to listen.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400125
James E. Blair97940192017-08-03 14:47:47 -0700126 .. attr:: log_config
James E. Blaireff5a9d2017-06-20 00:00:37 -0700127
James E. Blair97940192017-08-03 14:47:47 -0700128 Path to log config file for internal Gearman server.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700129
James E. Blair97940192017-08-03 14:47:47 -0700130 .. attr:: ssl_ca
James E. Blaireff5a9d2017-06-20 00:00:37 -0700131
James E. Blair97940192017-08-03 14:47:47 -0700132 An openssl file containing a set of concatenated “certification
133 authority” certificates in PEM formet.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700134
James E. Blair97940192017-08-03 14:47:47 -0700135 .. attr:: ssl_cert
James E. Blaireff5a9d2017-06-20 00:00:37 -0700136
James E. Blair97940192017-08-03 14:47:47 -0700137 An openssl file containing the server public certificate in PEM
138 format.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400139
James E. Blair97940192017-08-03 14:47:47 -0700140 .. attr:: ssl_key
James E. Blaireff5a9d2017-06-20 00:00:37 -0700141
James E. Blair97940192017-08-03 14:47:47 -0700142 An openssl file containing the server private key in PEM format.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400143
James E. Blair97940192017-08-03 14:47:47 -0700144.. attr:: webapp
James E. Blaireff5a9d2017-06-20 00:00:37 -0700145
James E. Blair97940192017-08-03 14:47:47 -0700146 .. attr:: listen_address
147 :default: all addresses
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400148
James E. Blair97940192017-08-03 14:47:47 -0700149 IP address or domain name on which to listen.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700150
James E. Blair97940192017-08-03 14:47:47 -0700151 .. attr:: port
152 :default: 8001
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400153
James E. Blair97940192017-08-03 14:47:47 -0700154 Port on which the webapp is listening.
James E. Blair4f3e6222017-07-05 14:52:08 -0700155
James E. Blair97940192017-08-03 14:47:47 -0700156 .. attr:: status_expiry
157 :default: 1
James E. Blaireff5a9d2017-06-20 00:00:37 -0700158
James E. Blair97940192017-08-03 14:47:47 -0700159 Zuul will cache the status.json file for this many seconds.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400160
James E. Blair97940192017-08-03 14:47:47 -0700161 .. attr:: status_url
James E. Blaireff5a9d2017-06-20 00:00:37 -0700162
James E. Blair97940192017-08-03 14:47:47 -0700163 URL that will be posted in Zuul comments made to changes when
164 starting jobs for a change.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400165
James E. Blair97940192017-08-03 14:47:47 -0700166 .. TODO: is this effectively required?
James E. Blaireff5a9d2017-06-20 00:00:37 -0700167
James E. Blair97940192017-08-03 14:47:47 -0700168.. attr:: scheduler
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400169
James E. Blair97940192017-08-03 14:47:47 -0700170 .. attr:: tenant_config
171 :required:
James E. Blaireff5a9d2017-06-20 00:00:37 -0700172
James E. Blair97940192017-08-03 14:47:47 -0700173 Path to :ref:`tenant-config` file.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400174
James E. Blair97940192017-08-03 14:47:47 -0700175 .. attr:: log_config
176
177 Path to log config file.
178
179 .. attr:: pidfile
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700180 :default: /var/run/zuul-schedurecr/zuul-scheduler.pid
James E. Blair97940192017-08-03 14:47:47 -0700181
182 Path to PID lock file.
183
184 .. attr:: state_dir
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700185 :default: /var/lib/zuul
James E. Blair97940192017-08-03 14:47:47 -0700186
187 Path to directory in which Zuul should save its state.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700188
189Operation
190~~~~~~~~~
191
192To start the scheduler, run ``zuul-scheduler``. To stop it, kill the
193PID which was saved in the pidfile specified in the configuration.
194
195Most of Zuul's configuration is automatically updated as changes to
196the repositories which contain it are merged. However, Zuul must be
197explicitly notified of changes to the tenant config file, since it is
198not read from a git repository. To do so, send the scheduler PID
James E. Blair97940192017-08-03 14:47:47 -0700199(saved in the pidfile specified in the configuration) a `SIGHUP`
200signal.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700201
202Merger
203------
204
205Mergers are an optional Zuul service; they are not required for Zuul
206to operate, but some high volume sites may benefit from running them.
207Zuul performs quite a lot of git operations in the course of its work.
208Each change that is to be tested must be speculatively merged with the
209current state of its target branch to ensure that it can merge, and to
210ensure that the tests that Zuul perform accurately represent the
211outcome of merging the change. Because Zuul's configuration is stored
212in the git repos it interacts with, and is dynamically evaluated, Zuul
213often needs to perform a speculative merge in order to determine
214whether it needs to perform any further actions.
215
216All of these git operations add up, and while Zuul executors can also
217perform them, large numbers may impact their ability to run jobs.
218Therefore, administrators may wish to run standalone mergers in order
219to reduce the load on executors.
220
221Configuration
222~~~~~~~~~~~~~
223
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700224The following section of ``zuul.conf`` is used by the merger:
James E. Blaireff5a9d2017-06-20 00:00:37 -0700225
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700226.. attr:: merger
James E. Blaireff5a9d2017-06-20 00:00:37 -0700227
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700228 .. attr:: git_dir
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400229
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700230 Directory in which Zuul should clone git repositories.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700231
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700232 .. attr:: git_user_email
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400233
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700234 Value to pass to `git config user.email
235 <https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup>`_.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700236
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700237 .. attr:: git_user_name
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400238
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700239 Value to pass to `git config user.name
240 <https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup>`_.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700241
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700242 .. attr:: log_config
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400243
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700244 Path to log config file for the merger process.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700245
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700246 .. attr:: pidfile
247 :default: /var/run/zuul-merger/zuul-merger.pid
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400248
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700249 Path to PID lock file for the merger process.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700250
251Operation
252~~~~~~~~~
253
254To start the merger, run ``zuul-merger``. To stop it, kill the
255PID which was saved in the pidfile specified in the configuration.
256
David Shrewsburyb040b0a2017-08-03 15:53:59 -0400257.. _executor:
258
James E. Blaireff5a9d2017-06-20 00:00:37 -0700259Executor
260--------
261
262Executors are responsible for running jobs. At the start of each job,
263an executor prepares an environment in which to run Ansible which
264contains all of the git repositories specified by the job with all
265dependent changes merged into their appropriate branches. The branch
266corresponding to the proposed change will be checked out (in all
267projects, if it exists). Any roles specified by the job will also be
268present (also with dependent changes merged, if appropriate) and added
269to the Ansible role path. The executor also prepares an Ansible
270inventory file with all of the nodes requested by the job.
271
272The executor also contains a merger. This is used by the executor to
273prepare the git repositories used by jobs, but is also available to
274perform any tasks normally performed by standalone mergers. Because
275the executor performs both roles, small Zuul installations may not
276need to run standalone mergers.
277
278Trusted and Untrusted Playbooks
279~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
280
281The executor runs playbooks in one of two execution contexts depending
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700282on whether the project containing the playbook is a
283:term:`config-project` or an :term:`untrusted-project`. If the
284playbook is in a config project, the executor runs the playbook in the
285*trusted* execution context, otherwise, it is run in the *untrusted*
286execution context.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700287
288Both execution contexts use `bubblewrap`_ to create a namespace to
289ensure that playbook executions are isolated and are unable to access
290files outside of a restricted environment. The administrator may
291configure additional local directories on the executor to be made
292available to the restricted environment.
293
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700294The trusted execution context has access to all Ansible features,
James E. Blaireff5a9d2017-06-20 00:00:37 -0700295including the ability to load custom Ansible modules. Needless to
296say, extra scrutiny should be given to code that runs in a trusted
297context as it could be used to compromise other jobs running on the
298executor, or the executor itself, especially if the administrator has
299granted additional access through bubblewrap, or a method of escaping
300the restricted environment created by bubblewrap is found.
301
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700302Playbooks run in the untrusted execution context are not permitted to
303load additional Ansible modules or access files outside of the
James E. Blaireff5a9d2017-06-20 00:00:37 -0700304restricted environment prepared for them by the executor. In addition
305to the bubblewrap environment applied to both execution contexts, in
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700306the untrusted context some standard Ansible modules are replaced with
307versions which prohibit some actions, including attempts to access
308files outside of the restricted execution context. These redundant
309protections are made as part of a defense-in-depth strategy.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700310
311.. _bubblewrap: https://github.com/projectatomic/bubblewrap
312
313Configuration
314~~~~~~~~~~~~~
315
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700316The following sections of ``zuul.conf`` are used by the executor:
James E. Blaireff5a9d2017-06-20 00:00:37 -0700317
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700318.. attr:: executor
James E. Blaireff5a9d2017-06-20 00:00:37 -0700319
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700320 .. attr:: finger_port
321 :default: 79
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400322
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700323 Port to use for finger log streamer.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700324
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700325 .. attr:: git_dir
326 :default: /var/lib/zuul/git
James E. Blair7e6e0a12017-07-25 11:04:42 -0700327
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700328 Directory that Zuul should clone local git repositories to. The
329 executor keeps a local copy of every git repository it works
330 with to speed operations and perform speculative merging.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400331
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700332 This should be on the same filesystem as
333 :attr:`executor.job_dir` so that when git repos are cloned into
334 the job workspaces, they can be hard-linked to the local git
335 cache.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700336
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700337 .. attr:: job_dir
338 :default: /tmp
James E. Blair7e6e0a12017-07-25 11:04:42 -0700339
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700340 Directory that Zuul should use to hold temporary job directories.
341 When each job is run, a new entry will be created under this
342 directory to hold the configuration and scratch workspace for
343 that job. It will be deleted at the end of the job (unless the
344 `--keep-jobdir` command line option is specified).
James E. Blair7e6e0a12017-07-25 11:04:42 -0700345
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700346 This should be on the same filesystem as :attr:`executor.git_dir`
347 so that when git repos are cloned into the job workspaces, they
348 can be hard-linked to the local git cache.
James E. Blair7e6e0a12017-07-25 11:04:42 -0700349
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700350 .. attr:: log_config
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400351
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700352 Path to log config file for the executor process.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700353
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700354 .. attr:: pidfile
355 :default: /var/run/zuul-executor/zuul-executor.pid
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400356
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700357 Path to PID lock file for the executor process.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700358
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700359 .. attr:: private_key_file
360 :default: ~/.ssh/id_rsa
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400361
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700362 SSH private key file to be used when logging into worker nodes.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700363
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700364 .. attr:: user
365 :default: zuul
Jamie Lennox7655b552017-03-17 12:33:38 +1100366
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700367 User ID for the zuul-executor process. In normal operation as a
368 daemon, the executor should be started as the ``root`` user, but
369 it will drop privileges to this user during startup.
Jamie Lennox7655b552017-03-17 12:33:38 +1100370
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700371 .. _admin_sitewide_variables:
Jamie Lennox7655b552017-03-17 12:33:38 +1100372
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700373 .. attr:: variables
Jamie Lennox7655b552017-03-17 12:33:38 +1100374
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700375 Path to an Ansible variables file to supply site-wide variables.
376 This should be a YAML-formatted file consisting of a single
377 dictionary. The contents will be made available to all jobs as
378 Ansible variables. These variables take precedence over all
379 other forms (job variables and secrets). Care should be taken
380 when naming these variables to avoid potential collisions with
381 those used by jobs. Prefixing variable names with a
382 site-specific identifier is recommended. The default is not to
383 add any site-wide variables. See the :ref:`User's Guide
384 <user_sitewide_variables>` for more information.
Clint Byrumdc8a0902017-07-20 16:36:27 -0700385
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700386 .. attr:: disk_limit_per_job
387 :default: 250
Clint Byrumdc8a0902017-07-20 16:36:27 -0700388
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700389 This integer is the maximum number of megabytes that any one job
390 is allowed to consume on disk while it is running. If a job's
391 scratch space has more than this much space consumed, it will be
392 aborted.
Monty Taylor01380dd2017-07-28 16:01:20 -0500393
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700394 .. attr:: trusted_ro_paths
Monty Taylor01380dd2017-07-28 16:01:20 -0500395
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700396 List of paths, separated by ``:`` to read-only bind mount into
397 trusted bubblewrap contexts.
Monty Taylor01380dd2017-07-28 16:01:20 -0500398
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700399 .. attr:: trusted_rw_paths
Monty Taylor01380dd2017-07-28 16:01:20 -0500400
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700401 List of paths, separated by ``:`` to read-write bind mount into
402 trusted bubblewrap contexts.
Monty Taylor01380dd2017-07-28 16:01:20 -0500403
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700404 .. attr:: untrusted_ro_paths
Monty Taylor01380dd2017-07-28 16:01:20 -0500405
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700406 List of paths, separated by ``:`` to read-only bind mount into
407 untrusted bubblewrap contexts.
Monty Taylor01380dd2017-07-28 16:01:20 -0500408
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700409 .. attr:: untrusted_rw_paths
Monty Taylor01380dd2017-07-28 16:01:20 -0500410
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700411 List of paths, separated by ``:`` to read-write bind mount into
412 untrusted bubblewrap contexts.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700413
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700414.. attr:: merger
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400415
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700416 .. attr:: git_user_email
James E. Blaireff5a9d2017-06-20 00:00:37 -0700417
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700418 Value to pass to `git config user.email
419 <https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup>`_.
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400420
James E. Blair9d0b4cc2017-08-03 15:08:47 -0700421 .. attr:: git_user_name
422
423 Value to pass to `git config user.name
424 <https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup>`_.
James E. Blaireff5a9d2017-06-20 00:00:37 -0700425
426Operation
427~~~~~~~~~
428
429To start the executor, run ``zuul-executor``.
430
431There are several commands which can be run to control the executor's
432behavior once it is running.
433
434To stop the executor immediately, aborting all jobs (they may be
435relaunched according to their retry policy), run ``zuul-executor
436stop``.
437
438To request that the executor stop executing new jobs and exit when all
439currently running jobs have completed, run ``zuul-executor graceful``.
440
James E. Blairafe27e62017-08-03 15:11:47 -0700441To enable or disable running Ansible in verbose mode (with the
442``-vvv`` argument to ansible-playbook) run ``zuul-executor verbose``
443and ``zuul-executor unverbose``.
David Shrewsburyae734d12017-07-11 12:41:59 -0400444
445Web Server
446----------
447
448The Zuul web server currently acts as a websocket interface to live log
449streaming. Eventually, it will serve as the single process handling all
450HTTP interactions with Zuul.
451
452Configuration
453~~~~~~~~~~~~~
454
James E. Blairafe27e62017-08-03 15:11:47 -0700455In addition to the common configuration sections, the following
456sections of ``zuul.conf`` are used by the web server:
David Shrewsburyae734d12017-07-11 12:41:59 -0400457
James E. Blairafe27e62017-08-03 15:11:47 -0700458.. attr:: web
David Shrewsburyae734d12017-07-11 12:41:59 -0400459
James E. Blairafe27e62017-08-03 15:11:47 -0700460 .. attr:: listen_address
461 :default: 127.0.0.1
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400462
James E. Blairafe27e62017-08-03 15:11:47 -0700463 IP address or domain name on which to listen.
David Shrewsburyae734d12017-07-11 12:41:59 -0400464
James E. Blairafe27e62017-08-03 15:11:47 -0700465 .. attr:: log_config
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400466
James E. Blairafe27e62017-08-03 15:11:47 -0700467 Path to log config file for the web server process.
David Shrewsburyae734d12017-07-11 12:41:59 -0400468
James E. Blairafe27e62017-08-03 15:11:47 -0700469 .. attr:: pidfile
470 :default: /var/run/zuul-web/zuul-web.pid
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400471
James E. Blairafe27e62017-08-03 15:11:47 -0700472 Path to PID lock file for the web server process.
David Shrewsburyae734d12017-07-11 12:41:59 -0400473
James E. Blairafe27e62017-08-03 15:11:47 -0700474 .. attr:: port
475 :default: 9000
David Shrewsbury6b3b49b2017-07-11 13:00:38 -0400476
James E. Blairafe27e62017-08-03 15:11:47 -0700477 Port to use for web server process.
David Shrewsburyae734d12017-07-11 12:41:59 -0400478
James E. Blairafe27e62017-08-03 15:11:47 -0700479 .. attr:: websocket_url
480
481 Base URL on which the websocket service is exposed, if different
482 than the base URL of the web app.
Tobias Henkelb4407fc2017-07-07 13:52:56 +0200483
David Shrewsburyae734d12017-07-11 12:41:59 -0400484Operation
485~~~~~~~~~
486
487To start the web server, run ``zuul-web``. To stop it, kill the
488PID which was saved in the pidfile specified in the configuration.