[vserver] [ANN] alpine-vserver, a minimal vserver host "live cd"

From: Natanael Copa <natanael.copa_at_gmail.com>
Date: Tue 16 Feb 2010 - 10:38:40 GMT
Message-ID: <95408c821002160238gcc70d18o178a6d6eb63f8eeb@mail.gmail.com>

Hi,

I have made an Alpine Linux flavor with vserver kernel. This is a
fairly minimal "livecd" that is supposed to be able run production
vserver hosts. During boot it will install everything from scratch
into tmpfs and run from there (so no runtime slowdowns caused by cdrom
spinning up)

Download from here (approx 40MB):
http://www.alpinelinux.org/downloads.html (use vserver iso at the bottom)

The idea is:
* Boot cdrom (or bootable USB/CF) and configure network
* Create partitions, filesystems on harddisks/raid array.
* Mount disks on /vserver and add to fstab
* Save config (aka. apkovl) to USB/CF
* Create and run you vserver guests.

This way you have the Host OS on separate media (cdrom/usb/cf) and the
host config on an usb/cf. Benefit with this is that it goes very quick
to set up a new vserver or restore a backup (just connect to the disk
backend).

Step by step instructions:
* boot cdrom
* log in as root
* configure hostname and network by running: setup-alpine
* configure your disk(s), mount as /vservers and add to /etc/fstab
* optional: install and configure ntp client:
  apk add openntpd
  rc-update add ntpd && rc-service ntpd start
* install and start util-vserver:
  apk add util-vserver
  rc-update add vprocunhide && rc-service vprocunhide start
* make sure vservers marked as 'default' will start next reboot:
  rc-update add vservers.default
* save configuration to usb memory for next reboot (make sure usb is inserted):
  lbu commit usb

Now to set up a minimal test guest running Alpine:
* run: setup-vs-guest guest1

It took me approx 3 minutes do all the above (except set up disks) in
qemu and have a guest running, boot included.

Note that you can also install applications from network (http) that
will be available next reboot as well. Only thing you need to do is
enable the apk cache and add an http repository. Here is an example
how to do that to install shorewall:

* make sure usb is mounted: mount /media/usb
* Enable apk cache:
  mkdir /media/usb/cache
  ln -s /media/usb/cache /etc/apk/cache
* Add http repository:
  echo "http://dl-3.alpinelinux.org/alpine/v1.10/packages/main" >>
/etc/apk/repositories
  apk update # fetch the index
* Install shorewall-shell:
  apk add shorewall-shell
* make sure its still there for next reboot:
  lbu commit usb

Cheers!

-- 
Natanael Copa
Received on Tue Feb 16 10:39:00 2010
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 16 Feb 2010 - 10:39:01 GMT by hypermail 2.1.8