[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: hydra/build-machines: Update childhurd-net-options for secret-ser
From: |
Jan Nieuwenhuizen |
Subject: |
02/02: hydra/build-machines: Update childhurd-net-options for secret-service. |
Date: |
Wed, 2 Sep 2020 01:56:34 -0400 (EDT) |
janneke pushed a commit to branch master
in repository maintenance.
commit 04c0fc1ea110b82d6180bbc1b2f895e55e746cd8
Author: Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
AuthorDate: Tue Sep 1 16:31:42 2020 +0200
hydra/build-machines: Update childhurd-net-options for secret-service.
* hydra/modules/sysadmin/build-machines.scm (berlin-new-build-machine-os)
[childhurd-net-options]: Include secret-service local QEMU forwarding.
Use variables from (gnu services virtualization).
---
hydra/modules/sysadmin/build-machines.scm | 31 ++++++++++++++++++++++---------
1 file changed, 22 insertions(+), 9 deletions(-)
diff --git a/hydra/modules/sysadmin/build-machines.scm
b/hydra/modules/sysadmin/build-machines.scm
index 0a3e113..a214e5d 100644
--- a/hydra/modules/sysadmin/build-machines.scm
+++ b/hydra/modules/sysadmin/build-machines.scm
@@ -120,15 +120,28 @@ EMULATED-ARCHITECTURES, unless it's empty."
(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"))))
+are 10022 and 15900. Keep secret-service port local."
+ `("--device" "rtl8139,netdev=net0"
+ "--netdev" ,(string-append
+ "user,id=net0"
+ ",hostfwd=tcp:127.0.0.1:"
+ (number->string (hurd-vm-port
+ config
+ (@@ (gnu services virtualization)
+ %hurd-vm-secrets-port)))
+ "-:1004"
+ ",hostfwd=tcp:0.0.0.0:"
+ (number->string (hurd-vm-port
+ config
+ (@@ (gnu services virtualization)
+ %hurd-vm-ssh-port)))
+ "-:2222"
+ ",hostfwd=tcp:0.0.0.0:"
+ (number->string (hurd-vm-port
+ config
+ (@@ (gnu services virtualization)
+ %hurd-vm-vnc-port)))
+ "-:5900")))
(define sysadmins
(list (sysadmin (name "ludo")