[Git][reproducible-builds/debian-rebuilder-setup][master] Start scheduler monitor and worker on boot

kpcyrd gitlab at salsa.debian.org
Tue Nov 6 01:16:07 CET 2018


kpcyrd pushed to branch master at Reproducible Builds / debian-rebuilder-setup


Commits:
ead67f21 by kpcyrd at 2018-11-06T00:16:31Z
Start scheduler monitor and worker on boot

- - - - -


5 changed files:

- scheduler/srebuild-worker → builder/srebuild-worker
- + roles/builders/files/srebuild-worker.service
- roles/builders/tasks/main.yml
- + roles/schedulers/files/srebuild-monitor.service
- roles/schedulers/tasks/main.yml


Changes:

=====================================
scheduler/srebuild-worker → builder/srebuild-worker
=====================================


=====================================
roles/builders/files/srebuild-worker.service
=====================================
@@ -0,0 +1,8 @@
+[Unit]
+Description=Monitor build queue and rebuild packages
+
+[Service]
+ExecStart=/usr/bin/srebuild-worker
+
+[Install]
+WantedBy=multi-user.target


=====================================
roles/builders/tasks/main.yml
=====================================
@@ -9,6 +9,8 @@
     - curl
     - python-pip
     - haveged
+    - python3-redis
+    - python3-requests
 
 - name: Install in-toto
   pip:
@@ -37,10 +39,27 @@
     src: ../../../builder/srebuild-hook
     dest: /usr/lib/srebuild-hook
 
+- name: Copy scheduler-worker
+  copy:
+    src: ../../../scheduler/srebuild-worker
+    dest: /usr/bin/srebuild-worker
+
+- name: Copy worker systemd unit
+  copy:
+    src: srebuild-worker.service
+    dest: /etc/systemd/system/srebuild-worker.service
+
 - name: Set permissions
   file:
     path: "{{ item }}"
     mode: 0755
   with_items:
-    - /usr/bin/srebuild
-    - /usr/lib/srebuild-hook
+  - /usr/bin/srebuild
+  - /usr/lib/srebuild-hook
+  - /usr/bin/srebuild-worker
+
+- name: enable systemd services
+  systemd:
+    name: srebuild-worker
+    state: started
+    enabled: yes


=====================================
roles/schedulers/files/srebuild-monitor.service
=====================================
@@ -0,0 +1,8 @@
+[Unit]
+Description=Monitor buildinfo server for new builds
+
+[Service]
+ExecStart=/usr/bin/srebuild-monitor http://buildinfo.nyu.wtf/
+
+[Install]
+WantedBy=multi-user.target


=====================================
roles/schedulers/tasks/main.yml
=====================================
@@ -5,20 +5,25 @@
     - python3-redis
     - python3-requests
 
-- name: Copy scheduler-worker
-  copy:
-    src: ../../../scheduler/srebuild-worker
-    dest: /usr/bin/srebuild-worker
-
 - name: Copy scheduler-monitor
   copy:
     src: ../../../scheduler/srebuild-monitor
     dest: /usr/bin/srebuild-monitor
 
+- name: Copy monitor systemd unit
+  copy:
+    src: srebuild-monitor.service
+    dest: /etc/systemd/system/srebuild-monitor.service
+
 - name: Set permissions
   file:
     path: "{{ item }}"
     mode: 0755
   with_items:
-  - /usr/bin/srebuild-worker
   - /usr/bin/srebuild-monitor
+
+- name: enable systemd services
+  systemd:
+    name: srebuild-monitor
+    state: started
+    enabled: yes



View it on GitLab: https://salsa.debian.org/reproducible-builds/debian-rebuilder-setup/commit/ead67f21c4c47611934ad26be6215cd9fdb52f3c

-- 
View it on GitLab: https://salsa.debian.org/reproducible-builds/debian-rebuilder-setup/commit/ead67f21c4c47611934ad26be6215cd9fdb52f3c
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.reproducible-builds.org/pipermail/rb-commits/attachments/20181106/413f9b97/attachment.html>


More information about the rb-commits mailing list