From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org
Subject: Re: Better support remote deployment
Date: Tue, 07 Nov 2023 21:12:44 -0500 [thread overview]
Message-ID: <87fs1hhu1v.fsf@gmail.com> (raw)
In-Reply-To: <87zfzp2vph.fsf@elephly.net> (Ricardo Wurmus's message of "Tue, 07 Nov 2023 20:45:29 +0100")
Hello,
Ricardo Wurmus <rekado@elephly.net> writes:
> Hi Maxim,
>
>> Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> Hi Guix,
>>>
>>> I build software locally and deploy the result to a remote system with
>>> “guix copy”. This works pretty well but has a few rough edges:
>>>
>>> 1. “guix build -m manifest.scm” does not generate a profile. It only
>>> builds the list of packages. To build a profile from a manifest file we
>>> need to resort to something like this:
>>>
>>> guix shell -m $(PWD)/etc/container-server-manifest.scm -- sh -c 'echo $GUIX_ENVIRONMENT'
>>>
>>> 2. “guix package” cannot install an existing profile store item as the
>>> current generation of the profile. It can, however, install individual
>>> package items into a profile.
>>>
>>> 3. “guix package --remove” does not support regular expressions, so
>>> removing packages that were installed with “guix install /gnu/store/…”
>>> cannot easily be removed.
>>>
>>> Because of these limitations I cannot make use of a Guix profile symlink
>>> forest on the target system. Instead I build a profile locally (with
>>> the “guix shell” trick above), copy it to the remote with “guix copy
>>> --to=remote /gnu/store/…-profile”, and then link that profile to a fixed
>>> location on the remote system.
>>>
>>> I would like to change this workflow so that I can benefit from roll
>>> backs without having to manually mess with symlinks.
>>>
>>> What do you think about changing “guix package” and/or “guix copy” to
>>> better support deployment of remote profiles?
>>
>> I like the use case, but perhaps it'd be best implemented via hooking
>> 'guix home' configs with 'operating-system' ? So you could say, for
>> this user, I want the following packages and services installed?
>>
>> Would that work for your use case?
>
> No, because on the remote I don’t have Guix System.
>
> It would still be useful, but not for this use case.
I see. Then your suggestion to extend 'guix package' to be able to
install a profile from a store profile sounds useful, or perhaps a new
'guix deploy-profile' (or a better name / sub-command?) that would
automate the copy and installation in one step.
--
Thanks,
Maxim
next prev parent reply other threads:[~2023-11-08 2:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-01 12:19 Better support remote deployment Ricardo Wurmus
2023-11-01 15:20 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-11-02 9:59 ` Ricardo Wurmus
2023-11-07 19:07 ` Maxim Cournoyer
2023-11-07 19:45 ` Ricardo Wurmus
2023-11-08 2:12 ` Maxim Cournoyer [this message]
2023-11-08 2:39 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-11-08 14:36 ` Maxim Cournoyer
2023-11-09 7:38 ` Efraim Flashner
2023-11-09 15:01 ` Maxim Cournoyer
2023-11-16 15:23 ` Ludovic Courtès
2023-11-16 16:47 ` Felix Lechner via Development of GNU Guix and the GNU System distribution.
2023-11-21 1:33 ` Tomas Volf
2023-11-23 4:24 ` Maxim Cournoyer
2023-12-10 13:49 ` Ricardo Wurmus
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=87fs1hhu1v.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=guix-devel@gnu.org \
--cc=rekado@elephly.net \
/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).