[ec2-beta] feature request: user-data scripts
Jeff Koftinoff
jeffk at jdkoftinoff.com
Wed Mar 11 02:30:00 GMT 2009
On 2009-Mar-10, at 4:15 PM, Keary Griffin wrote:
> I know this is a little late in the game for this release, but maybe
> for
> the future, one of things I really liked about the Eric's alestic
> Ubuntu
> images was the ability for the image to launch a script supplied in
> the
> ec2 user-data on first boot.
>
> This allows people to launch the AMI's as-is without needing to
> rebundle, and use the user-data supplied script to customize the image
> on boot.
>
> I've seen a bunch of talk on this list lately about the pros and
> cons of
> rebundling/not rebundling the AMI's. I usually rebundle my AMI's
> (because without a feature like the above it's a necessity), but
> find it
> time-consuming and would rather skip this step. Being able to
> specify a
> script to launch on first-boot would allow me to skip this step.
>
> And if this functionality is already there and I missed it, I'll
> apologize in advance.
>
I personally like doing this with all my AMI's - then I can use the
same AMI for multiple purposes and easily start a cluster of machines
each doing different roles from the same AMI. One modification I've
done is to have the user-data just contain a URL of a script living in
S3. Upon boot, the machine reads the s3 resource and executes it as a
script. This allows more advanced scripts on bootup like 'aptitude
update && aptitude safe-upgrade && aptitude install my-special-server-
for-this-role' etc
jeffk at jdkoftinoff.com
More information about the Ec2-beta
mailing list