all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Trying to guix deploy to a local VM created with guix system vm
@ 2020-12-08 13:43 Jérémy Korwin-Zmijowski
  2020-12-08 22:42 ` Jeremy Korwin-Zmijowski
  0 siblings, 1 reply; 2+ messages in thread
From: Jérémy Korwin-Zmijowski @ 2020-12-08 13:43 UTC (permalink / raw)
  To: Guix Help

[-- 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 --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Trying to guix deploy to a local VM created with guix system vm
  2020-12-08 13:43 Trying to guix deploy to a local VM created with guix system vm Jérémy Korwin-Zmijowski
@ 2020-12-08 22:42 ` Jeremy Korwin-Zmijowski
  0 siblings, 0 replies; 2+ messages in thread
From: Jeremy Korwin-Zmijowski @ 2020-12-08 22:42 UTC (permalink / raw)
  To: Guix Help

Mea Culpa !

I tried my script on an another computer and it is broken. Oops.

I will update it (already understand why Janneke did his script that
way haha).

I will come back to you as soon as possible !

Take care,

Jérémy



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-12-08 23:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-08 13:43 Trying to guix deploy to a local VM created with guix system vm Jérémy Korwin-Zmijowski
2020-12-08 22:42 ` Jeremy Korwin-Zmijowski

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.