From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Meyer Subject: AWS + OpenStack support Date: Mon, 10 Apr 2017 22:21:11 +0200 Message-ID: <87lgr8hv48.fsf@ofosos.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cxfoM-0004Q8-Px for guix-devel@gnu.org; Mon, 10 Apr 2017 16:21:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cxfoJ-0007Tx-LR for guix-devel@gnu.org; Mon, 10 Apr 2017 16:21:18 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:51354) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cxfoJ-0007Ra-Bf for guix-devel@gnu.org; Mon, 10 Apr 2017 16:21:15 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id A60A62081F for ; Mon, 10 Apr 2017 16:21:13 -0400 (EDT) Received: from thukydides (x4dba1bd5.dyn.telefonica.de [77.186.27.213]) by mail.messagingengine.com (Postfix) with ESMTPA id 1B98B246FC for ; Mon, 10 Apr 2017 16:21:13 -0400 (EDT) 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: guix-devel Hi list, is anybody interested in having support for running guix on AWS and/or OpenStack? I've GuixSD running on AWS. The way to get there was somewhat contrived, but it worked well. Basically these `cloud' environments provide some form of instance configuration. You're supposed to create an image of your OS and it'll self configure upon (first) boot. This includes more than enabling DHCP. Generally AWS will provide a so called metadata server. The important thing serves are your public keys. You'll generally specify a set of public keys on instance startup. So I'd like to extend Shepherd with a first-boot service that runs `guix system reconfigure'. And as a second step I want to include a Guile package that queries the metadata server. You should be able to do something like (user "guix-sd" (public-keys (metadata-get-keys))) Despite this the only thing that is required to run on AWS is basically an SSH implementation and a DHCP configuration. To get GuixSD running on AWS I did the following: - Build a disk-image out of my local GuixSD installation, enable OpenSSH and DHCP. Create a custom user and set the password. - Copy the disk-image to S3 - Create an IAM role that includes read-only access to S3 - Start an `Amazon Linux' instance as an intermediate, I used Amazon Linux but anything else will just work as well. Attach the IAM role, when creating the instance and also attach a 2GB sized EBS volume. - Log into the intermediate, download the disk-image from S3 onto local disk, then dd the image onto the attached 2GB EBS volume. - Do a snapshot of the 2GB volume, then register that as an AMI, setting the virtualization type to `HVM'. You could do without the S3 storage in the middle, but I like it better this way, since my internet access is not the fastest and you need to transfer 1~2GB. Is anybody interested in publicly accessible AMIs for AWS? An AMI is an Amazon Machine Image. When you got an AMI for your system, you can spin up an instance with minimal configuration. I would like to do the aforementioned steps during the next weekend, which will be a four day weekend in my country, so there's some time to kill. Let me know what you think, don't forget to CC me, since I'm not on the list. Cheers, Mark