[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: hydra: Add offloading service to Berlin.
From: |
Mathieu Othacehe |
Subject: |
branch master updated: hydra: Add offloading service to Berlin. |
Date: |
Wed, 07 Sep 2022 02:15:50 -0400 |
This is an automated email from the git hooks/post-receive script.
mothacehe pushed a commit to branch master
in repository maintenance.
The following commit(s) were added to refs/heads/master by this push:
new af0d279 hydra: Add offloading service to Berlin.
af0d279 is described below
commit af0d279f400dc1f3e10fe2f56372af55a4611fc6
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Tue Sep 6 20:31:18 2022 +0200
hydra: Add offloading service to Berlin.
Add a service registering the /etc/guix/machines.scm file to enable the
offload mechanism.
* hydra/modules/sysadmin/services.scm (%offload-service): New variable.
(frontend-services): Use it.
---
hydra/modules/sysadmin/services.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/hydra/modules/sysadmin/services.scm
b/hydra/modules/sysadmin/services.scm
index db1388a..de76fe9 100644
--- a/hydra/modules/sysadmin/services.scm
+++ b/hydra/modules/sysadmin/services.scm
@@ -589,6 +589,8 @@ to a selected directory.")
(cache-bypass-threshold cache-bypass-threshold)
(workers publish-workers)))
+ %offload-service
+
%nginx-mime-types
%nginx-cache-activation
@@ -833,3 +835,28 @@ to a selected directory.")
crash-dump-shepherd-services)))
(default-value crash-dump)
(description "Run a crash dump HTTP web server.")))
+
+
+;;;
+;;; Offloading
+;;;
+
+(define %offload-service
+ ;; Provide /etc/guix/machines.scm file.
+ (simple-service
+ 'guix-machines.scm
+ activation-service-type
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+ (if (file-exists? "/etc/guix/machines.scm")
+ (if (and (symbolic-link? "/etc/guix/machines.scm")
+ (store-file-name? (readlink "/etc/guix/machines.scm")))
+ (delete-file "/etc/guix/machines.scm")
+ (rename-file "/etc/guix/machines.scm"
+ "/etc/guix/machines.scm.bak"))
+ (mkdir-p "/etc/guix"))
+
+ ;; Install the machines file.
+ (symlink #$(local-file "../../machines-for-berlin.scm")
+ "/etc/guix/machines.scm")))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: hydra: Add offloading service to Berlin.,
Mathieu Othacehe <=