unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Guix Deploy Hacking
@ 2020-10-13  2:08 Kurt I
  2020-10-13 11:18 ` Julien Lepiller
  0 siblings, 1 reply; 2+ messages in thread
From: Kurt I @ 2020-10-13  2:08 UTC (permalink / raw)
  To: guix-devel

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



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

* Re: Guix Deploy Hacking
  2020-10-13  2:08 Guix Deploy Hacking Kurt I
@ 2020-10-13 11:18 ` Julien Lepiller
  0 siblings, 0 replies; 2+ messages in thread
From: Julien Lepiller @ 2020-10-13 11:18 UTC (permalink / raw)
  To: guix-devel, Kurt I



Le 12 octobre 2020 22:08:44 GMT-04:00, Kurt I <gitlabcanada@runbox.com> a écrit :
>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?

This was not the case with 1.1.0, but now we register the file that generated your system as /run/current-system/config.scm, with provenance information.


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

end of thread, other threads:[~2020-10-13 11:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13  2:08 Guix Deploy Hacking Kurt I
2020-10-13 11:18 ` Julien Lepiller

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