Startup hooks for EC2/UEC images
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-
[1] https:/
Blueprint information
- Status:
- Complete
- Approver:
- Jos Boumans
- Priority:
- High
- Drafter:
- Scott Moser
- Direction:
- Approved
- Assignee:
- Scott Moser
- Definition:
- Approved
- Series goal:
- Accepted for lucid
- Implementation:
-
Implemented
- Milestone target:
-
lucid-alpha-3
- Started by
- Thierry Carrez
- Completed by
- Steve Langasek
Whiteboard
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.
Status:
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/
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/
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