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 15:29:29 +0200 Message-ID: <87oa2fb13a.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> 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]:58231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxDPe-0002qi-Lf for guix-devel@gnu.org; Thu, 20 Oct 2016 09:29:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxDPd-0006tf-H0 for guix-devel@gnu.org; Thu, 20 Oct 2016 09:29:38 -0400 In-Reply-To: <871szcdoys.fsf@dustycloud.org> (Christopher Allan Webber's message of "Wed, 19 Oct 2016 16:10:51 -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 Howdy! Christopher Allan Webber skribis: > So yeah, I'm going to start playing around with building some on some of > these ideas soonish. I could use some advice, though. Assume I'm able > to build the right scheme representation of the system I want to be run > remotely on another machine (whether it's a gexp, whatever). What's the > right way to go about this? Assume for the moment that I have a remote > "target" machine already running GuixSD and I can ssh into it. > > - Should I write out an sexp of the system I want to be built, write it > to a scheme file I copy over, and then invoke the guile command line > tools to start it up? No! > - Should I write out an sexp of the script I want to run and execute it > as a normal guile program? No! > - 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 nothing = to do. 3. On targets that are real machines, perform the equivalent of =E2=80=98= guix system reconfigure=E2=80=99=E2=80=94i.e., update the /run/current-syst= em 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. :-) Ludo=E2=80=99. =C2=B9 https://lists.gnu.org/archive/html/guix-devel/2015-07/msg00320.html