[Openstack] Heat Autoscaling and Instance Names

Angus Salkeld asalkeld at mirantis.com
Fri Jul 10 00:14:31 UTC 2015


On Thu, Jul 9, 2015 at 10:41 PM, Paul Seymour <Paul.Seymour at ig.com> wrote:

> 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 ?
>

Only with ResouceGroups.


>
> 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
>

This should work, try with the default index_var "%index%"
if it is still not working for you please raise a bug.
(https://bugs.launchpad.net/heat)


>           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.
>
> _______________________________________________
> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20150710/b33463e6/attachment.html>


More information about the Openstack mailing list