[SOLVED] heat-templates cloud-init does not work
by czezz from LinuxQuestions.org on (#5A85M)
Im struggling to execute cloud-init during VM instantiation (one time execution of tasks during the first boot/instantiation)
In following example I just want to create /tmp/one file with content: "Test".
What I am doing wrong?
Instance VM1 comes up but there is no file /tmp/one
Code:resources:
one_init:
type: OS::Heat::CloudConfig
properties:
cloud_config:
write_files:
- path: /tmp/one
content: "Test"
VM-1_port1:
{cut off for better overview}
VM-1:
type: OS::Nova::Server
properties:
config_drive: "true"
name: { get_param: VM_nodename1 }
flavor: { get_param: VM_flavor }
image: { get_param: VM_image }
availability_zone: { get_param: VM_availability_zone }
networks:
- port: { get_resource: VM-1_port1 }
user_data_format: RAW
user_data:
get_resource: one_init


In following example I just want to create /tmp/one file with content: "Test".
What I am doing wrong?
Instance VM1 comes up but there is no file /tmp/one
Code:resources:
one_init:
type: OS::Heat::CloudConfig
properties:
cloud_config:
write_files:
- path: /tmp/one
content: "Test"
VM-1_port1:
{cut off for better overview}
VM-1:
type: OS::Nova::Server
properties:
config_drive: "true"
name: { get_param: VM_nodename1 }
flavor: { get_param: VM_flavor }
image: { get_param: VM_image }
availability_zone: { get_param: VM_availability_zone }
networks:
- port: { get_resource: VM-1_port1 }
user_data_format: RAW
user_data:
get_resource: one_init