James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 1 | :title: Components |
| 2 | |
| 3 | .. _components: |
| 4 | |
| 5 | Components |
| 6 | ========== |
| 7 | |
| 8 | Zuul is a distributed system consisting of several components, each of |
| 9 | which is described below. All Zuul processes read the |
| 10 | **/etc/zuul/zuul.conf** file (an alternate location may be supplied on |
| 11 | the command line) which uses an INI file syntax. Each component may |
| 12 | have its own configuration file, though you may find it simpler to use |
| 13 | the same file for all components. |
| 14 | |
| 15 | A minimal Zuul system may consist of a *scheduler* and *executor* both |
| 16 | running on the same host. Larger installations should consider |
| 17 | running multiple executors, each on a dedicated host, and running |
| 18 | mergers on dedicated hosts as well. |
| 19 | |
| 20 | Common |
| 21 | ------ |
| 22 | |
| 23 | The following applies to all Zuul components. |
| 24 | |
| 25 | Configuration |
| 26 | ~~~~~~~~~~~~~ |
| 27 | |
| 28 | The following sections of **zuul.conf** are used by all Zuul components: |
| 29 | |
| 30 | gearman |
| 31 | """"""" |
| 32 | |
| 33 | Client connection information for gearman. |
| 34 | |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 35 | **server** (required) |
| 36 | Hostname or IP address of the Gearman server:: |
| 37 | |
| 38 | server=gearman.example.com |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 39 | |
| 40 | **port** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 41 | Port on which the Gearman server is listening:: |
| 42 | |
| 43 | port=4730 |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 44 | |
| 45 | **ssl_ca** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 46 | An openssl file containing a set of concatenated “certification |
| 47 | authority” certificates in PEM formet. |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 48 | |
| 49 | **ssl_cert** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 50 | An openssl file containing the client public certificate in PEM format. |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 51 | |
| 52 | **ssl_key** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 53 | An openssl file containing the client private key in PEM format. |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 54 | |
James E. Blair | fdb111d | 2017-06-23 20:56:05 +0100 | [diff] [blame] | 55 | zookeeper |
| 56 | """"""""" |
| 57 | |
James E. Blair | 4f3e622 | 2017-07-05 14:52:08 -0700 | [diff] [blame] | 58 | .. NOTE: this is a white lie at this point, since only the scheduler |
| 59 | uses this, however, we expect other components to use it later, so |
| 60 | it's reasonable for admins to plan for this now. |
| 61 | |
James E. Blair | fdb111d | 2017-06-23 20:56:05 +0100 | [diff] [blame] | 62 | **hosts** |
| 63 | A list of zookeeper hosts for Zuul to use when communicating with |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 64 | Nodepool:: |
| 65 | |
| 66 | hosts=zk1.example.com,zk2.example.com,zk3.example.com |
James E. Blair | fdb111d | 2017-06-23 20:56:05 +0100 | [diff] [blame] | 67 | |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 68 | |
| 69 | Scheduler |
| 70 | --------- |
| 71 | |
| 72 | The scheduler is the primary component of Zuul. The scheduler is not |
| 73 | a scalable component; one, and only one, scheduler must be running at |
| 74 | all times for Zuul to be operational. It receives events from any |
| 75 | connections to remote systems which have been configured, enqueues |
| 76 | items into pipelines, distributes jobs to executors, and reports |
| 77 | results. |
| 78 | |
| 79 | Configuration |
| 80 | ~~~~~~~~~~~~~ |
| 81 | |
| 82 | The following sections of **zuul.conf** are used by the scheduler: |
| 83 | |
| 84 | gearman_server |
| 85 | """""""""""""" |
| 86 | |
| 87 | The builtin gearman server. Zuul can fork a gearman process from itself rather |
| 88 | than connecting to an external one. |
| 89 | |
| 90 | **start** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 91 | Whether to start the internal Gearman server (default: False):: |
| 92 | |
| 93 | start=true |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 94 | |
| 95 | **listen_address** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 96 | IP address or domain name on which to listen (default: all addresses):: |
| 97 | |
| 98 | listen_address=127.0.0.1 |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 99 | |
| 100 | **log_config** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 101 | Path to log config file for internal Gearman server:: |
| 102 | |
| 103 | log_config=/etc/zuul/gearman-logging.yaml |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 104 | |
| 105 | **ssl_ca** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 106 | An openssl file containing a set of concatenated “certification authority” |
| 107 | certificates in PEM formet. |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 108 | |
| 109 | **ssl_cert** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 110 | An openssl file containing the server public certificate in PEM format. |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 111 | |
| 112 | **ssl_key** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 113 | An openssl file containing the server private key in PEM format. |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 114 | |
| 115 | webapp |
| 116 | """""" |
| 117 | |
| 118 | **listen_address** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 119 | IP address or domain name on which to listen (default: 0.0.0.0):: |
| 120 | |
| 121 | listen_address=127.0.0.1 |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 122 | |
| 123 | **port** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 124 | Port on which the webapp is listening (default: 8001):: |
| 125 | |
| 126 | port=8008 |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 127 | |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 128 | **status_expiry** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 129 | Zuul will cache the status.json file for this many seconds (default: 1):: |
| 130 | |
| 131 | status_expiry=1 |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 132 | |
James E. Blair | 4f3e622 | 2017-07-05 14:52:08 -0700 | [diff] [blame] | 133 | **status_url** |
| 134 | URL that will be posted in Zuul comments made to changes when |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 135 | starting jobs for a change. Used by zuul-scheduler only:: |
| 136 | |
| 137 | status_url=https://zuul.example.com/status |
James E. Blair | 4f3e622 | 2017-07-05 14:52:08 -0700 | [diff] [blame] | 138 | |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 139 | scheduler |
| 140 | """"""""" |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 141 | |
| 142 | **tenant_config** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 143 | Path to tenant config file:: |
| 144 | |
| 145 | layout_config=/etc/zuul/tenant.yaml |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 146 | |
| 147 | **log_config** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 148 | Path to log config file:: |
| 149 | |
| 150 | log_config=/etc/zuul/scheduler-logging.yaml |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 151 | |
| 152 | **pidfile** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 153 | Path to PID lock file:: |
| 154 | |
| 155 | pidfile=/var/run/zuul/scheduler.pid |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 156 | |
| 157 | **state_dir** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 158 | Path to directory that Zuul should save state to:: |
| 159 | |
| 160 | state_dir=/var/lib/zuul |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 161 | |
| 162 | Operation |
| 163 | ~~~~~~~~~ |
| 164 | |
| 165 | To start the scheduler, run ``zuul-scheduler``. To stop it, kill the |
| 166 | PID which was saved in the pidfile specified in the configuration. |
| 167 | |
| 168 | Most of Zuul's configuration is automatically updated as changes to |
| 169 | the repositories which contain it are merged. However, Zuul must be |
| 170 | explicitly notified of changes to the tenant config file, since it is |
| 171 | not read from a git repository. To do so, send the scheduler PID |
| 172 | (saved in the pidfile specified in the configuration) a SIGHUP signal. |
| 173 | |
| 174 | Merger |
| 175 | ------ |
| 176 | |
| 177 | Mergers are an optional Zuul service; they are not required for Zuul |
| 178 | to operate, but some high volume sites may benefit from running them. |
| 179 | Zuul performs quite a lot of git operations in the course of its work. |
| 180 | Each change that is to be tested must be speculatively merged with the |
| 181 | current state of its target branch to ensure that it can merge, and to |
| 182 | ensure that the tests that Zuul perform accurately represent the |
| 183 | outcome of merging the change. Because Zuul's configuration is stored |
| 184 | in the git repos it interacts with, and is dynamically evaluated, Zuul |
| 185 | often needs to perform a speculative merge in order to determine |
| 186 | whether it needs to perform any further actions. |
| 187 | |
| 188 | All of these git operations add up, and while Zuul executors can also |
| 189 | perform them, large numbers may impact their ability to run jobs. |
| 190 | Therefore, administrators may wish to run standalone mergers in order |
| 191 | to reduce the load on executors. |
| 192 | |
| 193 | Configuration |
| 194 | ~~~~~~~~~~~~~ |
| 195 | |
| 196 | The following section of **zuul.conf** is used by the merger: |
| 197 | |
| 198 | merger |
| 199 | """""" |
| 200 | |
| 201 | **git_dir** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 202 | Directory that Zuul should clone local git repositories to:: |
| 203 | |
| 204 | git_dir=/var/lib/zuul/git |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 205 | |
| 206 | **git_user_email** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 207 | Value to pass to `git config user.email`:: |
| 208 | |
| 209 | git_user_email=zuul@example.com |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 210 | |
| 211 | **git_user_name** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 212 | Value to pass to `git config user.name`:: |
| 213 | |
| 214 | git_user_name=zuul |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 215 | |
| 216 | **log_config** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 217 | Path to log config file for the merger process:: |
| 218 | |
| 219 | log_config=/etc/zuul/logging.yaml |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 220 | |
| 221 | **pidfile** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 222 | Path to PID lock file for the merger process:: |
| 223 | |
| 224 | pidfile=/var/run/zuul-merger/merger.pid |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 225 | |
| 226 | Operation |
| 227 | ~~~~~~~~~ |
| 228 | |
| 229 | To start the merger, run ``zuul-merger``. To stop it, kill the |
| 230 | PID which was saved in the pidfile specified in the configuration. |
| 231 | |
| 232 | Executor |
| 233 | -------- |
| 234 | |
| 235 | Executors are responsible for running jobs. At the start of each job, |
| 236 | an executor prepares an environment in which to run Ansible which |
| 237 | contains all of the git repositories specified by the job with all |
| 238 | dependent changes merged into their appropriate branches. The branch |
| 239 | corresponding to the proposed change will be checked out (in all |
| 240 | projects, if it exists). Any roles specified by the job will also be |
| 241 | present (also with dependent changes merged, if appropriate) and added |
| 242 | to the Ansible role path. The executor also prepares an Ansible |
| 243 | inventory file with all of the nodes requested by the job. |
| 244 | |
| 245 | The executor also contains a merger. This is used by the executor to |
| 246 | prepare the git repositories used by jobs, but is also available to |
| 247 | perform any tasks normally performed by standalone mergers. Because |
| 248 | the executor performs both roles, small Zuul installations may not |
| 249 | need to run standalone mergers. |
| 250 | |
| 251 | Trusted and Untrusted Playbooks |
| 252 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 253 | |
| 254 | The executor runs playbooks in one of two execution contexts depending |
| 255 | on whether the project containing the playbook is a *config project* |
| 256 | or an *untrusted project*. If the playbook is in a *config project*, |
| 257 | the executor runs the playbook in the *trusted* execution context, |
| 258 | otherwise, it is run in the *untrusted* execution context. |
| 259 | |
| 260 | Both execution contexts use `bubblewrap`_ to create a namespace to |
| 261 | ensure that playbook executions are isolated and are unable to access |
| 262 | files outside of a restricted environment. The administrator may |
| 263 | configure additional local directories on the executor to be made |
| 264 | available to the restricted environment. |
| 265 | |
| 266 | The *trusted* execution context has access to all Ansible features, |
| 267 | including the ability to load custom Ansible modules. Needless to |
| 268 | say, extra scrutiny should be given to code that runs in a trusted |
| 269 | context as it could be used to compromise other jobs running on the |
| 270 | executor, or the executor itself, especially if the administrator has |
| 271 | granted additional access through bubblewrap, or a method of escaping |
| 272 | the restricted environment created by bubblewrap is found. |
| 273 | |
| 274 | Playbooks run in the *untrusted* execution context are not permitted |
| 275 | to load additional Ansible modules or access files outside of the |
| 276 | restricted environment prepared for them by the executor. In addition |
| 277 | to the bubblewrap environment applied to both execution contexts, in |
| 278 | the *untrusted* context some standard Ansible modules are replaced |
| 279 | with versions which prohibit some actions, including attempts to |
| 280 | access files outside of the restricted execution context. These |
| 281 | redundant protections are made as part of a defense-in-depth strategy. |
| 282 | |
| 283 | .. _bubblewrap: https://github.com/projectatomic/bubblewrap |
| 284 | |
| 285 | Configuration |
| 286 | ~~~~~~~~~~~~~ |
| 287 | |
| 288 | The following sections of **zuul.conf** are used by the executor: |
| 289 | |
| 290 | executor |
| 291 | """""""" |
| 292 | |
| 293 | **finger_port** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 294 | Port to use for finger log streamer:: |
| 295 | |
| 296 | finger_port=79 |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 297 | |
| 298 | **git_dir** |
James E. Blair | 7e6e0a1 | 2017-07-25 11:04:42 -0700 | [diff] [blame] | 299 | Directory that Zuul should clone local git repositories to. The |
| 300 | executor keeps a local copy of every git repository it works with to |
| 301 | speed operations and perform speculative merging. |
| 302 | |
| 303 | This should be on the same filesystem as **job_dir** so that when |
| 304 | git repos are cloned into the job workspaces, they can be |
| 305 | hard-linked to the local git cache. Example:: |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 306 | |
| 307 | git_dir=/var/lib/zuul/git |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 308 | |
James E. Blair | 7e6e0a1 | 2017-07-25 11:04:42 -0700 | [diff] [blame] | 309 | **job_dir** |
| 310 | Directory that Zuul should use to hold temporary job directories. |
| 311 | When each job is run, a new entry will be created under this |
| 312 | directory to hold the configuration and scratch workspace for that |
| 313 | job. It will be deleted at the end of the job (unless the |
| 314 | `--keep-jobdir` command line option is specified). |
| 315 | |
| 316 | This should be on the same filesystem as **git_dir** so that when |
| 317 | git repos are cloned into the job workspaces, they can be |
| 318 | hard-linked to the local git cache. Example:: |
| 319 | |
| 320 | job_dir=/var/lib/zuul/jobs |
| 321 | |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 322 | **log_config** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 323 | Path to log config file for the executor process:: |
| 324 | |
| 325 | log_config=/etc/zuul/logging.yaml |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 326 | |
| 327 | **private_key_file** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 328 | SSH private key file to be used when logging into worker nodes:: |
| 329 | |
| 330 | private_key_file=~/.ssh/id_rsa |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 331 | |
| 332 | **user** |
| 333 | User ID for the zuul-executor process. In normal operation as a daemon, |
| 334 | the executor should be started as the ``root`` user, but it will drop |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 335 | privileges to this user during startup:: |
| 336 | |
| 337 | user=zuul |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 338 | |
Jamie Lennox | 7655b55 | 2017-03-17 12:33:38 +1100 | [diff] [blame] | 339 | .. _admin_sitewide_variables: |
| 340 | |
| 341 | **variables** |
| 342 | Path to an Ansible variables file to supply site-wide variables. |
| 343 | This should be a YAML-formatted file consisting of a single |
| 344 | dictionary. The contents will be made available to all jobs as |
| 345 | Ansible variables. These variables take precedence over all other |
| 346 | forms (job variables and secrets). Care should be taken when naming |
| 347 | these variables to avoid potential collisions with those used by |
| 348 | jobs. Prefixing variable names with a site-specific identifier is |
| 349 | recommended. The default is not to add any site-wide variables. |
| 350 | See the :ref:`User's Guide <user_sitewide_variables>` for more |
| 351 | information. |
| 352 | |
| 353 | Example:: |
| 354 | |
| 355 | variables=/etc/zuul/variables.yaml |
| 356 | |
Clint Byrum | dc8a090 | 2017-07-20 16:36:27 -0700 | [diff] [blame] | 357 | **disk_limit_per_job** |
| 358 | This integer is the maximum number of megabytes that any one job is |
| 359 | allowed to consume on disk while it is running. If a job's scratch |
| 360 | space has more than this much space consumed, it will be aborted:: |
| 361 | |
| 362 | disk_limit_per_job=100 |
| 363 | |
Monty Taylor | 01380dd | 2017-07-28 16:01:20 -0500 | [diff] [blame] | 364 | **trusted_ro_paths** |
| 365 | |
| 366 | List of paths, separated by ':' to read-only bind mount into trusted |
| 367 | bubblewrap contexts. |
| 368 | |
| 369 | **trusted_rw_paths** |
| 370 | |
| 371 | List of paths, separated by ':' to read-write bind mount into trusted |
| 372 | bubblewrap contexts. |
| 373 | |
| 374 | **untrusted_ro_paths** |
| 375 | |
| 376 | List of paths, separated by ':' to read-only bind mount into untrusted |
| 377 | bubblewrap contexts. |
| 378 | |
| 379 | **untrusted_rw_paths** |
| 380 | |
| 381 | List of paths, separated by ':' to read-write bind mount into untrusted |
| 382 | bubblewrap contexts. |
| 383 | |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 384 | merger |
| 385 | """""" |
| 386 | |
| 387 | **git_user_email** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 388 | Value to pass to `git config user.email`:: |
| 389 | |
| 390 | git_user_email=zuul@example.com |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 391 | |
| 392 | **git_user_name** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 393 | Value to pass to `git config user.name`:: |
| 394 | |
| 395 | git_user_name=zuul |
James E. Blair | eff5a9d | 2017-06-20 00:00:37 -0700 | [diff] [blame] | 396 | |
| 397 | Operation |
| 398 | ~~~~~~~~~ |
| 399 | |
| 400 | To start the executor, run ``zuul-executor``. |
| 401 | |
| 402 | There are several commands which can be run to control the executor's |
| 403 | behavior once it is running. |
| 404 | |
| 405 | To stop the executor immediately, aborting all jobs (they may be |
| 406 | relaunched according to their retry policy), run ``zuul-executor |
| 407 | stop``. |
| 408 | |
| 409 | To request that the executor stop executing new jobs and exit when all |
| 410 | currently running jobs have completed, run ``zuul-executor graceful``. |
| 411 | |
| 412 | To enable or disable running Ansible in verbose mode (with the '-vvv' |
| 413 | argument to ansible-playbook) run ``zuul-executor verbose`` and |
| 414 | ``zuul-executor unverbose``. |
David Shrewsbury | ae734d1 | 2017-07-11 12:41:59 -0400 | [diff] [blame] | 415 | |
| 416 | Web Server |
| 417 | ---------- |
| 418 | |
| 419 | The Zuul web server currently acts as a websocket interface to live log |
| 420 | streaming. Eventually, it will serve as the single process handling all |
| 421 | HTTP interactions with Zuul. |
| 422 | |
| 423 | Configuration |
| 424 | ~~~~~~~~~~~~~ |
| 425 | |
| 426 | In addition to the ``gearman`` common configuration section, the following |
| 427 | sections of **zuul.conf** are used by the web server: |
| 428 | |
| 429 | web |
| 430 | """ |
| 431 | |
| 432 | **listen_address** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 433 | IP address or domain name on which to listen (default: 127.0.0.1):: |
| 434 | |
| 435 | listen_address=127.0.0.1 |
David Shrewsbury | ae734d1 | 2017-07-11 12:41:59 -0400 | [diff] [blame] | 436 | |
| 437 | **log_config** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 438 | Path to log config file for the web server process:: |
| 439 | |
| 440 | log_config=/etc/zuul/logging.yaml |
David Shrewsbury | ae734d1 | 2017-07-11 12:41:59 -0400 | [diff] [blame] | 441 | |
| 442 | **pidfile** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 443 | Path to PID lock file for the web server process:: |
| 444 | |
| 445 | pidfile=/var/run/zuul-web/zuul-web.pid |
David Shrewsbury | ae734d1 | 2017-07-11 12:41:59 -0400 | [diff] [blame] | 446 | |
| 447 | **port** |
David Shrewsbury | 6b3b49b | 2017-07-11 13:00:38 -0400 | [diff] [blame] | 448 | Port to use for web server process:: |
| 449 | |
| 450 | port=9000 |
David Shrewsbury | ae734d1 | 2017-07-11 12:41:59 -0400 | [diff] [blame] | 451 | |
Tobias Henkel | b4407fc | 2017-07-07 13:52:56 +0200 | [diff] [blame] | 452 | **websocket_url** |
| 453 | Base URL on which the websocket service is exposed, if different than the |
| 454 | base URL of the web app. |
| 455 | |
David Shrewsbury | ae734d1 | 2017-07-11 12:41:59 -0400 | [diff] [blame] | 456 | Operation |
| 457 | ~~~~~~~~~ |
| 458 | |
| 459 | To start the web server, run ``zuul-web``. To stop it, kill the |
| 460 | PID which was saved in the pidfile specified in the configuration. |