Ask Your Question

create server via OpenStack API with keypair

asked 2012-11-04 17:15:57 -0500

dimas-zakky gravatar image

how to create instance with a keypair injected ??

{ "server" : { "name" : "new-server-test", "imageRef" : "", "flavorRef" : "52415800-8b69-11e0-9b19-734f1195ff37", "metadata" : { "My Server Name" : "Apache1" }, "personality" : [ { "path" : "/etc/banner.txt", "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp dCBtb3ZlcyBpbiBqdXN0IHN1Y2ggYSBkaXJlY3Rpb24gYW5k IGF0IHN1Y2ggYSBzcGVlZC4uLkl0IGZlZWxzIGFuIGltcHVs c2lvbi4uLnRoaXMgaXMgdGhlIHBsYWNlIHRvIGdvIG5vdy4g QnV0IHRoZSBza3kga25vd3MgdGhlIHJlYXNvbnMgYW5kIHRo ZSBwYXR0ZXJucyBiZWhpbmQgYWxsIGNsb3VkcywgYW5kIHlv dSB3aWxsIGtub3csIHRvbywgd2hlbiB5b3UgbGlmdCB5b3Vy c2VsZiBoaWdoIGVub3VnaCB0byBzZWUgYmV5b25kIGhvcml6 b25zLiINCg0KLVJpY2hhcmQgQmFjaA==" } ] } }

on that data, what is metadata ?? is that the name of keypair?? and what is personality ?? what is contents ??

thanks for advice

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2012-11-06 07:38:17 -0500

koolhead17 gravatar image


The metadata insertion in image is done using cloud-init. Checking up will help

edit flag offensive delete link more

answered 2014-08-14 10:04:01 -0500

orangeiv gravatar image

you can use key_name to inject ssh key in API document even if this properties didn't explain by API document.


body: {"server": { "name": "lb_key-name", "imageRef": "82557921-9b87-4776-a556-6e6ced3e739c", "availability_zone": "nova", "key_name": "default", "flavorRef": "06560b3c-7d4b-46bb-ad73-637cfee39ee8", "OS-DCF:diskConfig": "AUTO", "max_count": 1, "min_count": 1, "networks": [{"uuid": "e6140731-f5a9-41c9-912f-6e28166ba5e6"}], "security_groups": [{"name": "default"}] } }

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2012-11-04 17:15:57 -0500

Seen: 358 times

Last updated: Nov 06 '12