summaryrefslogtreecommitdiff
path: root/doc/source/howtos/zuul_install.rst
blob: 09ded9d1558aa8c66bc3ef8691f68e5f1d1b89d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
:orphan:

Install Zuul
============

Initial Setup
-------------

First we'll create the zuul user and set up some directories it needs.
We'll also install the SSH private key that we previously created
during the Nodepool setup.

.. code-block:: console

   $ sudo groupadd --system zuul
   $ sudo useradd --system zuul --home-dir /var/lib/zuul --create-home -g zuul
   $ sudo mkdir /etc/zuul/
   $ sudo mkdir /var/log/zuul/
   $ sudo chown zuul:zuul /var/log/zuul/
   $ sudo mkdir /var/lib/zuul/.ssh
   $ sudo chmod 0700 /var/lib/zuul/.ssh
   $ sudo mv nodepool_rsa /var/lib/zuul/.ssh
   $ sudo chown -R zuul:zuul /var/lib/zuul/.ssh

Installation
------------

Clone the Zuul git repository and install it.  The ``bindep`` program
is used to determine any additional binary dependencies which are
required.

.. code-block:: console

   # All:
   $ git clone https://opendev.org/zuul/zuul
   $ pushd zuul/

   # For Fedora and CentOS:
   $ sudo yum -y install $(bindep -b compile)

   # For openSUSE:
   $ zypper install -y $(bindep -b compile)

   # All:
   $ tools/install-js-tools.sh

   # All:
   $ sudo pip3 install .
   $ sudo zuul-manage-ansible
   $ popd

Service Files
-------------

Zuul includes systemd service files for Zuul services in the ``etc`` source
directory. To use them, do the following steps.

.. code-block:: console

   $ pushd zuul/
   $ sudo cp etc/zuul-scheduler.service /etc/systemd/system/zuul-scheduler.service
   $ sudo cp etc/zuul-executor.service /etc/systemd/system/zuul-executor.service
   $ sudo cp etc/zuul-web.service /etc/systemd/system/zuul-web.service
   $ sudo chmod 0644 /etc/systemd/system/zuul-scheduler.service
   $ sudo chmod 0644 /etc/systemd/system/zuul-executor.service
   $ sudo chmod 0644 /etc/systemd/system/zuul-web.service
   $ popd

If you are installing Zuul on ``CentOS 7`` and copied the provided service
files in previous step, please follow the steps below to use corresponding
systemd drop-in files so Zuul services can be managed by systemd.

.. code-block:: console

   $ pushd zuul/
   $ sudo mkdir /etc/systemd/system/zuul-scheduler.service.d
   $ sudo cp etc/zuul-scheduler.service.d/centos.conf \
       /etc/systemd/system/zuul-scheduler.service.d/centos.conf
   $ sudo chmod 0644 /etc/systemd/system/zuul-scheduler.service.d/centos.conf
   $ sudo mkdir /etc/systemd/system/zuul-executor.service.d
   $ sudo cp etc/zuul-executor.service.d/centos.conf \
       /etc/systemd/system/zuul-executor.service.d/centos.conf
   $ sudo chmod 0644 /etc/systemd/system/zuul-executor.service.d/centos.conf
   $ sudo mkdir /etc/systemd/system/zuul-web.service.d
   $ sudo cp etc/zuul-web.service.d/centos.conf \
       /etc/systemd/system/zuul-web.service.d/centos.conf
   $ sudo chmod 0644 /etc/systemd/system/zuul-web.service.d/centos.conf
   $ popd