You are not logged in.
I am trying to build Arch linux cloud image. I am in the last stages (to get cloud init working). My intention is to configure cloud init to download the access-keys and put them in authorised keys of a user that I created (arch).
The problem is that cloud-init seems to be trying to fetch the keys from the instance's default gateway rather than the magic ip 169.254.169.254.
I am not sure if this is a bug or I am missing some configuration. Can anyone guide me. Once the image is ready I am planning to document the process for future users.
Last edited by Akilesh1597 (2014-09-29 13:50:40)
Offline
After some googling I found the missing pieces.
The default config file distributed by the package '/etc/cloud/cloud.cfg' lacks the 'datasource_list' key. I managed to pull the configuration from an ubuntu image that worked.
<code>
datasource_list: [ NoCloud, ConfigDrive, OpenNebula, Azure, AltCloud, OVF, MAAS, GCE, OpenStack, CloudSigma, Ec2, CloudStack, None ]
</code>
Then you have to tell cloud-init to use the default user configured under 'system_info' section
<code>
users:
- default
</code>
Finally under 'system_info' you have to provide which helper module(distro specific python module) to use for provisioning and the user that would be initialised(with ~.ssh/authorized_keys file) with the keys that you have selected while boot.
<code>
system_info:
distro: arch
default_user:
name: arch
lock_passwd: True
gecos: Arch
groups: [adm, audio, cdrom, dialout, dip, floppy, netdev, plugdev, sudo, video]
sudo: ["ALL=(ALL) NOPASSWD:ALL"]
shell: /bin/bash
# Other config here will be given to the distro class and/or path classes
paths:
cloud_dir: /var/lib/cloud/
templates_dir: /etc/cloud/templates/
ssh_svcname: sshd
</cloud>
Offline