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