openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #17134
Re: File Injection through Horizon
Hi Srikanth,
File Injection is not available through Horizon.
Atul is describing a different feature that can be used to achieve similar
results. The contents of "User-Data" will be accessible to the instance via
"http://169.254.169.254/latest/user-data" - Ubuntu ships with a tool called
cloud-init that makes use of this data if available.
Eg One of the simple use cases for cloud-init is, if the data starts with
"#!", it will assume it's a shell script and download + execute it. This
can, in a roundabout way, be used to achieve similar results to the file
injection feature.
Thanks,
Kiall
On Wed, Oct 3, 2012 at 12:59 PM, Srikanth Kumar Lingala <
srikanthkumar.lingala@xxxxxxxxx> wrote:
> Hi,
> I am able to create an instance with the following command (along with
> File Injection):
> *
> *
> *#> nova boot --file /root/inject.txt=/root/inject.txt --flavor=1
> --image=4671e99b-1c01-42e8-94d6-2405a59bab57 testserver1*
> *
> *
> Now, what I need is to do the same from the Horizon. I will select a file
> to inject from Horizon and Launch the Instance, it should inject that file.
>
> Regards,
> Srikanth.
>
>
> On Wed, Oct 3, 2012 at 4:18 PM, Atul Jha <Atul.Jha@xxxxxxxxxxx> wrote:
>
>> Hi,
>>
>> The test step followed for user-data as follows.
>>
>> 1. Got image from
>> http://cloud-images.ubuntu.com/precise/current/precise-server-cloudimg-i386-disk1.img
>>
>> 2. Booted it from Horizon and passed the script in the file
>>
>> #!/bin/sh
>> mkdir /home/ubuntu/testdir
>>
>> 3. Logged in to the machine with
>>
>> ssh -i <mykey.pub> ubuntu@IP
>>
>> And i can see the directory created.
>>
>>
>> File injection via Horizon uses cloud-init and i have tested it on Ubuntu
>> 12.04 i have no idea about other distributions.
>>
>> You can file more about cloud-init here :-
>> https://help.ubuntu.com/community/CloudInit
>>
>> And thanks, i will add this in the doc somewhere. :)
>>
>> Hope it helps.
>>
>>
>> Atul jha
>>
>> ________________________________________
>> From: Shake Chen [shake.chen@xxxxxxxxx]
>> Sent: Wednesday, October 03, 2012 2:28 PM
>> To: Srikanth Kumar Lingala
>> Cc: Atul Jha; openstack@xxxxxxxxxxxxxxxxxxx
>> Subject: Re: [Openstack] File Injection through Horizon
>>
>> I also have same question.
>>
>> can you give us example. how to injection throuth Horizon?
>>
>>
>>
>> On Wed, Oct 3, 2012 at 3:24 PM, Srikanth Kumar Lingala <
>> srikanthkumar.lingala@xxxxxxxxx<mailto:srikanthkumar.lingala@xxxxxxxxx>>
>> wrote:
>> Hi Atul,
>> Can you please guide me how to do File Injection through Horizon?
>>
>> Regards,
>> Srikanth.
>>
>> On Wed, Oct 3, 2012 at 12:41 PM, Atul Jha <Atul.Jha@xxxxxxxxxxx<mailto:
>> Atul.Jha@xxxxxxxxxxx>> wrote:
>> Hi,
>> <snip>
>> I have some doubts regarding File Injection.
>> Can File Injection can be done through Horizon, while creating an
>> Instance?
>> While creating an Instance from Horizon, a field called 'User Data' [text
>> area] is there. Is that field is related to File Injection? Can anyone tell
>> me, the values we need to give for 'User Data'?
>> </snip>
>> Yes.
>>
>>
>> Cheers!!
>>
>> Atul Jha
>> http://www.csscorp.com/common/email-disclaimer.php
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~openstack
>> Post to : openstack@xxxxxxxxxxxxxxxxxxx<mailto:
>> openstack@xxxxxxxxxxxxxxxxxxx>
>> Unsubscribe : https://launchpad.net/~openstack
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>>
>>
>> --
>> Shake Chen
>>
>> http://www.csscorp.com/common/email-disclaimer.php
>>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~openstack
> Post to : openstack@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~openstack
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References