euca-run-instances -d option

Asked by Mark Libucha

Does OpenStack support the euca-run-instances -d option for passing instance-specific metadata? If so, are there OpenStack examples available somewhere? If not, is it in the roadmap? Thanks.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
Mark Libucha
Solved:
Last query:
Last reply:
Revision history for this message
Vish Ishaya (vishvananda) said :
#1

yes, it is called userdata, and nova supports it in VlanNetworking and FlatDHCPNetworking modes. The data is available to the instance at
http://169.254.169.254/latest/user-data/

On Feb 28, 2011, at 10:04 AM, Mark Libucha wrote:

> New question #147258 on OpenStack Compute (nova):
> https://answers.launchpad.net/nova/+question/147258
>
> Does OpenStack support the euca-run-instances -d option for passing instance-specific metadata? If so, are there OpenStack examples available somewhere? If not, is it in the roadmap? Thanks.
>
> --
> You received this question notification because you are a member of Nova
> Core, which is an answer contact for OpenStack Compute (nova).

Revision history for this message
Mark Libucha (mlibucha) said :
#2

Thanks, Vish. (Delayed response). Does OpenStack also support euca-run-instances -f/--user-data-file ? It doesn't appear to...or I'm doing something wrong.

Revision history for this message
Mark Libucha (mlibucha) said :
#3

In nova-api.log, I do see the user data being passed when I use -f myfile:

UserData=IyEvYmluL2Jhc2gKI3NldCAtZSAteAp0b3VjaCAvdG1wL2hpdGhlcmUKZWNobyAicnVubmluZyB1c2VyIGRhdGEgZmlsZSEiCg%3D%3D

But the file doesn't appear to be being run. Is there a way to debug this?

Thanks...

Revision history for this message
Mark Libucha (mlibucha) said :
#4

So, I see that contents of my file is getting passed, and is available to me in the instance:

-bash-3.2# curl http://169.254.169.254/latest/user-data
#!/bin/bash
#set -e -x
touch /tmp/hithere
echo "running user data file!"

So, what is it in the instance that typically runs this file? Is it something I need to add to my image? Just trying to figure out how this magic works.

Revision history for this message
Mark Libucha (mlibucha) said :
#5