1 heat_template_version: 2014-10-16
15 # Require this so we can validate the parent passes the
29 type: comma_delimited_list
34 software_config_transport:
35 default: POLL_SERVER_CFN
39 description: Optional scheduler hints to pass to nova
43 # We just need something which returns a unique ID, but we can't
44 # use RandomString because RefId returns the value, not the physical
45 # resource ID, SoftwareConfig should work as it returns a UUID
47 type: OS::TripleO::DeployedServerConfig
49 user_data_format: SOFTWARE_CONFIG
52 type: OS::Heat::StructuredConfig
54 group: os-apply-config
56 instance-id: {get_attr: [deployed-server, "OS::stack_id"]}
59 type: OS::Heat::StructuredDeployment
61 config: {get_resource: InstanceIdConfig}
62 server: {get_resource: deployed-server}
65 type: OS::Heat::SoftwareConfig
71 mkdir -p $heat_outputs_path
72 host=$(hostnamectl --static)
73 echo -n "$host " > $heat_outputs_path.hosts_entry
74 host_ip=$(python -c "import socket; print socket.gethostbyname(\"$host\")")
75 echo -n "$host_ip " >> $heat_outputs_path.hosts_entry
76 echo >> $heat_outputs_path.hosts_entry
77 cat $heat_outputs_path.hosts_entry
78 echo -n $host_ip > $heat_outputs_path.ip_address
79 cat $heat_outputs_path.ip_address
80 echo -n $host > $heat_outputs_path.hostname
81 cat $heat_outputs_path.hostname
84 description: hosts_entry
86 description: ip_address
91 type: OS::Heat::SoftwareDeployment
93 config: {get_resource: HostsEntryConfig}
94 server: {get_resource: deployed-server}
97 type: OS::TripleO::DeployedServer::ControlPlanePort
99 Hostname: {get_attr: [HostsEntryDeployment, hostname]}
102 # FIXME(shardy) this is needed because TemplateResource returns an
103 # ARN not a UUID, which overflows the Deployment server_id column..
105 value: {get_attr: [deployed-server, "OS::stack_id"]}
109 - {get_attr: [ControlPlanePort, ip_address]}
111 value: {get_attr: [HostsEntryDeployment, hostname]}
113 value: {get_attr: [HostsEntryDeployment, hosts_entry]}
115 value: {get_attr: [HostsEntryDeployment, ip_address]}