From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id iHsjGpWaD18tPQAA0tVLHw (envelope-from ) for ; Thu, 16 Jul 2020 00:08:53 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eHoLFpWaD1+1QwAAB5/wlQ (envelope-from ) for ; Thu, 16 Jul 2020 00:08:53 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C8EC094013C for ; Thu, 16 Jul 2020 00:08:52 +0000 (UTC) Received: from localhost ([::1]:42088 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jvrSE-0003Vx-7g for larch@yhetil.org; Wed, 15 Jul 2020 20:08:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jvrSB-0003Vd-RC for gwl-devel@gnu.org; Wed, 15 Jul 2020 20:08:47 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]:37073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jvrS9-00048v-Ui for gwl-devel@gnu.org; Wed, 15 Jul 2020 20:08:47 -0400 Received: by mail-wm1-x336.google.com with SMTP id o2so8083606wmh.2 for ; Wed, 15 Jul 2020 17:08:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=l/+lOPHw+S0kqaFrdAER5sA+h/f2tKTY6NygtlTpJXU=; b=Yv6vOXyA5UowyuavG3WvkbdjdO+JjR1fAJIUlhg6L7cMOd9BTMuN4wT2/nm1M7htjz R3NPWeB1fTTezKClujhmu1CRqOiHBkIavMDkw+g+V3Apr3siqLC/F8q0JUxNNYyPaHax Y0sG1+SQlem1Fx2ofdIaS2FQILWx6KbNozgYJqvQYrXkOmq91TUMLTLE6bbHzXrBPk62 XDtN0mAe3Y611b5X5i1CoRk7z+NbDAVwRcvkU5IsWR/Y9YBqhugDLqFr3jGM0vjHuC1l 4PTZ4olYPyyaCCQ9Zx5HoHB7c3Cg2ICdHhInUXnpihVJ+ZeuIQLkiJ1MtzJ0RmaraUnB D4VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=l/+lOPHw+S0kqaFrdAER5sA+h/f2tKTY6NygtlTpJXU=; b=cRlOI1L2ufprByj/m53qGLYw0SLrNlUM5uxrJZ/QjHzfN+ZsbsdN1rIinJNv+lWlzZ l7+wymwiI1oZElkknyQMKZH7FTA19ypXD6dYBn3RFWWmQyJSB8wjSBFoLGICBW3dnFZl +2F7PyJeCG6UgqTOWEeM6n7AXYPEz9n5p9nI3UvrL3kukzSgwNGzp6p6xd7ccHeCWJtW Ti4lC1E5EnDl+ACHntOxsqoOG19bVg1ICMSFLMICQREAeLk4QidBEyeZ5VTgoVPz/2kD XmdZUChiLmWLnv7t7wVwSih7sVaUGbOWDTEIedYcpQONDV+IgidaToUIhjyeCZEj5uKD kdqQ== X-Gm-Message-State: AOAM533Mum93QrAI5oEV3iw9uMerpLJs3ieOqtvYMPxJY/WuQp5MMS0D knlNnGmz194JbVNk3Dib7BNkxnPM X-Google-Smtp-Source: ABdhPJyYtA3C+4EVJWQMh5DajunRh7XqkWlIllRXspCWDQCKTcqRQ3431Vd/aSfHS0IzTzvgnFXG9A== X-Received: by 2002:a7b:c0c9:: with SMTP id s9mr1777717wmh.166.1594858123659; Wed, 15 Jul 2020 17:08:43 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id g3sm6566126wrb.59.2020.07.15.17.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 17:08:42 -0700 (PDT) From: zimoun To: Ricardo Wurmus , gwl-devel@gnu.org Subject: Re: fastest way to run a GWL workflow on AWS In-Reply-To: <87a70dkm2j.fsf@elephly.net> References: <87a70dkm2j.fsf@elephly.net> Date: Thu, 16 Jul 2020 02:08:40 +0200 Message-ID: <86y2nkz5h3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x336.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: gwl-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gwl-devel-bounces+larch=yhetil.org@gnu.org Sender: "gwl-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Yv6vOXyA; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of gwl-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=gwl-devel-bounces@gnu.org X-Spam-Score: -1.71 X-TUID: 0LHkqeKHW/A4 Dear Ricardo, Nice ideas! I am a bit ignorant in this area so my questions are surely totally naive, not to say dumb. :-) On Mon, 06 Jul 2020 at 11:52, Ricardo Wurmus wrote: > * create an EFS file system. Why EFS? Unlike EBS (block storage) and > S3, one EFS can be accessed simultaneously by different virtual > machines (EC2 instances). Who creates the EFS file system? And you are referring to [1], right? 1: https://aws.amazon.com/efs/ > * sync the closure of the complete workflow (all steps) to EFS. (How? > We could either mount EFS locally or use an EC2 instance as a simple > =E2=80=9Ccloud=E2=80=9D file server.) This differs from how other workf= low languages > handle things. Other workflow systems have one or more Docker > image(s) per step (sometimes one Docker image per application), which > means that there is some duplication and setup time as Docker images > are downloaded from a registry (where they have previously been > uploaded). Since Guix knows the closure of all programs in the > workflow we can simply upload all of it. I think one of the points about using one Docker image per step to ease the composition, well to be able to recompose another workflow with some of the steps and other steps requiring other tools with other versions. In Guix parlance, workflow1 uses tool1 for step1 and tool2 for step2 both from commit C1. If workflow2 uses tool1 from commit C1 for step1' and tool3 from commit C2 for step2', then it is easy if each tool (step) are containered and not in only one big image. But it is an issue for the Guix side, not the GWL side. :-) For example, is it possible to compose 2 profiles owning one package at the very same version but grafted differently? > * create as many EC2 instances as requested (respecting optional > grouping information to keep any set of processes on the same node) > and mount the EFS over NFS. The OS on the EC2 instances doesn=E2=80=99t > matter. By =E2=80=9CThe OS on the EC2 instances doesn=E2=80=99t matter.=E2=80=9C, d= o you mean that it is possible to run Guix System or Guix as package package on the top of say Debian? > * run the processes on the EC2 instances (parallelizing as far as > possible) and have them write to a unique directory on the shared > EFS. The rest of the EFS is used as a read-only store to access all > the Guix-built tools. > > The EFS either stays active or its contents are archived to S3 upon > completion to reduce storage costs. > > The last two steps are obviously a little vague; we=E2=80=99d need to add= a few > knobs to allow users to easily tweak resource allocation beyond what the > GWL currently offers (e.g. grouping, mapping resources to EC2 machine > sizes.) To implement the last step we would need to keep track of step > execution. We can already do this, but the complication here is to > effect execution on the remote nodes. Ok. > I also want to add optional reporting for each step. There could be a > service that listens to events and each step would trigger events to > indicate start and stop of each step. This could trivially be > visualized, so that users can keep track of the state of the workflow > and its processes, e.g. with a pretty web interface. By =E2=80=9Cservice=E2=80=9D, do you mean as Guix services? > For the deployment to AWS (and eventual tear-down) we can use Guile AWS. > > None of this depends on =E2=80=9Cguix deploy=E2=80=9D, which I think woul= d be a poor fit > as these virtual machines are meant to be disposable. > > Another thing I=E2=80=99d like to point out is that this doesn=E2=80=99t = lead users down > the AWS rabbit hole. We don=E2=80=99t use specialized AWS services like = their > cluster/grid service, nor do we use Docker, nor ECS, etc. We use the > simplest resource types: plain EC2 and boring NFS storage. This looks > like one of the simplest remote execution models, which could just as > well be used with other remote compute providers (or even a custom > server farm). > > One of the open issues is to figure out how to sync the /gnu/store items > to EFS efficiently. I don=E2=80=99t really want to shell out to rsync, n= or do I > want to use =E2=80=9Cguix copy=E2=80=9D, which would require a remote ins= tallation of > Guix. Perhaps rsync would be the easiest route for a rough first > draft. It would also be nice if we could deduplicate our slice of the > store to cut down on unnecessary traffic to AWS. Naively, why does the =E2=80=9Cguix pack -f docker=E2=80=9D or =E2=80=9Cgui= x docker-image=E2=80=9D approach fail? All the best, simon