Summary

Images booted in the cloud (ec2 and other cloud providers) are typically generic disk images that are then customized for a user or workload first boot. In previous releases, the ubuntu images have allowed customization to occur by running a user provided script very late in the startup sequence (S99 in sysvinit).

The previous solution was generally functional. However, due to the fact that the customization hook took place very late in boot, there were some things that were difficult or impossible to change without a reboot.

Release Note

UEC Images are now much more customizable at boot time. By passing correctly formed user-data to an image, the user can affect all but the most earliest portions of the boot sequence. This includes customizing services before they have started or inserting upstart jobs.

Rationale

Cloud images are customized 2 ways:

There is a large cost to re-bundling of an image. It is essentially a fork of its parent, and as such maintenance becomes the burden of the new owner. With boot time configuration, the customization is much more detached from the image itself and can easily be moved from one image to another to pick up updates.

As such, we want to make the ubuntu images as usable as possible, addressing the advantages of re-bundling. Those primary advantages are:

It is unlikely that we can remove the faster boot time of a rebundled boot image, but by exposing earlier portions of the boot sequence to influence by a user on first-boot, we can allow the user customize on first boot whatever they would have done in a re-bundling phase.

User stories

Assumptions

Design

An upstart job will be installed by the ec2-init package that runs as early as possible in the boot sequence. This job will look for user-data (more generically "user input") in a number of places. Upon finding it, it will save the data off, and possibly act on the data.

Implementation

Development Branch

Development is taking place at lp:~smoser/ec2-init/ec2-init.devel

Files / Directories

Migration

The usage of user-data will be backwards compatible with previous ubuntu EC2 images. Primarily, that means the following:

Test/Demo Plan

TODO This need not be added or completed until the specification is nearing beta.

Unresolved issues

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

BoF agenda and discussion

things would like to support

  + init
    |
    udev
      +- found eth0 +- ifup eth0 +------------------------------------ "net-device-up IFACE=eth0"
      +- found sda1 +- mount sda1 +- "mount MOUNTPOINT=/" --------------+- X

      then you could do, e.g. exec initctl emit ec2-boot-hook
      (after putting things in /etc/init)
      
      and:
      
      start on ec2-boot-hook
      script
        .. do lots of work ..
      end script

                start on (mount MOUNTPOINT=/
                          and net-device-up IFACE=eth0)
                task
                script
                  .. download data, write to /etc/init, etc.
                  
                  initctl emit ec2-boot-hook
                end script

Format

specify another place to get the mutlipart configuration

Questions


CategorySpec

ServerLucidCloudBoothooks (last edited 2010-01-07 13:43:29 by d14-69-66-169)