summaryrefslogtreecommitdiff
path: root/doc/source/howtos/nodepool_install.rst
blob: 015ebbde142496f191898df4397a093ac8e5f45a (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
:orphan:

Install Nodepool
================

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

First we'll create the nodepool user and set up some directories it
needs.  We also need to create an SSH key for Zuul to use when it logs
into the nodes that Nodepool provides.

.. code-block:: shell

   sudo groupadd --system nodepool
   sudo useradd --system nodepool --home-dir /var/lib/nodepool --create-home -g nodepool
   ssh-keygen -t rsa -m PEM -b 2048 -f nodepool_rsa -N ''
   sudo mkdir /etc/nodepool/
   sudo mkdir /var/log/nodepool
   sudo chgrp -R nodepool /var/log/nodepool/
   sudo chmod 775 /var/log/nodepool/

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

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

.. code-block:: shell

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

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

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

   # For Ubuntu:
   sudo apt-get install -y $(bindep -b compile)

   # All:
   sudo pip3 install .
   popd

Service File
------------

Nodepool includes a systemd service file for nodepool-launcher in the ``etc``
source directory. To use it, do the following steps.

.. code-block:: shell

   pushd nodepool/
   sudo cp etc/nodepool-launcher.service /etc/systemd/system/nodepool-launcher.service
   sudo chmod 0644 /etc/systemd/system/nodepool-launcher.service
   popd

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

.. code-block:: shell

   pushd nodepool/
   sudo mkdir /etc/systemd/system/nodepool-launcher.service.d
   sudo cp etc/nodepool-launcher.service.d/centos.conf \
           /etc/systemd/system/nodepool-launcher.service.d/centos.conf
   sudo chmod 0644 /etc/systemd/system/nodepool-launcher.service.d/centos.conf
   popd