blob: e0d88d075b746ddce18cecad442925456c5d2bdb [file] [log] [blame]
Joshua Heskethfe485c62015-08-11 23:42:34 +10001:title: Connections
2
3.. _connections:
4
5Connections
6===========
7
8zuul coordinates talking to multiple different systems via the concept
9of connections. A connection is listed in the :ref:`zuulconf` file and is
10then referred to from the :ref:`layoutyaml`. This makes it possible to
11receive events from gerrit via one connection and post results from another
12connection that may report back as a different user.
13
14Gerrit
15------
16
17Create 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
41
42Gerrit Configuration
43~~~~~~~~~~~~~~~~~~~~
44
45Zuul will need access to a Gerrit user.
46
47Create an SSH keypair for Zuul to use if there isn't one already, and
48create a Gerrit user with that key::
49
50 cat ~/id_rsa.pub | ssh -p29418 gerrit.example.com gerrit create-account --ssh-key - --full-name Jenkins jenkins
51
52Give that user whatever permissions will be needed on the projects you
53want Zuul to gate. For instance, you may want to grant ``Verified
54+/-1`` and ``Submit`` to the user. Additional categories or values may
55be added to Gerrit. Zuul is very flexible and can take advantage of
56those.
57
58SMTP
59----
60
61**driver=smtp**
62
63**server**
64 SMTP server hostname or address to use.
65 ``server=localhost``
66
67**port**
68 Optional: SMTP server port.
69 ``port=25``
70
71**default_from**
72 Who the email should appear to be sent from when emailing the report.
73 This can be overridden by individual pipelines.
74 ``default_from=zuul@example.com``
75
76**default_to**
77 Who the report should be emailed to by default.
78 This can be overridden by individual pipelines.
79 ``default_to=you@example.com``
Joshua Heskethd78b4482015-09-14 16:56:34 -060080
81SQL
82----
83
84 Only one connection per a database is permitted.
85
86 **driver=sql**
87
88 **dburi**
89 Database connection information in the form of a URI understood by
90 sqlalchemy. eg http://docs.sqlalchemy.org/en/rel_1_0/core/engines.html#database-urls
91 ``dburi=mysql://user:pass@localhost/db``