blob: 85a7c78b309b6770e23a74c33c623a88ee0ce496 [file] [log] [blame]
Paul Belanger82595102013-04-08 11:30:51 -04001Zuul
2====
James E. Blaird65e22d2012-06-01 13:50:21 -07003
James E. Blair4c3e0a32016-10-12 14:15:20 -07004Zuul is a project gating system developed for the OpenStack Project.
James E. Blaird65e22d2012-06-01 13:50:21 -07005
James E. Blair75260742016-10-12 15:12:06 -07006We are currently engaged in a significant development effort in
7preparation for the third major version of Zuul. We call this effort
8`Zuul v3`_ and it is described in more detail below.
9
Monty Taylor65293752017-07-10 17:22:52 -050010The latest documentation for Zuul v3 is published at:
James E. Blair00c67aa2018-01-18 13:05:44 -080011https://docs.openstack.org/infra/zuul/
Monty Taylor65293752017-07-10 17:22:52 -050012
Clint Byrumf491d062018-01-04 20:57:29 -080013If you are looking for the Edge routing service named Zuul that is
14related to Netflix, it can be found here:
15https://github.com/Netflix/zuul
16
17If you are looking for the Javascript testing tool named Zuul, it
18can be found here:
19https://github.com/defunctzombie/zuul
20
Paul Belanger82595102013-04-08 11:30:51 -040021Contributing
22------------
James E. Blaird65e22d2012-06-01 13:50:21 -070023
James E. Blair1a426402016-10-12 15:17:07 -070024We are currently engaged in a significant development effort in
25preparation for the third major version of Zuul. We call this effort
James E. Blair00c67aa2018-01-18 13:05:44 -080026`Zuul v3`_.
James E. Blair1a426402016-10-12 15:17:07 -070027
Anita Kuno84ed8cd2013-12-17 10:14:45 -050028To browse the latest code, see: https://git.openstack.org/cgit/openstack-infra/zuul/tree/
29To clone the latest code, use `git clone git://git.openstack.org/openstack-infra/zuul`
James E. Blaird65e22d2012-06-01 13:50:21 -070030
Michael Krotscheck8c81dc32014-11-11 15:59:06 -080031Bugs are handled at: https://storyboard.openstack.org/#!/project/679
James E. Blaird65e22d2012-06-01 13:50:21 -070032
James E. Blair4c3e0a32016-10-12 14:15:20 -070033Code reviews are, as you might expect, handled by gerrit at
34https://review.openstack.org
James E. Blaird65e22d2012-06-01 13:50:21 -070035
James E. Blair4c3e0a32016-10-12 14:15:20 -070036Use `git review` to submit patches (after creating a Gerrit account
37that links to your launchpad account). Example::
James E. Blaird65e22d2012-06-01 13:50:21 -070038
39 # Do your commits
Paul Belanger82595102013-04-08 11:30:51 -040040 $ git review
Ori Livneh7191ee82013-05-02 19:13:53 -070041 # Enter your username if prompted
James E. Blair75260742016-10-12 15:12:06 -070042
43Zuul v3
44-------
45
46The Zuul v3 effort involves significant changes to Zuul, and its
47companion program, Nodepool. The intent is for Zuul to become more
48generally useful outside of the OpenStack community. This is the best
49way to get started with this effort:
50
511) Read the Zuul v3 spec: http://specs.openstack.org/openstack-infra/infra-specs/specs/zuulv3.html
52
53 We use specification documents like this to describe large efforts
54 where we want to make sure that all the participants are in
55 agreement about what will happen and generally how before starting
56 development. These specs should contain enough information for
57 people to evaluate the proposal generally, and sometimes include
58 specific details that need to be agreed upon in advance. They are
59 living documents which can change as work gets underway. However,
60 every change or detail does not need to be reflected in the spec --
61 most work is simply done with patches (and revised if necessary in
62 code review).
63
642) Read the Nodepool build-workers spec: http://specs.openstack.org/openstack-infra/infra-specs/specs/nodepool-zookeeper-workers.html
65
663) Review any proposed updates to these specs: https://review.openstack.org/#/q/status:open+project:openstack-infra/infra-specs+topic:zuulv3
67
68 Some of the information in the specs may be effectively superceded
69 by changes here, which are still undergoing review.
70
James E. Blair00c67aa2018-01-18 13:05:44 -0800714) Read developer documentation on the internal data model and testing: http://docs.openstack.org/infra/zuul/developer.html
James E. Blair75260742016-10-12 15:12:06 -070072
73 The general philosophy for Zuul tests is to perform functional
74 testing of either the individual component or the entire end-to-end
75 system with external systems (such as Gerrit) replaced with fakes.
76 Before adding additional unit tests with a narrower focus, consider
77 whether they add value to this system or are merely duplicative of
78 functional tests.
79
James E. Blair00c67aa2018-01-18 13:05:44 -0800805) Review open changes: https://review.openstack.org/#/q/status:open
James E. Blair75260742016-10-12 15:12:06 -070081
82 We find that the most valuable code reviews are ones that spot
83 problems with the proposed change, or raise questions about how
84 that might affect other systems or subsequent work. It is also a
85 great way to stay involved as a team in work performed by others
86 (for instance, by observing and asking questions about development
87 while it is in progress). We try not to sweat the small things and
88 don't worry too much about style suggestions or other nitpicky
89 things (unless they are relevant -- for instance, a -1 vote on a
90 change that introduces a yaml change out of character with existing
91 conventions is useful because it makes the system more
92 user-friendly; a -1 vote on a change which uses a sub-optimal line
93 breaking strategy is probably not the best use of anyone's time).
94
956) Join #zuul on Freenode. Let others (especially jeblair who is
96 trying to coordinate and prioritize work) know what you would like
97 to work on.
98
James E. Blaird5dcaa12016-12-05 13:39:30 -0800997) Check storyboard for status of current work items: https://storyboard.openstack.org/#!/board/41
James E. Blair75260742016-10-12 15:12:06 -0700100
James E. Blair903a7462017-03-07 09:28:40 -0800101 Work items tagged with ``low-hanging-fruit`` are tasks that have
102 been identified as not requiring an expansive knowledge of the
103 system. They may still require either some knowledge or
104 investigation into a specific area, but should be suitable for a
105 developer who is becoming acquainted with the system. Those items
106 can be found at:
107 https://storyboard.openstack.org/#!/story/list?tags=low-hanging-fruit&tags=zuulv3
108
James E. Blair75260742016-10-12 15:12:06 -0700109Once you are up to speed on those items, it will be helpful to know
110the following:
111
112* Zuul v3 includes some substantial changes to Zuul, and in order to
113 implement them quickly and simultaneously, we temporarily disabled
114 most of the test suite. That test suite still has relevance, but
115 tests are likely to need updating individually, with reasons ranging
116 from something simple such as a test-framework method changing its
117 name, to more substantial issues, such as a feature being removed as
118 part of the v3 work. Each test will need to be evaluated
James E. Blaird5dcaa12016-12-05 13:39:30 -0800119 individually. Feel free to, at any time, claim a test name in this
120 story and work on re-enabling it:
121 https://storyboard.openstack.org/#!/story/2000773
James E. Blair75260742016-10-12 15:12:06 -0700122
123* Because of the importance of external systems, as well as the number
124 of internal Zuul components, actually running Zuul in a development
125 mode quickly becomes unweildy (imagine uploading changes to Gerrit
126 repeatedly while altering Zuul source code). Instead, the best way
127 to develop with Zuul is in fact to write a functional test.
128 Construct a test to fully simulate the series of events you want to
129 see, then run it in the foreground. For example::
130
Paul Belanger6a1825d2017-03-18 12:40:43 -0400131 .tox/py27/bin/python -m testtools.run tests.unit.test_scheduler.TestScheduler.test_jobs_executed
James E. Blair75260742016-10-12 15:12:06 -0700132
133 See TESTING.rst for more information.
134
135* There are many occasions, when working on sweeping changes to Zuul
136 v3, we left notes for future work items in the code marked with
137 "TODOv3". These represent potentially serious missing functionality
138 or other issues which must be resolved before an initial v3 release
139 (unlike a more conventional TODO note, these really can not be left
140 indefinitely). These present an opportunity to identify work items
141 not otherwise tracked. The names associated with TODO or TODOv3
142 items do not mean that only that person can address them -- they
143 simply reflect who to ask to explain the item in more detail if it
144 is too cryptic. In your own work, feel free to leave TODOv3 notes
145 if a change would otherwise become too large or unweildy.
James E. Blaira3c03ed2016-12-05 13:39:39 -0800146
Monty Taylor9c817e92017-06-16 12:31:23 -0500147Python Version Support
148----------------------
149
150Zuul v3 requires Python 3. It does not support Python 2.
151
152As Ansible is used for the execution of jobs, it's important to note that
153while Ansible does support Python 3, not all of Ansible's modules do. Zuul
154currently sets ``ansible_python_interpreter`` to python2 so that remote
155content will be executed with Python2.
156
James E. Blaira3c03ed2016-12-05 13:39:39 -0800157Roadmap
158-------
159
James E. Blair903a7462017-03-07 09:28:40 -0800160* Begin using Zuul v3 to run jobs for Zuul itself
James E. Blaira3c03ed2016-12-05 13:39:39 -0800161* Implement a shim to translate Zuul v2 demand into Nodepool Zookeeper
162 launcher requests
163* Begin using Zookeeper based Nodepool launchers with Zuul v2.5 in
164 OpenStack Infra
James E. Blaira3c03ed2016-12-05 13:39:39 -0800165* Move OpenStack Infra to use Zuul v3
166* Implement Github support
167* Begin using Zuul v3 to run tests on Ansible repos
168* Implement support in Nodepool for non-OpenStack clouds
169* Add native container support to Zuul / Nodepool