blob: 99937759b257b2d8e919fcd96c9f7f6fa82c80cb [file] [log] [blame]
James E. Blaireff5a9d2017-06-20 00:00:37 -07001Quick Start Guide
2=================
3
4This provides a very simple overview of Zuul. It is recommended to
5read the following sections for more details.
6
7Install Zuul
8------------
9
10You can get zuul from pypi via::
11
12 pip install zuul
13
14Zuul Components
15---------------
16
17Zuul provides the following components:
18
19 - **zuul-scheduler**: The main Zuul process. Handles receiving
20 events, executing jobs, collecting results and posting reports.
21 Coordinates the work of the other components.
22
23 - **zuul-merger**: Scale-out component that performs git merge
24 operations. Zuul performs a large number of git operations in
25 the course of its work. Adding merger processes can help speed
26 Zuul's processing. This component is optional (zero or more of
27 these can be run).
28
29 - **zuul-executor**: Scale-out component for executing jobs. At
30 least one of these is required. Depending on system
31 configuration, you can expect a single executor to handle up to
32 about 100 simultaneous jobs. Can handle the functions of a
33 merger if dedicated mergers are not provided. One or more of
34 these must be run.
35
36 - **gearman**: optional builtin gearman daemon provided by zuul-scheduler
37
38External components:
39
40 - **gearman**: A gearman daemon if the built-in daemon is not used.
41
42 - **zookeeper**: A zookeeper cluster (or single host) for
43 communicating with Nodepool.
44
45 - **nodepool**: Provides nodes for Zuul to use when executing jobs.
46
47
48Zuul Setup
49----------
50
51At minimum you need to provide **zuul.conf** and **main.yaml** placed
52in **/etc/zuul/**. The following example uses the builtin gearman
53service in Zuul, and a connection to Gerrit.
54
55**zuul.conf**::
56
James E. Blair39840362017-06-23 20:34:02 +010057 [scheduler]
James E. Blaireff5a9d2017-06-20 00:00:37 -070058 tenant_config=/etc/zuul/main.yaml
59
60 [gearman_server]
61 start=true
62
63 [gearman]
64 server=127.0.0.1
65
66 [connection gerrit]
67 driver=gerrit
68 server=git.example.com
69 port=29418
70 baseurl=https://git.example.com/gerrit/
71 user=zuul
72 sshkey=/home/zuul/.ssh/id_rsa
73
74See :ref:`components` and :ref:`connections` for more details.
75
76The following tells Zuul to read its configuration from and operate on
77the *example-project* project:
78
79**main.yaml**::
80
81 - tenant:
82 name: example-tenant
83 source:
84 gerrit:
85 untrusted-projects:
86 - example-project
87
88Starting Zuul
89-------------
90
91You can run any zuul process with the **-d** option to make it not
92daemonize. It's a good idea at first to confirm there's no issues with
93your configuration.
94
95To start, simply run::
96
97 zuul-scheduler
98
99Once run you should have two zuul-scheduler processes (if using the
100built-in gearman server, or one process otherwise).
101
102Before Zuul can run any jobs, it needs to load its configuration, most
103of which is in the git repositories that Zuul operates on. Start an
104executor to allow zuul to do that::
105
106 zuul-executor
107
108Zuul should now be able to read its configuration from the configured
109repo and process any jobs defined therein.
110
111Troubleshooting
112---------------
113
114You can use telnet to connect to gearman to check which Zuul
115components are online::
116
117 telnet <gearman_ip> 4730
118
119Useful commands are **workers** and **status** which you can run by just
120typing those commands once connected to gearman.