cloud-init-nocloud element for non-cloud image

Disables cloud-init from querying EC2 metadata, or any cloud metadata
service. It keeps only the Nocloud and None data sources, which are both
expected to be "baked in" to an image.  This speeds up boot by 2 minutes
on hosts where cloud-init cannot reach the EC2 metadata service.

Change-Id: I43522c4a442c0f2fc2044d4898768ceb4f839099
This commit is contained in:
Clint Byrum 2013-02-04 21:54:48 -08:00
parent d9cc434fa0
commit f3dc4c9380
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Configures cloud-init to only use on-disk metadata/userdata sources. This
will avoid a boot delay of 2 minutes while polling for cloud data sources
such as the EC2 metadata service.

View File

@ -0,0 +1,6 @@
#!/bin/bash
printf "%s\t%s\t%s\t%s\n" \
cloud-init cloud-init/datasources multiselect "NoCloud, None" | \
debconf-set-selections
DEBIAN_FRONTEND=noninteractive dpkg-reconfigure cloud-init