Re: Hosting a GuixSD server on commodity hosting platforms, a journey
Christopher Baines writes: > On 02/12/16 04:06, Christopher Allan Webber wrote: >> Except, oops! This won't boot. We need to put GRUB on it. >> >> Well here's where I'm stuck for tonight. I don't know exactly what's >> needed; maybe either the -b flag, or --grub2-mbr, or some combination. >> The man page is a little bit overwhelming (I mean, xorrisofs is clearly >> featureful, credit there): >> >> https://www.gnu.org/software/xorriso/man_1_xorrisofs.html >> >> But how do I generate the right GRUB stuff to put there? Can I pull it >> off the USB image? Generate it separately? >> >> This web page is very long but appears to have the appropriate info (and >> unfortunately requires running arbitrary javascript to even render): >> >> >> http://lukeluo.blogspot.com/2013/06/grub-how-to-2-make-boot-able-iso-with.html >> >> ... so I guess the next steps are following roughly what's described at >> the bottom of the page? >> >> I wonder how other distros do this step. > > Thanks for looking in to this Chris! I'm using Bytemark for personal > servers, and have tried and failed to install Guix from a Debian live > cd. But, they do support installing from arbitrary ISO images, this > would be great to get working. > > The bash script which I guess Nix uses looks quite short [1], you might > find some useful inspiration there. > > 1: > https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/make-iso9660-image.sh That looks VERY helpful, thank you!
Re: Hosting a GuixSD server on commodity hosting platforms, a journey
Chris Marusich writes: > Hi, > > Reading Chris' report, I was inspired to try the same thing on EC2. I > don't know much about Linode or Rackspace, but I do know EC2. I'm happy > to report that I was successfully in creating a GuixSD EC2 instance. > > Here's what I did. Essentially, all I wanted to do was run "guix system > init" on the root device of an EC2 instance. I accomplished that by > running "guix system init" on a loopback device (on my laptop), copying > the file which backed the loopback device onto an EC2 instance, writing > the file to an EBS volume attached to the instance, and then replacing > the EC2 instance's root EBS volume with the newly written EBS volume. Wow, great! Thank you for trying it, and documenting it :)
Re: Hosting a GuixSD server on commodity hosting platforms, a journey
Christopher Allan Webberwrites: > Christopher Allan Webber writes: > >> What am I doing wrong? I'm not totally sure... I feel like I'm >> navigating a jungle out here in the OpenStack / Rackspace docs. Here's >> one thing I found: >> >> https://community.rackspace.com/products/f/25/t/7186 >> >> So I probably need to execute this "import" command. I guess that's >> what's next... > > Well, I did a bit more exploration tonight with *some* progress, but > still not success. I followed the above link and got a task to generate > an image based off my file. Looks like the task took! And it showed up > in "image-list" with the glance command line client. Sounds like > progress! > > And hey, if I try to create the server now via the web UI... if I look > to create an image based off the images list from > "Saved -> Deleted Servers (!!!)" menu, I indeed see my image listed. > Cool! So I select that and click "create server". > > Ok... I wait a bit. It says it's initializing it! > > Uhoh, suddenly the status turns to ERROR. What's ERROR? I don't know. > It says ERROR, and it's red. Hovering over it suggests I ask support. > Hm. > > I wonder if I used the Nova command line client if I'd get more > information, or if there's a way to query the API to get more info. > > Still, that's *some* progress... I kicked off generating an image > generated via GuixSD, even if it didn't work at all... :) > > Relatedly! User dvc in #guix on freenode suggests looking at > https://www.vultr.com/ which looks quite affordable and hey! It has a > "custom ISO" option. If we can convert our USB boot stick thingy > (presumably via xorriso) we could try generating a base server image > from there. I'd prefer to have a workflow where I go from handing off > something made with "guix system vm-image" to some API, but maybe in the > meanwhile Vultr would be a lower barrier to entry. > > In the meanwhile, anyone familiar enough with Nova or Rackspace want to > give me hints on how to find out more about what ERROR means, more > specifically? ;) I've had the questionable privilege of working on Openstack for some time, and indeed have a GuixSD system running on it. I can tell you that any errors you see are not necessarily representative of what's happening in the back-end, although it does sound like the Rackspace GUI just spits out a generic message, instead of a flat-out lie.. The image I used was created by installing a bare-bones GuixSD to an LVM device (e.g. with Qemu), then dumping this with `dd` before first boot to create a "RAW" image. RAW is supported (required, actually) by Glance if Ceph is used as the backing storage, but Rackspace only supports VHD. I haven't looked into the fstab of the generated VM image, but it may be hard-coded to '/dev/vda' whereas Xen creates '/dev/xvda' (IIRC). Though it should at least try to boot if that was the case. My best advice is to try doing a normal install in a VM from the USB image (qcow2 probably works) and then convert it to the format your cloud platform expects, instead of booting the VM image directly. I used GPT with a "bios_grub" partition FWIW. Make sure to use (title 'label) and appropriate FS labels, since the root device path may vary between cloud platforms. On a vaguely related note, I'm slowly working on a "native" GuixSD hosting platform, where you will be able to submit (and share!) configuration files and get a VM and/or disk image back. It's still a long way off, but I could use some help building the web front-end once the back-end is ready. Feel free to contact me for more details :) signature.asc Description: PGP signature
Re: Hosting a GuixSD server on commodity hosting platforms, a journey
Marius Bakke writes: > I've had the questionable privilege of working on Openstack for some > time, and indeed have a GuixSD system running on it. I can tell you that > any errors you see are not necessarily representative of what's > happening in the back-end, although it does sound like the Rackspace GUI > just spits out a generic message, instead of a flat-out lie.. Yeah it was pretty generic, so I have no idea what happened. :) > The image I used was created by installing a bare-bones GuixSD to an LVM > device (e.g. with Qemu), then dumping this with `dd` before first boot > to create a "RAW" image. RAW is supported (required, actually) by Glance > if Ceph is used as the backing storage, but Rackspace only supports VHD. Interesting! > I haven't looked into the fstab of the generated VM image, but it may be > hard-coded to '/dev/vda' whereas Xen creates '/dev/xvda' (IIRC). Though > it should at least try to boot if that was the case. Yeah, my configuration was set up for /dev/sda I think. I guess I could do a system reconfigure switching it out to /dev/vda or whatever at least minute... I dunno. > My best advice is to try doing a normal install in a VM from the USB > image (qcow2 probably works) and then convert it to the format your > cloud platform expects, instead of booting the VM image directly. I used > GPT with a "bios_grub" partition FWIW. Out of curiosity, why do you think this would be an improvement? > Make sure to use (title 'label) and appropriate FS labels, since the > root device path may vary between cloud platforms. Right, though labels might vary between platforms too, correct? > On a vaguely related note, I'm slowly working on a "native" GuixSD > hosting platform, where you will be able to submit (and share!) > configuration files and get a VM and/or disk image back. It's still a > long way off, but I could use some help building the web front-end once > the back-end is ready. Feel free to contact me for more details :) Now this I'm really interested in! I'll ping you off-list to discuss this more. :)
Re: Hosting a GuixSD server on commodity hosting platforms, a journey
Christopher Allan Webber writes: > What am I doing wrong? I'm not totally sure... I feel like I'm > navigating a jungle out here in the OpenStack / Rackspace docs. Here's > one thing I found: > > https://community.rackspace.com/products/f/25/t/7186 > > So I probably need to execute this "import" command. I guess that's > what's next... Well, I did a bit more exploration tonight with *some* progress, but still not success. I followed the above link and got a task to generate an image based off my file. Looks like the task took! And it showed up in "image-list" with the glance command line client. Sounds like progress! And hey, if I try to create the server now via the web UI... if I look to create an image based off the images list from "Saved -> Deleted Servers (!!!)" menu, I indeed see my image listed. Cool! So I select that and click "create server". Ok... I wait a bit. It says it's initializing it! Uhoh, suddenly the status turns to ERROR. What's ERROR? I don't know. It says ERROR, and it's red. Hovering over it suggests I ask support. Hm. I wonder if I used the Nova command line client if I'd get more information, or if there's a way to query the API to get more info. Still, that's *some* progress... I kicked off generating an image generated via GuixSD, even if it didn't work at all... :) Relatedly! User dvc in #guix on freenode suggests looking at https://www.vultr.com/ which looks quite affordable and hey! It has a "custom ISO" option. If we can convert our USB boot stick thingy (presumably via xorriso) we could try generating a base server image from there. I'd prefer to have a workflow where I go from handing off something made with "guix system vm-image" to some API, but maybe in the meanwhile Vultr would be a lower barrier to entry. In the meanwhile, anyone familiar enough with Nova or Rackspace want to give me hints on how to find out more about what ERROR means, more specifically? ;) Onwards and upwards! - Chris