Revision history [back]

click to hide/show revision 1
initial version

In Icehouse I have used the following with success:

heat_template_version: 2013-05-23
parameters:
  node_hostname:
    type: string
  image:
    type: string
  flavor:
    type: string
  keypair:
    type: string
  private_net:
    type: string
  floating_net:
    type: string
resources:
  theNode:
    type: OS::Nova::Server
    properties:
      name: {get_param: node_hostname}
      key_name: {get_param: keypair}
      image: {get_param: image}
      flavor: {get_param: flavor}
      networks:
        - port : { get_resource: node_server_port }
      user_data:
        str_replace:
          template:  |
            #!/bin/sh
            echo MYIP `uname -n` >> /etc/hosts
          params:
            MYIP : {get_attr: [node_server_port, fixed_ips, 0, ip_address]}
  node_server_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_param: private_net}
  node_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
       floating_network_id: {get_param: floating_net}
       port_id: { get_resource: node_server_port }