Trying to use packer to maintain our Linux OpenStack images. We use cloud-init to lay down base configurations at deploy time and would like to move this process to a lower level and do it during image creation.
As you can see below I am referencing an external file that has instructions for cloud-init. This same methodology works perfectly in our Heat templates, however, in Heat we also have user_data_format set to RAW, which is NOT the default for OpenStack and not an acceptable parameter for packer.
When using Packer the entire #cloud-config section is being ignored.
Is there a better way to pass cloud-init instructions during the image creation process?
packer config .json contents
{
"builders": [{
"type": "openstack",
"ssh_username": "centos",
"image_name": "cent7-cloudinit",
"source_image": "a4331a95-6741-4161-85a5-4e322c2a69bf",
"flavor": "m1.small",
"username": "",
"password": "",
"domain_name": "Default",
"region": "RegionOne",
"image_visibility": "public",
"networks": "78c8405e-e43c-46d1-b646-f513bf85eb9f",
"floating_ip_network": "external_network",
"user_data_file": "base.sh"
}]
}