summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Shrewsbury <shrewsbury.dave@gmail.com>2018-04-04 10:00:57 -0400
committerDavid Shrewsbury <shrewsbury.dave@gmail.com>2018-04-13 15:30:18 +0000
commitbd169254213aaa87f61cbb8732d2d20c997c1c9a (patch)
tree1af914744b11c9c1f9066625cd9061fae4c3c7c2
parentb82e3c34bfa0ca14a3c716d86839cf9943107ee3 (diff)
downloadzuul-bd169254213aaa87f61cbb8732d2d20c997c1c9a.tar.gz
Add sample systemd service files.
Also modify the Zuul From Scratch doc to reference these new files in the service installation documents. Depends-On: https://review.openstack.org/560993 Change-Id: Ifa0d1cd48ec5e1ef3358ada55b1b2769f392dfe9
-rw-r--r--doc/source/admin/fedora27_setup.rst132
-rw-r--r--doc/source/admin/nodepool_install.rst9
-rw-r--r--doc/source/admin/zuul-from-scratch.rst29
-rw-r--r--doc/source/admin/zuul_install.rst13
-rw-r--r--etc/zuul-executor.service15
-rw-r--r--etc/zuul-scheduler.service15
-rw-r--r--etc/zuul-web.service15
7 files changed, 96 insertions, 132 deletions
diff --git a/doc/source/admin/fedora27_setup.rst b/doc/source/admin/fedora27_setup.rst
index 5a35de471..bce9fca4e 100644
--- a/doc/source/admin/fedora27_setup.rst
+++ b/doc/source/admin/fedora27_setup.rst
@@ -39,135 +39,3 @@ Install Zookeeper
sudo dnf install zookeeper -y
sudo cp /etc/zookeeper/zoo_sample.cfg /etc/zookeeper/zoo.cfg
-
-Service Management
-------------------
-
-Zookeeper Service Management
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
- sudo systemctl start zookeeper.service
-
-::
-
- sudo systemctl status zookeeper.service
- ● zookeeper.service - Apache ZooKeeper
- Loaded: loaded (/usr/lib/systemd/system/zookeeper.service; disabled; vendor preset: disabled)
- Active: active (running) since Wed 2018-01-03 14:53:47 UTC; 5s ago
- Process: 4153 ExecStart=/usr/bin/zkServer.sh start zoo.cfg (code=exited, status=0/SUCCESS)
- Main PID: 4160 (java)
- Tasks: 17 (limit: 4915)
- CGroup: /system.slice/zookeeper.service
- └─4160 java -Dzookeeper.log.dir=/var/log/zookeeper -Dzookeeper.root.logger=INFO,CONSOLE -cp /usr/share/java/
-
-::
-
- sudo systemctl enable zookeeper.service
-
-
-Nodepool Service Management
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-::
-
- sudo bash -c "cat > /etc/systemd/system/nodepool-launcher.service <<EOF
- [Unit]
- Description=Nodepool Launcher Service
- After=syslog.target network.target
-
- [Service]
- Type=simple
- # Options to pass to nodepool-launcher.
- Group=nodepool
- User=nodepool
- RuntimeDirectory=nodepool
- ExecStart=/usr/local/bin/nodepool-launcher
-
- [Install]
- WantedBy=multi-user.target
- EOF"
-
- sudo chmod 0644 /etc/systemd/system/nodepool-launcher.service
-
-Zuul Service Management
-~~~~~~~~~~~~~~~~~~~~~~~
-::
-
- sudo bash -c "cat > /etc/systemd/system/zuul-scheduler.service <<EOF
- [Unit]
- Description=Zuul Scheduler Service
- After=syslog.target network.target
-
- [Service]
- Type=simple
- Group=zuul
- User=zuul
- RuntimeDirectory=zuul
- ExecStart=/usr/local/bin/zuul-scheduler
- ExecStop=/usr/local/bin/zuul-scheduler stop
-
- [Install]
- WantedBy=multi-user.target
- EOF"
-
- sudo bash -c "cat > /etc/systemd/system/zuul-executor.service <<EOF
- [Unit]
- Description=Zuul Executor Service
- After=syslog.target network.target
-
- [Service]
- Type=simple
- Group=zuul
- User=zuul
- RuntimeDirectory=zuul
- ExecStart=/usr/local/bin/zuul-executor
- ExecStop=/usr/local/bin/zuul-executor stop
-
- [Install]
- WantedBy=multi-user.target
- EOF"
-
- sudo bash -c "cat > /etc/systemd/system/zuul-web.service <<EOF
- [Unit]
- Description=Zuul Web Service
- After=syslog.target network.target
-
- [Service]
- Type=simple
- Group=zuul
- User=zuul
- RuntimeDirectory=zuul
- ExecStart=/usr/local/bin/zuul-web
- ExecStop=/usr/local/bin/zuul-web stop
-
- [Install]
- WantedBy=multi-user.target
- EOF"
-
- 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
-
-Starting Services
-~~~~~~~~~~~~~~~~~
-
-After you have Zuul and Nodepool installed and configured, you can start
-those services with::
-
- sudo systemctl daemon-reload
-
- sudo systemctl start nodepool-launcher.service
- sudo systemctl status nodepool-launcher.service
- sudo systemctl enable nodepool-launcher.service
-
- sudo systemctl start zuul-scheduler.service
- sudo systemctl status zuul-scheduler.service
- sudo systemctl enable zuul-scheduler.service
- sudo systemctl start zuul-executor.service
- sudo systemctl status zuul-executor.service
- sudo systemctl enable zuul-executor.service
- sudo systemctl start zuul-web.service
- sudo systemctl status zuul-web.service
- sudo systemctl enable zuul-web.service
diff --git a/doc/source/admin/nodepool_install.rst b/doc/source/admin/nodepool_install.rst
index f1605dc63..aaa525511 100644
--- a/doc/source/admin/nodepool_install.rst
+++ b/doc/source/admin/nodepool_install.rst
@@ -10,3 +10,12 @@ Install Nodepool
cd nodepool/
sudo dnf -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::
+
+ $ sudo cp etc/nodepool-launcher.service /etc/systemd/system/nodepool-launcher.service
+ $ sudo chmod 0644 /etc/systemd/system/nodepool-launcher.service
diff --git a/doc/source/admin/zuul-from-scratch.rst b/doc/source/admin/zuul-from-scratch.rst
index cf5b91193..80676f5e4 100644
--- a/doc/source/admin/zuul-from-scratch.rst
+++ b/doc/source/admin/zuul-from-scratch.rst
@@ -62,6 +62,35 @@ further restrict public access.
name: quickstart
EOF"
+Starting Services
+-----------------
+
+Your system software management should have installed the Zookeeper service
+files for you.
+
+After you have Zuul and Nodepool installed and configured, you can start
+all of the services with::
+
+ sudo systemctl daemon-reload
+
+ sudo systemctl start zookeeper.service
+ sudo systemctl status zookeeper.service
+ sudo systemctl enable zookeeper.service
+
+ sudo systemctl start nodepool-launcher.service
+ sudo systemctl status nodepool-launcher.service
+ sudo systemctl enable nodepool-launcher.service
+
+ sudo systemctl start zuul-scheduler.service
+ sudo systemctl status zuul-scheduler.service
+ sudo systemctl enable zuul-scheduler.service
+ sudo systemctl start zuul-executor.service
+ sudo systemctl status zuul-executor.service
+ sudo systemctl enable zuul-executor.service
+ sudo systemctl start zuul-web.service
+ sudo systemctl status zuul-web.service
+ sudo systemctl enable zuul-web.service
+
Use Zuul Jobs
-------------
diff --git a/doc/source/admin/zuul_install.rst b/doc/source/admin/zuul_install.rst
index c58f310f2..f01ce44a2 100644
--- a/doc/source/admin/zuul_install.rst
+++ b/doc/source/admin/zuul_install.rst
@@ -23,3 +23,16 @@ Initial Setup
sudo chmod 0700 /var/lib/zuul/.ssh
sudo mv nodepool_rsa /var/lib/zuul/.ssh
sudo chown -R zuul.zuul /var/lib/zuul/.ssh
+
+Service Files
+-------------
+
+Zuul includes some systemd service files for Zuul in the ``etc`` source
+directory. To use them, do the following steps::
+
+ $ 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
diff --git a/etc/zuul-executor.service b/etc/zuul-executor.service
new file mode 100644
index 000000000..d9fbdebe0
--- /dev/null
+++ b/etc/zuul-executor.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Zuul Executor Service
+After=syslog.target network.target
+
+[Service]
+Type=forking
+Group=zuul
+User=zuul
+RuntimeDirectory=zuul
+ExecStart=/usr/local/bin/zuul-executor
+ExecStop=/usr/local/bin/zuul-executor stop
+PIDFile=/var/run/zuul/executor.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/etc/zuul-scheduler.service b/etc/zuul-scheduler.service
new file mode 100644
index 000000000..826826fa1
--- /dev/null
+++ b/etc/zuul-scheduler.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Zuul Scheduler Service
+After=syslog.target network.target
+
+[Service]
+Type=forking
+Group=zuul
+User=zuul
+RuntimeDirectory=zuul
+ExecStart=/usr/local/bin/zuul-scheduler
+ExecStop=/usr/local/bin/zuul-scheduler stop
+PIDFile=/var/run/zuul/scheduler.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/etc/zuul-web.service b/etc/zuul-web.service
new file mode 100644
index 000000000..20594e30f
--- /dev/null
+++ b/etc/zuul-web.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Zuul Web Service
+After=syslog.target network.target
+
+[Service]
+Type=forking
+Group=zuul
+User=zuul
+RuntimeDirectory=zuul
+ExecStart=/usr/local/bin/zuul-web
+ExecStop=/usr/local/bin/zuul-web stop
+PIDFile=/var/run/zuul/web.pid
+
+[Install]
+WantedBy=multi-user.target