Joshua Hesketh | fe485c6 | 2015-08-11 23:42:34 +1000 | [diff] [blame] | 1 | :title: Connections |
| 2 | |
| 3 | .. _connections: |
| 4 | |
| 5 | Connections |
| 6 | =========== |
| 7 | |
| 8 | zuul coordinates talking to multiple different systems via the concept |
| 9 | of connections. A connection is listed in the :ref:`zuulconf` file and is |
| 10 | then referred to from the :ref:`layoutyaml`. This makes it possible to |
| 11 | receive events from gerrit via one connection and post results from another |
| 12 | connection that may report back as a different user. |
| 13 | |
| 14 | Gerrit |
| 15 | ------ |
| 16 | |
| 17 | Create a connection with gerrit. |
| 18 | |
| 19 | **driver=gerrit** |
| 20 | |
| 21 | **server** |
| 22 | FQDN of Gerrit server. |
| 23 | ``server=review.example.com`` |
| 24 | |
| 25 | **port** |
| 26 | Optional: Gerrit server port. |
| 27 | ``port=29418`` |
| 28 | |
| 29 | **baseurl** |
| 30 | Optional: path to Gerrit web interface. Defaults to ``https://<value |
| 31 | of server>/``. ``baseurl=https://review.example.com/review_site/`` |
| 32 | |
| 33 | **user** |
| 34 | User name to use when logging into above server via ssh. |
| 35 | ``user=zuul`` |
| 36 | |
| 37 | **sshkey** |
| 38 | Path to SSH key to use when logging into above server. |
| 39 | ``sshkey=/home/zuul/.ssh/id_rsa`` |
| 40 | |
Evgeny Antyshev | 9f0a322 | 2015-10-23 16:03:10 +0000 | [diff] [blame] | 41 | **keepalive** |
| 42 | Optional: Keepalive timeout, 0 means no keepalive. |
| 43 | ``keepalive=60`` |
Joshua Hesketh | fe485c6 | 2015-08-11 23:42:34 +1000 | [diff] [blame] | 44 | |
| 45 | Gerrit Configuration |
| 46 | ~~~~~~~~~~~~~~~~~~~~ |
| 47 | |
| 48 | Zuul will need access to a Gerrit user. |
| 49 | |
| 50 | Create an SSH keypair for Zuul to use if there isn't one already, and |
| 51 | create a Gerrit user with that key:: |
| 52 | |
| 53 | cat ~/id_rsa.pub | ssh -p29418 gerrit.example.com gerrit create-account --ssh-key - --full-name Jenkins jenkins |
| 54 | |
| 55 | Give that user whatever permissions will be needed on the projects you |
| 56 | want Zuul to gate. For instance, you may want to grant ``Verified |
| 57 | +/-1`` and ``Submit`` to the user. Additional categories or values may |
| 58 | be added to Gerrit. Zuul is very flexible and can take advantage of |
| 59 | those. |
| 60 | |
| 61 | SMTP |
| 62 | ---- |
| 63 | |
| 64 | **driver=smtp** |
| 65 | |
| 66 | **server** |
| 67 | SMTP server hostname or address to use. |
| 68 | ``server=localhost`` |
| 69 | |
| 70 | **port** |
| 71 | Optional: SMTP server port. |
| 72 | ``port=25`` |
| 73 | |
| 74 | **default_from** |
| 75 | Who the email should appear to be sent from when emailing the report. |
| 76 | This can be overridden by individual pipelines. |
| 77 | ``default_from=zuul@example.com`` |
| 78 | |
| 79 | **default_to** |
| 80 | Who the report should be emailed to by default. |
| 81 | This can be overridden by individual pipelines. |
| 82 | ``default_to=you@example.com`` |
Joshua Hesketh | d78b448 | 2015-09-14 16:56:34 -0600 | [diff] [blame] | 83 | |
| 84 | SQL |
| 85 | ---- |
| 86 | |
| 87 | Only one connection per a database is permitted. |
| 88 | |
| 89 | **driver=sql** |
| 90 | |
| 91 | **dburi** |
| 92 | Database connection information in the form of a URI understood by |
| 93 | sqlalchemy. eg http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html#database-urls |
| 94 | ``dburi=mysql://user:pass@localhost/db`` |