diff --git a/elements/cloud-init-nocloud/README.md b/elements/cloud-init-nocloud/README.md index 02108557e..0223c4eb2 100644 --- a/elements/cloud-init-nocloud/README.md +++ b/elements/cloud-init-nocloud/README.md @@ -1,3 +1,6 @@ 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. + +Empty on-disk sources are created in /var/lib/cloud/seed/nocloud/. + diff --git a/elements/cloud-init-nocloud/install.d/05-inject-local-source-data b/elements/cloud-init-nocloud/install.d/05-inject-local-source-data new file mode 100755 index 000000000..470b1da86 --- /dev/null +++ b/elements/cloud-init-nocloud/install.d/05-inject-local-source-data @@ -0,0 +1,8 @@ +#!/bin/bash + +# without these files, cloud-init will not perform stock operations such as +# generating sshd hostkeys. + +mkdir -p /var/lib/cloud/seed/nocloud +touch /var/lib/cloud/seed/nocloud/user-data +touch /var/lib/cloud/seed/nocloud/meta-data diff --git a/elements/ubuntu/first-boot.d/01-ssh b/elements/ubuntu/first-boot.d/01-ssh deleted file mode 100755 index 08f52c74b..000000000 --- a/elements/ubuntu/first-boot.d/01-ssh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# NOTE: this file should be removed once cloud-init is properly generating hostkeys -# https://bugs.launchpad.net/diskimage-builder/+bug/1124593 -dpkg-reconfigure openssh-server