openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #25499
Re: Image prep. cloud-init user configuration help.
I had issues with "per-once", but I we also were resetting OpenStack going from Essex to Folsom at the time. The instance ids may have overlapped. I'm not sure I could recreate it.
My biggest headache at the time was running Gluster inside the instance. You can't keep the /var/lib/glusterd? directory on the image because the app sets a 'unique' id at install time.
Regardless, it is a good idea not to leave stale state around if you are handing out images.
The nova image-create <uuid> command gets users into trouble because of install-time assumptions made by applications.
I've been following diskimage-builder that is part of TripleO, but haven't tried to use it yet.
https://github.com/stackforge/diskimage-builder
Brian
On Jul 26, 2013, at 9:36 AM, Scott Moser <smoser@xxxxxxxxxx> wrote:
> On Thu, 25 Jul 2013, Brian Schott wrote:
>
>> When you bundle the image, make sure you remove the /var/lib/cloud
>> directory. It contains lock files and a local cache from the first time
>> it was run.
>
> This is not actually necessary.
> cloud-init runs some things "per-instance", and other things "per-boot".
>
> The per-instance is handled using the instance-id as a marker. So, unless
> you hit an instance-id (uuid) collision there is no need to specifically
> clear out /var/lib/cloud. If you have some other reason that you think
> this needs to be done, please open a bug on cloud-init.
>
> Scott
>
>>
>> -------------------------------------------------
>> Brian Schott, CTO
>> Nimbis Services, Inc.
>> brian.schott@xxxxxxxxxxxxxxxxxx
>> ph: 443-274-6064 fx: 443-274-6060
>>
>>
>>
>> On Jul 24, 2013, at 11:00 PM, "Jake G." <dj_dark_junglist@xxxxxxxxx> wrote:
>>
>>> Thanks Scott!
>>>
>>> I have removed cloud-init from my instance and enabled config-drive in the nova.conf file.
>>>
>>> Anything else I should take notice of?
>>>
>>> From: Scott Moser <smoser@xxxxxxxxxx>
>>> To: Jake G. <dj_dark_junglist@xxxxxxxxx>
>>> Cc: Dean Troyer <dtroyer@xxxxxxxxx>; "openstack@xxxxxxxxxxxxxxxxxxx" <openstack@xxxxxxxxxxxxxxxxxxx>
>>> Sent: Thursday, July 25, 2013 10:58 AM
>>> Subject: Re: [Openstack] Image prep. cloud-init user configuration help.
>>>
>>> On Wed, 24 Jul 2013, Jake G. wrote:
>>>
>>>> I got the user correct now I am wondering why this is nessasary for my environment.
>>>> I am not using Amazon EC2 services so why would I need to get metadata from there API?
>>>>
>>>> Can someone explain?
>>>
>>> Cloud-init uses the "datasource" of the EC2 Metadata service, that
>>> Openstack provides a workalike for.
>>> That metadata service has things like "instance-id" and "hostname" that
>>> are useful. cloud-init uses instance-id for "run-once-per-instance"
>>> functionality.
>>>
>>> cloud-init also gets user-data from the datasource, and that is very
>>> useful for initializing images with information provided at launch time by
>>> the user.
>>>
>>> If you enable config-drive in openstack, then cloud-init will find the
>>> same data above from the config-drive, and wont bother looking for the ec2
>>> metadata service.
>>>
>>> Scott
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~openstack
>>> Post to : openstack@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~openstack
>>> More help : https://help.launchpad.net/ListHelp
>>
>>
References