peterknife / boto

Automatically exported from code.google.com/p/boto
0 stars 0 forks source link

Enhancement: Would like the ability to pass a user-data-file when starting up an instance #439

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I'm provisioning multiple EC2 nodes. Instead of making a new AMI, I want to run 
a startup script after the instance has booted. This can be done from the 
command line with the --user-data-file option

http://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference/index.html?
ApiReference-cmd-RunInstances.html

A number of standard AMIs already take this info and then run the script after 
boot. See the following

http://alestic.com/2009/06/ec2-user-data-scripts

So what I would like in an additional option on connection.run_instances() to 
do the equivalent of --user-data-file

What is the expected output? What do you see instead?
Pass a data file through to the startup on the instance

What version of the product are you using? On what operating system?
2.0b2

Please provide any additional information below.
I've tried to think of alternatives (e.g. SCP etc.) which would work, but the 
support of the --user-data-file is the most elegant. It means that I can can 
the script very easily and use off thr shelf AMI's rather than make a custom 
one. Essentially my custom script can then install any packagers or other 
software needed on the vanilla AMI.

Original issue reported on code.google.com by alvin.ri...@mac.com on 21 Aug 2010 at 9:16

GoogleCodeExporter commented 9 years ago
Well, you can currently pass user_data via the run_instances method but it 
wants a string so you would have to open the file, read it's contents and then 
pass it to the function.

I could add another parameter that accepts a path to a file.

Original comment by Mitch.Ga...@gmail.com on 22 Aug 2010 at 12:34

GoogleCodeExporter commented 9 years ago
is this going to be implemented?

Original comment by rse...@gmail.com on 16 Aug 2014 at 6:25