
- Utilises the metrics/meters created by the ceilometer/gnochhi plugins. - Added in some sample templates. Change-Id: Id6de4a6769441060178ce7344e1d63c50098f4ac
60 lines
1.5 KiB
YAML
60 lines
1.5 KiB
YAML
heat_template_version: 2014-10-16
|
|
description: A simple auto-scalable server, based on a threshold 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::Alarm
|
|
properties:
|
|
meter: cpu.cpu
|
|
threshold: 1
|
|
period: 60
|
|
evaluation_period: 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
|
|
statistic: max
|