heat_template_version: 2014-10-16 description: A simple auto-scalable server, based on a gnocchi_aggregation_by_metrics_alarm. resources: group: type: OS::Heat::AutoScalingGroup properties: cooldown: 60 desired_capacity: 2 max_size: 3 min_size: 1 resource: type: OS::Nova::Server properties: image: cirros-0.3.5-x86_64-disk flavor: m1.nano networks: - network: public key_name: scale scaleup_policy: type: OS::Heat::ScalingPolicy properties: adjustment_type: change_in_capacity auto_scaling_group_id: { get_resource: group } cooldown: 60 scaling_adjustment: 1 scaledown_policy: type: OS::Heat::ScalingPolicy properties: adjustment_type: change_in_capacity auto_scaling_group_id: { get_resource: group } cooldown: 60 scaling_adjustment: -1 no_change_policy: type: OS::Heat::ScalingPolicy properties: adjustment_type: change_in_capacity auto_scaling_group_id: { get_resource: group } cooldown: 60 scaling_adjustment: 0 cpu_alarm_high: type: OS::Aodh::GnocchiAggregationByMetricsAlarm properties: metrics: [] threshold: 1 alarm_actions: - {get_attr: [scaleup_policy, alarm_url]} ok_actions: - {get_attr: [scaledown_policy, alarm_url]} insufficient_actions: - {get_attr: [no_change_policy, alarm_url]} comparison_operator: gt aggregation_method: mean