guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: hydra: berlin: Add build VM on select build machines.


From: Ludovic Courtès
Subject: 02/02: hydra: berlin: Add build VM on select build machines.
Date: Tue, 5 Mar 2024 11:11:22 -0500 (EST)

civodul pushed a commit to branch master
in repository maintenance.

commit 5c87c7e5dd852c94b34e9d9613473acc625fec09
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Tue Mar 5 17:08:59 2024 +0100

    hydra: berlin: Add build VM on select build machines.
    
    * hydra/modules/sysadmin/build-machines.scm (build-vm-ip?): New
    procedure.
    (berlin-new-build-machine-os): Add #:build-vm? and add a
    ‘virtual-build-machine-service-type’ instance when it is true.
---
 hydra/berlin-nodes.scm                    |  1 +
 hydra/modules/sysadmin/build-machines.scm | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/hydra/berlin-nodes.scm b/hydra/berlin-nodes.scm
index 37f6e22..0ba885b 100644
--- a/hydra/berlin-nodes.scm
+++ b/hydra/berlin-nodes.scm
@@ -142,6 +142,7 @@
                                         #:emulated-architectures
                                         '("ppc64le")
                                         #:childhurd? (childhurd-ip? ip)
+                                        #:build-vm? (build-vm-ip? ip)
                                         #:systems
                                         (let ((lst '("x86_64-linux"
                                                      "i686-linux")))
diff --git a/hydra/modules/sysadmin/build-machines.scm 
b/hydra/modules/sysadmin/build-machines.scm
index 2848441..8cba17a 100644
--- a/hydra/modules/sysadmin/build-machines.scm
+++ b/hydra/modules/sysadmin/build-machines.scm
@@ -40,6 +40,7 @@
   #:export (build-machine-os
             berlin-new-build-machine-os
             childhurd-ip?
+            build-vm-ip?
             berlin-offloading-service-type))
 
 ;;; Commentary:
@@ -99,6 +100,11 @@ HOST-NAME and accessibly by SYSADMINS, with the given 
AUTHORIZED-GUIX-KEYS."
                "141.80.167.164" "141.80.167.165"
                "141.80.167.166" "141.80.167.167")))
 
+(define (build-vm-ip? ip)
+  "Return #t if IP should be running a virtual build machine."
+  (member ip '("141.80.167.183" "141.80.167.184"
+               "141.80.167.185" "141.80.167.186")))
+
 (define* (berlin-new-build-machine-os id
                                       #:key
                                       (authorized-guix-keys '())
@@ -106,6 +112,7 @@ HOST-NAME and accessibly by SYSADMINS, with the given 
AUTHORIZED-GUIX-KEYS."
                                       (systems
                                        '("x86_64-linux" "i686-linux"))
                                       childhurd?
+                                      build-vm?
                                       (max-jobs 4)
                                       (max-cores 16)
                                       (build-accounts-to-max-jobs-ratio 4))
@@ -293,6 +300,15 @@ Match Address 141.80.167.131
                                     (net-options
                                      (childhurd-net-options this-record))))))
 
+              ,@(if build-vm?
+                    ;; A virtual build machine to build software in the past
+                    ;; when needed.
+                    (list (service virtual-build-machine-service-type
+                                   (virtual-build-machine
+                                    (cpu-count 16)
+                                    (memory-size 8192))))
+                    '())
+
               ,@(modify-services %base-services
                   (guix-service-type
                    config =>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]