guix-commits
[Top][All Lists]
Advanced

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

branch master updated: hydra: berlin: Include Childhurd service.


From: Jan Nieuwenhuizen
Subject: branch master updated: hydra: berlin: Include Childhurd service.
Date: Wed, 16 Sep 2020 16:34:34 -0400

This is an automated email from the git hooks/post-receive script.

janneke pushed a commit to branch master
in repository maintenance.

The following commit(s) were added to refs/heads/master by this push:
     new 7463429  hydra: berlin: Include Childhurd service.
7463429 is described below

commit 7463429beeb2d32bb34c7d45ac75860495475bdf
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Wed Sep 16 22:28:31 2020 +0200

    hydra: berlin: Include Childhurd service.
    
    * hydra/berlin.scm (childhurd-gc-job): Nev variable.
    (childhurd-os, childhurd-net-options): New procedures.
    (services): Use them in for new hurd-vm-service.
---
 hydra/berlin.scm | 43 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/hydra/berlin.scm b/hydra/berlin.scm
index c97566c..01c0edb 100644
--- a/hydra/berlin.scm
+++ b/hydra/berlin.scm
@@ -5,7 +5,8 @@
              (sysadmin web)
              (guix git-download)
              (srfi srfi-1))
-(use-service-modules base databases dns monitoring networking admin shepherd)
+(use-service-modules base databases dns monitoring networking admin shepherd
+                    mcron virtualization)
 (use-package-modules admin certs emacs linux mail monitoring
                      ssh tls tor vim package-management
                      version-control
@@ -127,6 +128,37 @@ Happy hacking!\n"))
                 ,@(alist-delete "guile-fibers" (package-inputs mumi)))))))
 
 
+(define childhurd-gc-job
+  ;; Run 'guix gc' at 2AM every day.
+  #~(job '(next-hour '(2))
+        "guix gc -F 2G"))
+
+(define (childhurd-os id)
+  (operating-system
+   (inherit %hurd-vm-operating-system)
+   (host-name (format #f "hydra-childhurd-~3,'0d" id))
+   (hosts-file
+    (plain-file "hosts"
+               (string-append "127.0.0.1 localhost " host-name "\n"
+                              "::1       localhost " host-name "\n"
+                              "141.80.167.131 ci.guix.gnu.org\n")))
+   (services
+    (cons* (service mcron-service-type
+                   (mcron-configuration (jobs (list childhurd-gc-job))))
+          (operating-system-user-services %hurd-vm-operating-system)))))
+
+(define (childhurd-net-options id)
+  "Expose SSH and VNC ports on 0.0.0.0; for first Childhurd VM those
+are 10022 and 15900."
+  (define (qemu-vm-port base)
+    (number->string (+ base (* 1000 id))))
+  `("--device" "rtl8139,netdev=net0"
+    "--netdev" ,(string-append
+                "user,id=net0"
+                ",hostfwd=tcp:127.0.0.1:" (qemu-vm-port 11004) "-:1004"
+                ",hostfwd=tcp:0.0.0.0:" (qemu-vm-port 10022) "-:2222"
+                ",hostfwd=tcp:0.0.0.0:" (qemu-vm-port 15900) "-:5900")))
+
 (operating-system
   (host-name "berlin.guix.gnu.org")
   (timezone "Europe/Berlin")
@@ -332,6 +364,15 @@ Happy hacking!\n"))
              (service disk-space-watchdog-service-type
                       (list (* 500 GiB) (* 50 GiB)))
 
+            ;; Hurd VM
+            (service hurd-vm-service-type
+                     (hurd-vm-configuration
+                      (os (childhurd-os 0))
+                      ;; 6G should be enough to build 'hello'
+                      (disk-size (* 12000 (expt 2 20))) ;12G
+                      (memory-size 1024)
+                      (net-options (childhurd-net-options 0))))
+
              (frontend-services %sysadmins
                                 #:gc-threshold (* 3 TiB)
                                 #:systems '("x86_64-linux" "i686-linux"



reply via email to

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