Startup hooks for EC2/UEC images

Registered by Scott Moser on 2009-11-09

Currently ec2-init allows for the user to feed 'user-data' to an instance. User-data that begins with '#!' is executed at S99. Running so late in the boot process means that the user is unable to customize (without reboot) portions that have already occurred when the script is run. A more general approach could be designed that would allow the user to control all parts of boot. This could then be used by ec2-init itself, to provide:
- conf-file based (rather than script base) instance configuration
- root on EBS from user-data
- ssh private keys provided in user-data

Note: this differs from server-lucid-ec2-config [1]. This blueprint provides would provide a very generic and early hook into the images that could support [1].


Blueprint information

Jos Boumans
Scott Moser
Scott Moser
Series goal:
Accepted for lucid
Milestone target:
milestone icon lucid-alpha-3
Started by
Thierry Carrez on 2010-01-11
Completed by
Steve Langasek on 2010-05-26



Secondary Engineer: Mathiaz

mdz review 2009-11-30: Needs to document the user data format
 | [sm] user-data format documented as single-file or mime-multipart

ttx review 2009-12-01: Looks good to me now.

mdz review 2009-12-01: how will the type of the file be established in single-file mode?
 | [sm] for "simple" (single-file) mode, the 2 things we want to support are "config" format and "#!" format. It will check to see if it is #!, if not, check if it is "config" haphazardly. If neither, fall through untouched.

All completed.

Work items for lucid-alpha-2:
get initial upstart job running early as possible: DONE
formalize where user data is saved on disk: DONE
support crawling ec2 meta data service (for local save): DONE
support booting under kvm directly (mountpoints/fstab): DONE
support booting under kvm directly (pass user-data): DONE
support "include" in user data (extended user data): DONE
support "execute content via an interpreter": DONE
support "install upstart job": DONE
cleanup and package new development: DONE

Work items for lucid-alpha-3:
formalize accepted input formats (doc/userdata.txt): DONE
document input formats (doc/examples): DONE
(sprint) discuss upstart/run-early/block: DONE
support removing access to ec2-meta data service: DONE
support "add a plugin" (which could then operate on data): DONE
support "install pre-generated ssh keys": DONE
Run earlier in the boot process (was blocked by bug 504883): DONE


Work Items