[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/04: hydra: Export a variable containing the mcron jobs for the fronte
From: |
Andreas Enge |
Subject: |
01/04: hydra: Export a variable containing the mcron jobs for the frontends. |
Date: |
Tue, 9 Apr 2019 17:01:53 -0400 (EDT) |
andreas pushed a commit to branch wip-bayfront
in repository maintenance.
commit d7868538ff28766e7cd34abadfadf91ca7b0649c
Author: Andreas Enge <address@hidden>
Date: Tue Apr 9 21:59:18 2019 +0200
hydra: Export a variable containing the mcron jobs for the frontends.
* hydra/modules/sysadmin/services.scm (mcron-service): New variable.
(frontend-services): Use the new variable.
---
hydra/modules/sysadmin/services.scm | 52 ++++++++++++++++++++++---------------
1 file changed, 31 insertions(+), 21 deletions(-)
diff --git a/hydra/modules/sysadmin/services.scm
b/hydra/modules/sysadmin/services.scm
index 96e359d..e7fd19a 100644
--- a/hydra/modules/sysadmin/services.scm
+++ b/hydra/modules/sysadmin/services.scm
@@ -2,6 +2,7 @@
;;;
;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <address@hidden>
;;; Copyright © 2017, 2018 Ricardo Wurmus <address@hidden>
+;;; Copyright © 2019 Andreas Enge <address@hidden>
;;;
;;; This program is free software: you can redistribute it and/or modify
;;; it under the terms of the GNU General Public License as published by
@@ -32,18 +33,10 @@
#:use-module (gnu packages web)
#:use-module (sysadmin people)
#:use-module (srfi srfi-1)
- #:export (firewall-service
+ #:export (mcron-service
+ firewall-service
frontend-services))
-(define %gc-jobs
- ;; The garbage collection mcron jobs.
- (list #~(job '(next-hour '(4))
- (string-append #$guix "/bin/guix gc -F80G"))
-
- ;; Half a day later, make sure half of our quota is available.
- #~(job '(next-hour '(16))
- (string-append #$guix "/bin/guix gc -F40G"))))
-
(define* (guix-daemon-config #:key (max-jobs 5) (cores 4))
(guix-configuration
;; Disable substitutes altogether.
@@ -67,6 +60,33 @@
;;;
+;;; Mcron.
+;;;
+
+(define %gc-jobs
+ ;; The garbage collection mcron jobs.
+ (list #~(job '(next-hour '(4))
+ (string-append #$guix "/bin/guix gc -F80G"))
+
+ ;; Half a day later, make sure half of our quota is available.
+ #~(job '(next-hour '(16))
+ (string-append #$guix "/bin/guix gc -F40G"))))
+
+(define %certbot-job
+ ;; Attempt to renew the Let's Encrypt certificate twice a week.
+ #~(job (lambda (now)
+ (next-day-from (next-hour-from now '(3))
+ '(2 5)))
+ (string-append #$certbot "/bin/certbot renew")))
+
+(define mcron-service
+ (service mcron-service-type
+ (mcron-configuration
+ (jobs (cons %certbot-job %gc-jobs)))))
+
+
+
+;;;
;;; Cuirass.
;;;
@@ -191,14 +211,6 @@
`(("nginx" ,(file-append nginx "/share/nginx/conf")))))
-(define %certbot-job
- ;; Attempt to renew the Let's Encrypt certificate twice a week.
- #~(job (lambda (now)
- (next-day-from (next-hour-from now '(3))
- '(2 5)))
- (string-append #$certbot "/bin/certbot renew")))
-
-
(define %default-motd
(plain-file "motd"
@@ -214,10 +226,8 @@
(publish-workers 6))
"Return the list of services for the build farm frontend."
(cons* (service rottlog-service-type (rottlog-configuration))
- (service mcron-service-type
- (mcron-configuration
- (jobs (cons %certbot-job %gc-jobs))))
+ mcron-service
firewall-service
;; The Web service.