[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: hydra/berlin-nodes: Add Childhurd service to node
From: |
Jan Nieuwenhuizen |
Subject: |
branch master updated: hydra/berlin-nodes: Add Childhurd service to nodes 101, 102. |
Date: |
Mon, 29 Jun 2020 01:22:31 -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 a47ab98 hydra/berlin-nodes: Add Childhurd service to nodes 101, 102.
a47ab98 is described below
commit a47ab980774aaa396e1130db3b9e9546cd8c3e40
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue Jun 23 16:49:37 2020 +0200
hydra/berlin-nodes: Add Childhurd service to nodes 101, 102.
* hydra/modules/sysadmin/build-machines.scm (childhurd-ip?): New
procedure.
(berlin-new-build-machine-os): Add #:childhurd parameter. If set, add
a Childhurd service.
* hydra/machines-for-berlin.scm (x86_64->childhurd): New procedure.
(x86_64): Use them to define childhurd offload machines.
* hydra/berlin-nodes.scm: Add Childhurd service to the first two
nodes.
---
hydra/berlin-nodes.scm | 5 +--
hydra/machines-for-berlin.scm | 12 +++++--
hydra/modules/sysadmin/build-machines.scm | 55 +++++++++++++++++++++++++++++--
3 files changed, 66 insertions(+), 6 deletions(-)
diff --git a/hydra/berlin-nodes.scm b/hydra/berlin-nodes.scm
index 58b09eb..32d331a 100644
--- a/hydra/berlin-nodes.scm
+++ b/hydra/berlin-nodes.scm
@@ -133,8 +133,9 @@
(machine
(operating-system
(berlin-new-build-machine-os id
-
#:emulated-architectures
-
'("arm" "aarch64")))
+ #:emulated-architectures
+ `("arm" "aarch64")
+ #:childhurd? (childhurd-ip?
ip)))
(environment managed-host-environment-type)
(configuration (machine-ssh-configuration
(system "x86_64-linux")
diff --git a/hydra/machines-for-berlin.scm b/hydra/machines-for-berlin.scm
index 3361ace..69c918a 100644
--- a/hydra/machines-for-berlin.scm
+++ b/hydra/machines-for-berlin.scm
@@ -184,6 +184,12 @@
(speed .9)
(parallel-builds 1)))
+(define (x86_64->childhurd machine)
+ (build-machine
+ (inherit machine)
+ (system "i586-gnu")
+ (parallel-builds 1)))
+
(define overdrive
;; The SoftIron OverDrive 1000 donated by ARM:
;; <https://softiron.com/development-tools/overdrive-1000/>.
@@ -295,9 +301,11 @@
(string=? ((@@ (guix scripts offload)
build-machine-name) machine) name))
x86_64))
(_ #f))
- hosts)))
+ hosts))
+ (fast/hurd (filter (compose childhurd-ip? build-machine-name) fast)))
(append overdrive (map aarch64->armhf overdrive)
armv7
x86_64 (map x86_64->i686 x86_64)
(map x86_64->qemu-aarch64 fast)
- (map x86_64->qemu-armhf fast)))
+ (map x86_64->qemu-armhf fast)
+ (map x86_64->childhurd fast/hurd)))
diff --git a/hydra/modules/sysadmin/build-machines.scm
b/hydra/modules/sysadmin/build-machines.scm
index 1ddfb86..94b4e64 100644
--- a/hydra/modules/sysadmin/build-machines.scm
+++ b/hydra/modules/sysadmin/build-machines.scm
@@ -2,6 +2,7 @@
;;;
;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; 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
@@ -27,10 +28,12 @@
#:use-module (gnu services networking)
#:use-module (gnu services virtualization)
#:use-module (guix gexp)
+ #:use-module (guix records)
#:use-module (sysadmin people)
#:use-module (gnu packages ssh)
#:export (build-machine-os
- berlin-new-build-machine-os))
+ berlin-new-build-machine-os
+ childhurd-ip?))
;;; Commentary:
;;;
@@ -73,10 +76,16 @@ HOST-NAME and accessibly by SYSADMINS, with the given
AUTHORIZED-GUIX-KEYS."
(authorized-keys
authorized-guix-keys))))))))
+(define (childhurd-ip? ip)
+ "Return #t if IP should be running a Childhurd: the first two
+nodes."
+ (member ip '("141.80.167.158" "141.80.167.159")))
+
(define* (berlin-new-build-machine-os id
#:key
(authorized-guix-keys '())
- (emulated-architectures '()))
+ (emulated-architectures '())
+ childhurd?)
"Return the <operating-system> declaration for a build machine for
berlin.guixsd.org with integer ID, with the given
AUTHORIZED-GUIX-KEYS. Add a 'qemu-binfmt-service' for
@@ -87,6 +96,37 @@ EMULATED-ARCHITECTURES, unless it's empty."
#~(job '(next-hour '(3 15))
"guix gc -F 90G"))
+ (define childhurd-gc-job
+ ;; Run 'guix gc' at 2AM every day.
+ #~(job '(next-hour '(2))
+ "guix gc -F 2G"))
+
+ (define childhurd-os
+ (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 gc-job))))
+ (operating-system-user-services %hurd-vm-operating-system)))))
+
+ (define (childhurd-net-options . config)
+ "Expose SSH and VNC ports on 0.0.0.0; for first Childhurd VM those
+are 10022 and 15900."
+ (let ((id 0))
+ (define (qemu-vm-port base)
+ (number->string (+ base (* 1000 id))))
+ `("--device" "rtl8139,netdev=net0"
+ "--netdev" ,(string-append
+ "user,id=net0"
+ ",hostfwd=tcp:0.0.0.0:" (qemu-vm-port 10022) "-:2222"
+ ",hostfwd=tcp:0.0.0.0:" (qemu-vm-port 15900) "-:5900"))))
+
(define sysadmins
(list (sysadmin (name "ludo")
(full-name "Ludovic Courtès")
@@ -170,6 +210,17 @@ Match Address 141.80.167.131
emulated-architectures))
(guix-support? #t)))))
+ ,@(if (not childhurd?)
+ '()
+ (list (service hurd-vm-service-type
+ (hurd-vm-configuration
+ (os childhurd-os)
+ ;; 6G should be enough to build 'hello'
+ (disk-size (* 12000 (expt 2 20))) ;12G
+ (memory-size 1024)
+ (net-options
+ (childhurd-net-options this-record))))))
+
,@(modify-services %base-services
(guix-service-type config =>
(guix-configuration
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: hydra/berlin-nodes: Add Childhurd service to nodes 101, 102.,
Jan Nieuwenhuizen <=