summaryrefslogtreecommitdiff
path: root/gnu/machine
diff options
context:
space:
mode:
authorRoman Scherer <roman@burningswell.com>2025-02-27 19:24:46 +0100
committerLudovic Courtès <ludo@gnu.org>2025-02-28 23:03:36 +0100
commit2e8439d37ec79f6e0896f29d26bca2d024bd27fe (patch)
treedef0c0f6a7f630c75dac399be68fd80c5356e05c /gnu/machine
parenta4168d8ba75bff6d1a855dd6343ffc5d3b6b53c8 (diff)
machine: hetzner: Fix deployment on smaller instances.
* gnu/machine/hetzner.scm (hetzner-machine-rescue-install-os): Avoid out of disk space error by bind mounting /mnt/tmp/gnu/store to /gnu/store. * tests/machine/hetzner.scm: Test with smaller instances. * doc/guix.texi (Invoking guix deploy): Mention unsupported instance. Change-Id: If8bfb6733de493b51813b3e82e255849192f7cba Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/machine')
-rw-r--r--gnu/machine/hetzner.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/gnu/machine/hetzner.scm b/gnu/machine/hetzner.scm
index 1d9a3f43857..bc8d2efbd34 100644
--- a/gnu/machine/hetzner.scm
+++ b/gnu/machine/hetzner.scm
@@ -551,6 +551,13 @@ chmod 700 /mnt/root/.ssh
551cp /root/.ssh/authorized_keys /mnt/root/.ssh/authorized_keys 551cp /root/.ssh/authorized_keys /mnt/root/.ssh/authorized_keys
552chmod 600 /mnt/root/.ssh/authorized_keys 552chmod 600 /mnt/root/.ssh/authorized_keys
553 553
554# Small instance don't have much disk space. Bind mount the store of the
555# rescue system to the tmp directory of the new Guix system.
556mkdir -p /mnt/tmp/gnu/store
557mkdir -p /gnu/store
558mount --bind /mnt/tmp/gnu/store /gnu/store
559
560apt-get install guix --assume-yes
554cat > /tmp/guix/deploy/hetzner-os.scm << EOF 561cat > /tmp/guix/deploy/hetzner-os.scm << EOF
555(use-modules (gnu) (guix utils)) 562(use-modules (gnu) (guix utils))
556(use-package-modules ssh) 563(use-package-modules ssh)
@@ -605,7 +612,7 @@ fdisk -l /dev/sda"
605 (format #f "#!/usr/bin/env bash 612 (format #f "#!/usr/bin/env bash
606set -eo pipefail 613set -eo pipefail
607apt-get update 614apt-get update
608apt-get install guix cloud-initramfs-growroot --assume-yes")) 615apt-get install cloud-initramfs-growroot --assume-yes"))
609 (format #t "successfully installed rescue system packages on '~a'\n" name))) 616 (format #t "successfully installed rescue system packages on '~a'\n" name)))
610 617
611(define (hetzner-machine-delete machine server) 618(define (hetzner-machine-delete machine server)