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: Fri, 22 May 2015 18:06:52 +0200 Message-ID: <87a8wwiokj.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> 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]:54332) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvpTN-0006AK-3H for guix-devel@gnu.org; Fri, 22 May 2015 12:06:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvpTL-0007Vc-Uy for guix-devel@gnu.org; Fri, 22 May 2015 12:06:56 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:47347) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvpTL-0007VY-R8 for guix-devel@gnu.org; Fri, 22 May 2015 12:06:55 -0400 In-Reply-To: <87382oejz8.fsf@fsf.org> (David Thompson's message of "Fri, 22 May 2015 10:59:39 -0400") 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: David Thompson Cc: guix-devel@gnu.org, Carlos Sosa David Thompson skribis: > To take it for a spin, add something like this to a file, let's call it > "deployment.scm": > > (use-modules (gnu) (guix gexp)) > (use-service-modules databases) > (use-package-modules web databases) >=20=20=20=20=20 > (define dummy-fs > (file-system > (mount-point "/") > (device "dummy") > (type "dummy"))) >=20=20=20=20=20 > (define grub > (grub-configuration (device "/dev/sda"))) >=20=20=20=20=20 > (define timezone "America/New_York") > (define locale "en_US.UTF-8") >=20=20=20=20=20 > ;; TODO: Needs nginx-service. > (define web-server > (machine > (name "web-server") > (system (operating-system > (host-name "web-server") > (timezone timezone) > (locale locale) > (bootloader grub) > (file-systems > (list dummy-fs %binary-format-file-system)) > (packages > (cons nginx %base-packages)))) > (platform (local-vm #:ip-address "10.0.2.10")))) >=20=20=20=20=20 > (define db-server > (machine > (name "db-server") > (system (operating-system > (host-name "db-server") > (timezone timezone) > (locale locale) > (bootloader grub) > (file-systems > (list dummy-fs %binary-format-file-system)) > (services > (cons (postgresql-service) > %base-services)) > (packages (cons postgresql %base-packages)))) > (platform (local-vm #:ip-address "10.0.2.11")))) >=20=20=20=20=20 > (deployment > (name "test-deployment") > (machines (list web-server db-server))) >=20=20=20=20=20 > Then run the following from your git checkout: > > ./pre-inst-env guix deploy spawn /path/to/deployment.scm Woow, that=E2=80=99s very nice. The declarations are straightforward and immediately understandable, I think, which is cool. Perhaps one addition eventually would be to allow IPs to be automatically allocated and have host name lookup DTRT in each VM. > Now, there's still much work to be done. Spawning local, temporary VMs > has gotten me over some initial hurdles, but now we need to write a > platform adapter for something more serious so that we can determine the > requirements for "real world" deployment scenarios. Perhaps we should > look into writing an OpenStack adapter. As discussed on IRC, I was unsure about OpenStack, but I=E2=80=99ll trust y= our judgment. Maybe Cyril can comment? Thanks, Ludo=E2=80=99.