unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Kurt I <gitlabcanada@runbox.com>
To: guix-devel@gnu.org
Subject: Guix Deploy Hacking
Date: Mon, 12 Oct 2020 20:08:44 -0600	[thread overview]
Message-ID: <b4f0d6504ccd7137596eb1a215429c09ef21a610.camel@runbox.com> (raw)

Greetings,

I am attempting to use "Guix Deploy" as a replacement for Norton
Ghost/SCCM, imaging type software.

There are 2 tasks I'm working on:

1) Using deploy to update a machine
	- I don't understand the point of pushing packages to a system
that disappear if you do a "guix system reconfigure" on that machine.

To deal with this I have this code in my deploy file:

;; This will locate where the system config file is
(define this-file
  (local-file (basename (assoc-ref (current-source-location) 'filename)
	"config.scm")))

;; This replaces or creates a new system config file
	(simple-service 'config-file etc-service-type
		`(("lr.scm" ,this-file)))

Perhaps an argument to "Guix Deploy" to optionally save the file you
are pushing on the remote machine could be added?

2) I am trying to deploy a machine that is running the guix installer
in cli mode off the USB key. I have done the following steps:

1) ifconfig <interface> up
2) passwd root <passwd>
3) guix install guile-ssh
4) herd start ssh-daemon
5) I then have a script I run on the target machine:

umount -a
parted /dev/sda set 1 esp on
mkfs.fat -F32 -n GUIX-BOOT /dev/sda1
mkswap --label=guix-swap /dev/sda2
swapon LABEL=guix-swap
mkfs.ext4 -L guix-root /dev/sda3 

mount --label=guix-root /mnt
mkdir -p /mnt/etc
mkdir -p /mnt/etc/guix/
mkdir -p /mnt/boot/efi
mount --label=GUIX-BOOT /mnt/boot/efi

sudo guix archive --authorize < key-publish.pub
mkdir -p ~/.ssh/
cat key-ssh.pub > ~/.ssh/authorized_keys

herd start cow-store /mnt
echo "Ready for deploy!"

6) I then start the deploy process with "Guix Deploy" and it works for
some of the process:

guix deploy: deploying to lr...
guix deploy: sending 9 store items (5 MiB) to '10.0.0.6'...
guix deploy: sending 805 store items (4,269 MiB) to '10.0.0.6'...

once it's done the big file transfer, I run into this:

guix deploy: error: failed to deploy lr: build daemon handshake failed

Is this an error I can get around or fix? or is "Guix Deploy" not meant
for using on a machine that hasn't done "Guix System Init" yet?

Thank you,
Kurt



             reply	other threads:[~2020-10-13  7:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-13  2:08 Kurt I [this message]
2020-10-13 11:18 ` Guix Deploy Hacking Julien Lepiller

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=b4f0d6504ccd7137596eb1a215429c09ef21a610.camel@runbox.com \
    --to=gitlabcanada@runbox.com \
    --cc=guix-devel@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.
Code repositories for project(s) associated with this public inbox

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

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).