Hello,

nova-api-metada service is an optional nova daemon that implements an HTTP
interface for retrieving metadata you associate to an instance at boot time
(see --user-data parameter).

Provided that you have installed and correctly configured it, try the
following sequence for better understanding.

Hope it helps,
Marco.


*At the client console, create a file and launch an instance with the
following commands:*
* *

*
*

*$ echo 'This is user data!' > myFile.txt*

*$ nova boot testUserData --image=19d24df6-be35-40fe-b61d-8cf381abf1f7
--flavor=1  --user-data myFile.txt*

+-------------------------------------+--------------------------------------+

| Property                            | Value
|

+-------------------------------------+--------------------------------------+

| OS-DCF:diskConfig                   | MANUAL
|

| OS-EXT-SRV-ATTR:host                | None
                         |

| OS-EXT-SRV-ATTR:hypervisor_hostname | None
|

| OS-EXT-SRV-ATTR:instance_name       | instance-0000011c
|

| OS-EXT-STS:power_state              | 0
      |

| OS-EXT-STS:task_state               | scheduling
|

| OS-EXT-STS:vm_state                 | building
|

| accessIPv4                          |
|

| accessIPv6                          |
|

| adminPass                           | rXQ37SMMmu7D
|

| config_drive                        |
|

| created                             | 2012-11-14T17:11:47Z
|

| flavor                              | m1.tiny
|

| hostId                              |
|

| id                                  |
f87e825b-e31f-4918-89ca-0fab3645cf44 |

| image                               | cirros-0.3.0-x86_64-uec
|

| key_name                            | None
|

| metadata                            | {}
         |

| name                                | testUserData
|

| progress                            | 0
|

| security_groups                     | [{u'name': u'default'}]
|

| status                              | BUILD
|

| tenant_id                           | 43b38bc900c14082a14cda212c324f0a
|

| updated                             | 2012-11-14T17:11:47Z
|

| user_id                             | d3e8a1682a064f01ba80c45c28e6af6e
|

+-------------------------------------+--------------------------------------+



*To retrieve the information from the metadata service, connect to the
instance and submit the following commands:*
* *

*
*

*$ wget http://169.254.169.254/latest/user-data -O-*

Connecting to 169.254.169.254 (169.254.169.254:80)

This is user data!

-                    100%
|************************************************************************************************************|
19  --:--:-- ETA



*Note: the command for retrieving data from the metadata service may vary
both in the address of the service (here we used the default configuration
address 169.254.169.254) and in the format of the wget command (depending
on the OS of the image).*
* *







On Tue, Dec 11, 2012 at 7:29 AM, Matt Joyce <[email protected]>wrote:

> It is not a necessity, but it is very useful.  Also look at config drive.
>
> -Matt
>
> On Mon, Dec 10, 2012 at 5:33 PM, Joshua Harlow <[email protected]>wrote:
>
>> Its really just a binary that activates
>> https://github.com/openstack/nova/blob/master/nova/api/metadata/handler.py#L100
>>
>> Its a way to allow for a VM to get metadata about itself and any userdata
>> (of which users may have provided) on boot.
>>
>> Said feature is not just connected to ec2, but provides a generic
>> mechanism for getting this type of data to an instance.
>>
>> The ec2 folks I believe are just the 'originators' of said concept and
>> that’s how it got named initially.
>>
>> From: JuanFra Rodriguez Cardoso <[email protected]>
>> Date: Monday, December 10, 2012 5:10 PM
>> To: Openstack <[email protected]>
>> Subject: [Openstack] Nova metadata service
>>
>> Hi guys!
>>
>> After looking for in the mailing list and docs, I honestly still don't
>> understand what really is nova-api-metadata.
>> it's a mandatory service in a multi-host deployment? it's only related to
>> EC2?
>>
>> Thanks!
>>
>> Regards,
>> JuanFra.
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to     : [email protected]
>> Unsubscribe : https://launchpad.net/~openstack
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to     : [email protected]
> Unsubscribe : https://launchpad.net/~openstack
> More help   : https://help.launchpad.net/ListHelp
>
>
_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp

Reply via email to