unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: "Jérémy Korwin-Zmijowski" <jeremy@korwin-zmijowski.fr>
To: Guix Help <help-guix@gnu.org>
Subject: Trying to guix deploy to a local VM created with guix system vm
Date: Tue, 08 Dec 2020 14:43:58 +0100	[thread overview]
Message-ID: <ca9908c0cabc29bc36a6f5ad2a3716eebb3aff78.camel@korwin-zmijowski.fr> (raw)

[-- Attachment #1: Type: text/plain, Size: 2150 bytes --]

Dear Guixters !

Having trouble to `guix deploy` to a VPS the last couples of days, I
tried the experiment locally on a VM powered by `guix system vm`.

Unfortunately, I haven't managed to successfuly deploy on a VM haha
(chances are failures are mine that's why I write to guix-help instead
of bug-guix…).

I created a script and system declarations to reproduce my attempts
(inspired by https://gitlab.com/janneke/deploy).

Here is the error I get so far :

La (1) machine suivante sera déployée :
  kitchen-deployed

guix deploy: déploiement vers kitchen-deployed...
guix deploy: error: impossible de déployer kitchen-deployed : SSH
authentication failed for 'localhost': Access denied for 'publickey'.
Authentication that can continue: publickey,password

Backtrace:
          17 (primitive-load "/home/jeko/.config/guix/current/bin/gu…")
In guix/ui.scm:
  2127:12 16 (run-guix-command _ . _)
In ice-9/boot-9.scm:
  1736:10 15 (with-exception-handler _ _ #:unwind? _ # _)
  1731:15 14 (with-exception-handler #<procedure 7f2fe0bcbd50 at ic…>
…)
In guix/status.scm:
    776:4 13 (call-with-status-report _ _)
In ice-9/boot-9.scm:
  1736:10 12 (with-exception-handler _ _ #:unwind? _ # _)
In guix/store.scm:
   632:37 11 (thunk)
   1301:8 10 (call-with-build-handler #<procedure 7f2fd796f960 at g…>
…)
In guix/scripts/deploy.scm:
   170:14  9 (_)
In guix/store.scm:
   1342:2  8 (map/accumulate-builds #<store-connection 256.99 7f2fd…>
…)
In srfi/srfi-1.scm:
   586:17  7 (map1 (#<<machine> operating-system: #<<operating-syst…>))
In guix/store.scm:
   1301:8  6 (call-with-build-handler #<procedure build-accumulator…>
…)
In ice-9/boot-9.scm:
  1736:10  5 (with-exception-handler _ _ #:unwind? _ # _)
In guix/scripts/deploy.scm:
   144:28  4 (_)
In gnu/machine/ssh.scm:
   434:34  3 (deploy-managed-host #<<machine> operating-system: #<<o…>)
In ice-9/boot-9.scm:
  1670:16  2 (raise-exception _ #:continuable? _)
  1669:16  1 (raise-exception _ #:continuable? _)
  1669:16  0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1669:16: In procedure raise-exception:
ERROR:
  1. &non-continuable


Cheers,

Jérémy

[-- Attachment #2: bare-bones.scm --]
[-- Type: text/x-scheme, Size: 1475 bytes --]

;; This is an operating system configuration template
;; for a "bare bones" setup, with no X11 display server.
(define-module (bare-bones))

(use-modules (gnu))
(use-service-modules networking ssh)
(use-package-modules screen ssh)

(define-public %bare-bones
  (operating-system
   (host-name "kitchen")
   (timezone "Europe/Paris")
   (locale "fr_FR.utf8")

   ;; Boot in "legacy" BIOS mode, assuming /dev/sdX is the
   ;; target hard disk, and "my-root" is the label of the target
   ;; root file system.
   (bootloader (bootloader-configuration
		(bootloader grub-bootloader)
		(target "/dev/sda")))
   (file-systems (cons (file-system
			(device "/dev/sda1")
			(mount-point "/")
			(type "ext4"))
                       %base-file-systems))

   ;; Globally-installed packages.
   (packages (cons screen %base-packages))

   ;; Add services to the baseline: a DHCP client and
   ;; an SSH server.
   (services
    (append
     (list
      (service dhcp-client-service-type)
      (service openssh-service-type
               (openssh-configuration
		(openssh openssh-sans-x)
		(permit-root-login 'without-password)
		(authorized-keys
		 `(("root" ,(local-file "id_rsa.pub"))))
		(port-number 22))))
     (modify-services
      %base-services
      (guix-service-type
       config => (guix-configuration
		  (inherit config)
		  (authorized-keys
		   (append
		    (list (local-file "/etc/guix/signing-key.pub"))
		    %default-authorized-guix-keys)))))))))

%bare-bones

[-- Attachment #3: deploy-bare-bones.scm --]
[-- Type: text/x-scheme, Size: 871 bytes --]

;; This is a Guix deployment of a "bare bones" setup, with
;; no X11 display server, to a machine with an SSH daemon
;; listening on localhost:2222. A configuration such as this
;; may be appropriate for virtual machine with ports
;; forwarded to the host's loopback interface.

(use-modules (bare-bones))

(define %system
  (operating-system
   (inherit %bare-bones)
   (host-name "kitchen-deployed")))

(list (machine
       (operating-system %system)
       (environment managed-host-environment-type)
       (configuration (machine-ssh-configuration
                       (host-name "localhost")
                       (system "x86_64-linux")
                       (user "root")
                       (identity "id_rsa")
		       (host-key "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOaYzLHn1PtYIMxl0VY6JO7Xo94ZP41J/gY1aIniQZx2")
                       (port 10022)))))

[-- Attachment #4: deploy-vm.sh --]
[-- Type: application/x-shellscript, Size: 427 bytes --]

             reply	other threads:[~2020-12-08 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 13:43 Jérémy Korwin-Zmijowski [this message]
2020-12-08 22:42 ` Trying to guix deploy to a local VM created with guix system vm Jeremy Korwin-Zmijowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca9908c0cabc29bc36a6f5ad2a3716eebb3aff78.camel@korwin-zmijowski.fr \
    --to=jeremy@korwin-zmijowski.fr \
    --cc=help-guix@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).