Add new server instance to existing load balancer pool in heat stack

asked 2014-12-11 11:20:06 -0600

Prabu gravatar image

We have a requirement for which we create new webservers/appservers on demand basis using heat temple and the newly created webservers should be added to the existing loadbalancer member pool. Can anyone suggest us how to do it in heat template.

We did take a look at the OS::Neutron:::LoadBalancer resource, but did not find any way to add members to existing member pool.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-12-14 12:22:06 -0600

cmyster gravatar image

updated 2014-12-14 12:23:38 -0600

Hi, Taking this template as an example: The resource in that template apart from the obvious OS::Nova::Server is OS::Neutron::PoolMember. This type is making the connection between a load balancer pool and a server address. If you look at lines 34-35 there is an attribute called pool_id that configures which load balancer pool to be used by this member and the other attribute is the address that is being taken from the server itself.

This template is a nested template that is being used by . The 'call' to the nested template is at line 68. The broader example these two templates make is creating a load balanced WordPress group (AutoScalingGroup) that share a single DB. The scaling is being governed by Heat's ScalingPolicy with the use of Ceilometer alarms. Perhaps this template can give you more insight that can help in your specific requirement.

edit flag offensive delete link more



cmyster is exactly right, he is talking about:

    type: OS::Neutron::PoolMember
      pool_id: {get_param: pool_id}
      address: {get_attr: [server, first_address]}
      protocol_port: 80
Darkinvader gravatar imageDarkinvader ( 2014-12-23 19:05:34 -0600 )edit

Thanks for your help!

Prabu gravatar imagePrabu ( 2015-01-20 07:13:54 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-12-11 11:20:06 -0600

Seen: 1,684 times

Last updated: Dec 14 '14