fast server install for cloud-image like experience

Registered by Scott Moser

Rationale:
A primary goal of MAAS is to manage hardware as you would a cloud. Time spent on installation reduces user use of the resources. The time for installation can be significantly reduced by installation of a prepared image.

Goal:
Provide a minimal "cloud-image" like installation for MAAS that installs nodes faster than the debian installer.

== Status 2013-05-13 ==
Marking this 'implemented'. and dumping informatoin into the whiteboard on how to use the fast path installer that we have right now. We have more work to do on this, that will continue into 13.10.

Blueprint information

Status:
Complete
Approver:
Dave Walker
Priority:
Essential
Drafter:
Ubuntu Server
Direction:
Approved
Assignee:
Scott Moser
Definition:
Approved
Series goal:
Accepted for raring
Implementation:
Implemented
Milestone target:
None
Started by
Dave Walker
Completed by
Scott Moser

Related branches

Whiteboard

User Stories:
Rocky runs a MAAS cluster. The nodes have frequent turnover and installation time is time lost. Faster installation means higher usage time.

Assumptions:
The fast path installer is intended to only support simplistic cloud-image-like installation. Users wishing for for more complex partition layout may need to use the debian installer path.

Risks:
bootloader installation is non-trivial. The debian installer does a good job of doing this. If we can't re-use that logic we risk failing to boot. UEFI boot is also complex and may be required for some systems.

Test Plans:
This code path will be used in the Ubuntu openstack CI framework to help it install faster. That will prove at least one functional path. Additionally, the code is testable inside kvm with a cloud-image serving as the bootable system and installing to a target second disk in the system.

Release Note:
Nodes installed through MAAS can use the fast path installer to significantly reduce installation time. It results in a cloud-image like environment with customization available via cloud-init on first boot.

== How to use in maas ==
maas-cli maaslocal tags new name='use-fastpath-installer' comment='BE FASTER'
maas-cli maaslocal tag update-nodes use-fastpath-installer add=node-a95b107a-ad20-11e2-9e40-2c768a4e4495
maas-cli maaslocal tag nodes use-fastpath-installer
( cd /opt && sudo bzr branch lp:~smoser/+junk/xinstall xinstall )
xinstall_preseed="/usr/share/maas/preseeds/preseed_xinstall"
sudo dpkg-divert --rename --divert ${xinstall_preseed}.dist --add ${xinstall_preseed}
sudo tee "${xinstall_preseed}" <<"EOF"
{{py:
if http_proxy:
    proxy = http_proxy
else:
    proxy = "http://"+server_host+":8000/"
if node.distro_series:
    release = node.distro_series
else:
    release = "precise"
import subprocess
preseed = subprocess.check_output(["/opt/xinstall/make-userdata-maas",
    "--apt-proxy="+proxy,
    "--dpkg-selections="+preseed_data,
    "--finished-url="+node_disable_pxe_url,
    "--finished-url-data="+node_disable_pxe_data,
    "http://"+cluster_host+"/MAAS/static/images/"+node.architecture+"/"+node.distro_series+"/xinstall/root.tar.gz",
    "/dev/vda"])
}}
{{preseed}}
EOF
links:
 * maas tag doc: http://maas.ubuntu.com/docs/tags.html

(?)

Work Items

Work items:
Package fast path installer: TODO
Integrate ephemeral boot installer support into MAAS for fast path installer: DONE
Support installer choice in MAAS on default and per-node basis: DONE
Support user-scripts partitioning scripts for installer: TODO
Support simplistic raid in installer: TODO
Support late-command in installer: TODO
Support kexec into booted system in installer: TODO
Document installer: TODO