heat_template_version: 2013-05-23 description: A simple auto scaling group. parameters: flavor: type: string description: flavor used by the web servers default: m1.small network: type: string description: Network used by the server default: f6e1b574-21a1-44c6-9461-bdc0ef7a9b92 subnet_id: type: string description: subnet on which the load balancer will be located default: 7cb2661a-aea1-47d8-909b-2096d6f193de external_network: type: string description: UUID of a Neutron external network default: 91ee6369-8f8d-497d-beca-1812518a6c30 server_name: type: string description: name of my server default: Cassandra image: type: string description: Image used for servers default: cassandra_server key_name: type: string description: name of a keypair default: cassandra_freeradius # db_port: # type: string # description: port resources: group: type: OS::Heat::AutoScalingGroup properties: cooldown: 60 desired_capacity: 1 max_size: 5 min_size: 1 resource: type: OS::Heat::Stack properties: context: region_name: nova parameters: template: {get_file: cassandra_envir.yaml} scaleup_policy: type: OS::Heat::ScalingPolicy properties: adjustment_type: change_in_capacity auto_scaling_group_id: { get_resource: group } cooldown: 60 scaling_adjustment: 1 cpu_alarm_high: type: OS::Ceilometer::Alarm properties: meter_name: cpu_util statistic: avg period: 60 evaluation_periods: 1 threshold: 50 alarm_actions: - {get_attr: [scaleup_policy, alarm_url]} matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}} comparison_operator: gt scaledown_policy: type: OS::Heat::ScalingPolicy properties: adjustment_type: change_in_capacity auto_scaling_group_id: {get_resource: group} cooldown: 60 scaling_adjustment: -1 cpu_alarm_low: type: OS::Ceilometer::Alarm properties: description: Scale-down if the average CPU < 15% for 1 minutes meter_name: cpu_util statistic: avg period: 60 evaluation_periods: 1 threshold: 40 alarm_actions: - {get_attr: [scaledown_policy, alarm_url]} matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}} comparison_operator: lt lb_vip_port: type: OS::Neutron::Port properties: network_id: { get_param: network } fixed_ips: - subnet_id: { get_param: subnet_id} lb_vip_floating_ip: type: OS::Neutron::FloatingIP properties: floating_network_id: {get_param: external_network} port_id: {get_resource: lb_vip_port} lb_pool_vip: type: OS::Neutron::FloatingIPAssociation properties: floatingip_id: { get_resource: lb_vip_floating_ip } port_id: { 'Fn::Select': ['port_id', {get_attr: [pool, vip]}]} monitor: type: OS::Neutron::HealthMonitor properties: type: TCP delay: 5 max_retries: 5 timeout: 5 pool: type: OS::Neutron::Pool properties: protocol: TCP monitors: [{get_resource: monitor}] subnet_id: {get_param: subnet_id} lb_method: ROUND_ROBIN vip: protocol_port: 9042 lb: type: OS::Neutron::LoadBalancer properties: protocol_port: 9042 pool_id: {get_resource: pool}