[Openstack] Heat Autoscaling and Instance Names

Paul Seymour Paul.Seymour at ig.com
Thu Jul 9 12:41:13 UTC 2015


Hello,

Is it possible to create a heat template with Autoscaling groups with named instances so they can have a prefix and then suffixed with an incrementing id/number ?

I have looked at the various examples out there and nothing leaps out I have tried it with

hosts:
    depends_on: external_router_interface
    type: OS::Heat::AutoScalingGroup
    properties:
      desired_capacity: {get_param: node_count}
      cooldown: 60
      min_size: 0
      max_size: 100
      resource:
        type: host.yaml
        properties:
          image: {get_param: server_image}
          flavor: {get_param: flavor}
          key_name: {get_param: ssh_key_name}
          external_network: {get_param: external_network}
          fixed_network: {get_resource: fixed_network}
          fixed_subnet: {get_resource: fixed_subnet}

With this being called as host.yaml:-
resources:
  indexed_group:
    type: OS::Heat::ResourceGroup
    properties:
      index_var: suffix
      resource_def:
        type: OS::Nova::Server
        properties:
          name: instanceprefix_suffix
          image: {get_param: image}
          flavor: {get_param: flavor}
          key_name: {get_param: key_name}
          networks:
            - port: {get_resource: port}
          admin_user: cloud-user
          user_data_format: RAW

But this creates with the same instance name.

Thanks
Paul
The information contained in this email is strictly confidential and for the use of the addressee only, unless otherwise indicated. If you are not the intended recipient, please do not read, copy, use or disclose to others this message or any attachment. Please also notify the sender by replying to this email or by telephone (+44(020 7896 0011) and then delete the email and any copies of it. Opinions, conclusion (etc) that do not relate to the official business of this company shall be understood as neither given nor endorsed by it. IG is a trading name of IG Markets Limited (a company registered in England and Wales, company number 04008957) and IG Index Limited (a company registered in England and Wales, company number 01190902). Registered address at Cannon Bridge House, 25 Dowgate Hill, London EC4R 2YA. Both IG Markets Limited (register number 195355) and IG Index Limited (register number 114059) are authorised and regulated by the Financial Conduct Authority.




More information about the Openstack mailing list