From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Guix "ops" Date: Thu, 20 Oct 2016 21:41:45 +0200 Message-ID: <87shrqzu2u.fsf@gnu.org> References: <87k2wx6t1e.fsf@fsf.org> <87vbgdy6x8.fsf@gnu.org> <87fv7h5zhk.fsf@fsf.org> <87mw1obbfq.fsf@gnu.org> <87bnhzrjf1.fsf@gnusosa.net> <87382oejz8.fsf@fsf.org> <87insramsv.fsf@dustycloud.org> <87twcb81ve.fsf@gnu.org> <871szcdoys.fsf@dustycloud.org> <87oa2fb13a.fsf@gnu.org> <87oa2feyzz.fsf@dustycloud.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50220) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxJDu-0005pl-A0 for guix-devel@gnu.org; Thu, 20 Oct 2016 15:41:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxJDt-0000lu-FJ for guix-devel@gnu.org; Thu, 20 Oct 2016 15:41:54 -0400 In-Reply-To: <87oa2feyzz.fsf@dustycloud.org> (Christopher Allan Webber's message of "Thu, 20 Oct 2016 12:01:04 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Christopher Allan Webber Cc: guix-devel@gnu.org, David Thompson Christopher Allan Webber skribis: > Ludovic Court=C3=A8s writes: > >> Christopher Allan Webber skribis: >> >>> - Should I build the entire derivation of the system I want to run on >>> the remote machine locally first, then copy that over? (I assume >>> this is possible, and eventually desirable, especially if doing >>> mass deployments? But it might not be desirable in every case.) >>> Would that use the substitute mechanism? >> >> Yes! :-) >> >> Essentially deployment would work like this: >> >> 1. Compute the system derivation and build it locally (i.e., on the >> machine where =E2=80=98guix deploy=E2=80=99 is running.) >> >> As a user, you can choose to have offloading setup such that the >> actual build will take place on (some of) the target machines, but >> that=E2=80=99s completely orthogonal. >> >> 2. Send the derivation out to the target(s) that are real machines. >> For targets that are local containers or VMs, there=E2=80=99s nothi= ng to >> do. >> >> 3. On targets that are real machines, perform the equivalent of =E2=80= =98guix >> system reconfigure=E2=80=99=E2=80=94i.e., update the /run/current-s= ystem symlink, >> restart Shepherd services that can be restarted, etc. >> >> IIRC David was testing using VMs and containers as the targets (the >> record=C2=B9) because it=E2=80=99s easier. >> >> Does that make sense? >> >> Hopefully David will correct me. :-) > > Ok, it does make sense! > > It's nice to see the examples in the docs of exporting a system over > ssh, even. Anyway, I played with "guix archive" this morning; it works > well. So, sending an entire closure over the network: should be easy. > > I see that there's a --missing field; I'm a little bit unsure of how two > machines would coordinate here though with the existing tooling... it > doesn't look like we have a way to export the list of packges that > --missing could then read in? And then you'd need to feed whatever > --missing gave you back into --export I guess. Yes, there=E2=80=99s an example of that in (guix scripts offload), in =E2=80=98send-files=E2=80=99. Essentially you do: guix archive --export \ `guix gc -R the-thing-to-send | ssh host guix archive --missing` | \ ssh host guix archive --import HTH! Ludo=E2=80=99.