diff options
author | Roberto Polli <robipolli@gmail.com> | 2017-10-11 17:17:50 +0200 |
---|---|---|
committer | Roberto Polli <robipolli@gmail.com> | 2017-10-12 08:26:26 +0000 |
commit | 2823fcafdc66d384a5d8207966a5e797ae466403 (patch) | |
tree | cd11f5af9d047d5f87f8803ea2ae1251f7c02872 | |
parent | 1d2d3cb75f30d60f4e7468c64f49e9752e55719b (diff) | |
download | heat-templates-2823fcafdc66d384a5d8207966a5e797ae466403.tar.gz |
Replace LBaaS with LBaaSv2.
Since Mitaka, OS::Neutron::LBaaS::LoadBalancer replaces
OS::Neutron::LoadBalancer. The patch replaces both
heat_template_version and OS::Neutron::LoadBalancer.
Closes-Bug: #1722853
Change-Id: I284c72b67bdaaadde35a97feb807171046e3a93f
-rw-r--r-- | hot/autoscaling.yaml | 45 | ||||
-rw-r--r-- | hot/lb_server.yaml | 10 |
2 files changed, 32 insertions, 23 deletions
diff --git a/hot/autoscaling.yaml b/hot/autoscaling.yaml index 7d66b8a..d6d8991 100644 --- a/hot/autoscaling.yaml +++ b/hot/autoscaling.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2013-05-23 +heat_template_version: 2016-10-14 description: AutoScaling Wordpress parameters: image: @@ -75,6 +75,7 @@ resources: image: {get_param: image} key_name: {get_param: key} network: {get_param: network} + subnet: {get_param: subnet_id} pool_id: {get_resource: pool} metadata: {"metering.server_group": {get_param: "OS::stack_id"}} user_data: @@ -153,35 +154,39 @@ resources: list_join: - '' - - {'=': {server_group: {get_param: "OS::stack_id"}}} - monitor: - type: OS::Neutron::HealthMonitor + lb: + type: OS::Neutron::LBaaS::LoadBalancer properties: - type: TCP - delay: 5 - max_retries: 5 - timeout: 5 + vip_subnet: {get_param: subnet_id} + listener: + type: OS::Neutron::LBaaS::Listener + properties: + loadbalancer: {get_resource: lb} + protocol: HTTP + protocol_port: 80 pool: - type: OS::Neutron::Pool + type: OS::Neutron::LBaaS::Pool properties: + listener: {get_resource: listener} + lb_algorithm: ROUND_ROBIN protocol: HTTP - monitors: [{get_resource: monitor}] - subnet_id: {get_param: subnet_id} - lb_method: ROUND_ROBIN - vip: - protocol_port: 80 - lb: - type: OS::Neutron::LoadBalancer + session_persistence: + type: SOURCE_IP + lb_monitor: + type: OS::Neutron::LBaaS::HealthMonitor properties: - protocol_port: 80 - pool_id: {get_resource: pool} - + pool: { get_resource: pool } + type: TCP + delay: 5 + max_retries: 5 + timeout: 5 # assign a floating ip address to the load balancer # pool. lb_floating: type: OS::Neutron::FloatingIP properties: floating_network_id: {get_param: external_network_id} - port_id: {get_attr: [pool, vip, port_id]} + port_id: {get_attr: [lb, vip_port_id]} outputs: scale_up_url: @@ -197,7 +202,7 @@ outputs: this URL; no body nor extra headers are needed. value: {get_attr: [web_server_scaledown_policy, alarm_url]} pool_ip_address: - value: {get_attr: [pool, vip, address]} + value: {get_attr: [lb, vip_address]} description: The IP address of the load balancing pool website_url: value: diff --git a/hot/lb_server.yaml b/hot/lb_server.yaml index 3cd907f..67762b6 100644 --- a/hot/lb_server.yaml +++ b/hot/lb_server.yaml @@ -1,4 +1,4 @@ -heat_template_version: 2013-05-23 +heat_template_version: 2016-10-14 description: A load-balancer server parameters: image: @@ -21,6 +21,9 @@ parameters: network: type: string description: Network used by the server + subnet: + type: string + description: Subnet used by the server resources: server: @@ -34,11 +37,12 @@ resources: user_data_format: RAW networks: [{network: {get_param: network} }] member: - type: OS::Neutron::PoolMember + type: OS::Neutron::LBaaS::PoolMember properties: - pool_id: {get_param: pool_id} + pool: {get_param: pool_id} address: {get_attr: [server, first_address]} protocol_port: 80 + subnet: {get_param: subnet} outputs: server_ip: |