[ubuntu-cloud] RFC: server-lucid-ec2-config: user-data configuration file

Mathias Gug mathias.gug at canonical.com
Thu Dec 24 11:59:53 GMT 2009

Hi Eric,

On Mon, Dec 21, 2009 at 10:46:23AM -0800, Eric Hammond wrote:
> Regarding this snippet in the sample config file:
>   # Update apt database on first boot
>   # (ie run apt-get update)
>   # Default: true
>   apt_update: false
> I understand and support the desire to make things easy for new users,
> but would suggest that it is also important to let advanced users
> configure their new instances quickly and not get in their way.

It seems that running apt-get update is an action that needs to be done on
*every* first boot. Thus it seems like a good candidate for defaulting to true,
with an option to not be done.
> Here's a sample scenario:
>   user-data script changes apt sources to a different repository,
>   includes multiverse, and/or adds a PPA.  user-data script then
>   runs apt-get update itself and starts installing software.
> If apt-get update is run automatically before this starts, then the
> user-data script has to figure out how to wait for the (useless) update
> to complete, making the code more complex and delaying the startup of
> the instance. 

Upstart dependencies could be used to make sure that the user-data script runs
only when the apt-get update job has finished.

> This also places a startup dependency on the existing apt
> mirrors which I sometimes do not wish to have in my instances.

I'm not sure I fully understand what you mean here. If existing apt mirrors are
removed from the sources.list (in the case of a customized instance), apt-get
update will not fetched them.

Could you elaborate on the use case you refer to here?
> If the apt-get update were to default to false, then the new config file
> approach can easily switch it to true, not breaking the way that it
> currently works.

To me it looks like we would just delay the instance boot. Considering that the
default mirrors used by the base AMIs are located in the relevant EC2 zone, I'm
not sure how long we would delay the boot process.

Mathias Gug
Ubuntu Developer  http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-cloud/attachments/20091224/a43f45f1/attachment.pgp 

More information about the Ubuntu-cloud mailing list