From b2967d6e28d514c2a1e56f6fce9cf90e675a9f83 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Sat, 28 Apr 2018 01:44:17 +0200 Subject: [PATCH] Add additional steps for configuring Nodepool service on CentOS 7 This change adds the additional steps to follow while installing Nodepool on CentOS 7. The included steps are - creation of /etc/systemd/system/nodepool-launcher.service.d to place provided drop-in file - copying provided drop-in file to the appropriate location so ExecStart command can be overriden by systemd Apart from the additional steps, the package installation command on Fedora27 is switched to yum to keep the differences between Fedora27 and CentOS 7 at minimum. Also some, of the nodepool configuration steps like creation of the directories and ssh key generation are moved into nodepool_install.rst similar to how zuul_install.rst lists some of these steps. SSH key nodepool_rsa is needed in zuul_install.rst but it gets created later in nodepool_openstack.rst so moving the key generation to nodepool_install.rst prevents possible confusion as well. Depends-On: https://review.openstack.org/#/c/564872/ Change-Id: If073ba5559d3ad055c0c8a1f2f4213ce6ed8af9f --- doc/source/admin/nodepool_install.rst | 45 ++++++++++++++++++++----- doc/source/admin/nodepool_openstack.rst | 8 ----- 2 files changed, 36 insertions(+), 17 deletions(-) diff --git a/doc/source/admin/nodepool_install.rst b/doc/source/admin/nodepool_install.rst index aaa5255110..d2e7bb90b8 100644 --- a/doc/source/admin/nodepool_install.rst +++ b/doc/source/admin/nodepool_install.rst @@ -3,19 +3,46 @@ Install Nodepool ================ -:: +Initial Setup +------------- - sudo adduser --system nodepool --home-dir /var/lib/nodepool --create-home - git clone https://git.zuul-ci.org/nodepool - cd nodepool/ - sudo dnf -y install $(bindep -b) - sudo pip3 install . +.. code-block:: console + + $ sudo adduser --system nodepool --home-dir /var/lib/nodepool --create-home + $ ssh-keygen -t rsa -b 2048 -f nodepool_rsa # don't enter a passphrase + $ sudo mkdir /etc/nodepool/ + $ sudo mkdir /var/log/nodepool + $ sudo chgrp -R nodepool /var/log/nodepool/ + $ sudo chmod 775 /var/log/nodepool/ + +Installation +------------ + +.. code-block:: console + + $ git clone https://git.zuul-ci.org/nodepool + $ cd nodepool/ + $ sudo yum -y install $(bindep -b) + $ sudo pip3 install . Service File ------------ Nodepool includes a systemd service file for nodepool-launcher in the ``etc`` -source directory. To use it, do the following steps:: +source directory. To use it, do the following steps. - $ sudo cp etc/nodepool-launcher.service /etc/systemd/system/nodepool-launcher.service - $ sudo chmod 0644 /etc/systemd/system/nodepool-launcher.service +.. code-block:: console + + $ sudo cp etc/nodepool-launcher.service /etc/systemd/system/nodepool-launcher.service + $ sudo chmod 0644 /etc/systemd/system/nodepool-launcher.service + +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:: console + + $ 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 diff --git a/doc/source/admin/nodepool_openstack.rst b/doc/source/admin/nodepool_openstack.rst index b575ec1a68..e784cc6c5a 100644 --- a/doc/source/admin/nodepool_openstack.rst +++ b/doc/source/admin/nodepool_openstack.rst @@ -14,7 +14,6 @@ that will be installed when instantiating the servers:: cd ~ source -openrc.sh # this may prompt for password - enter it - ssh-keygen -t rsa -b 2048 -f nodepool_rsa # don't enter a passphrase openstack keypair create --public-key nodepool_rsa.pub nodepool We'll use the private key later wheen configuring Zuul. In the same @@ -39,13 +38,6 @@ session, configure nodepool to talk to your cloud:: Once you've written out the file, double check all the required fields have been filled out. -:: - - sudo mkdir /etc/nodepool/ - sudo mkdir /var/log/nodepool - sudo chgrp -R nodepool /var/log/nodepool/ - sudo chmod 775 /var/log/nodepool/ - Configuration -------------