summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2017-06-06 05:09:05 +0000
committerGerrit Code Review <review@openstack.org>2017-06-06 05:09:05 +0000
commit2cb7be482878ca2421c5c8624b2602c66ac10124 (patch)
tree7ca2988104a68ba2687cac41625766d99af31f52
parent5d85fb437d79e0a491bda7c096e37e200171ca70 (diff)
parentde990777bd74bc8886070b22a2c12f9bbc735ff8 (diff)
Merge "autoscaling: Remove usage of deprecated Ceilometer API"
-rw-r--r--cfn/F17/AutoScalingCeilometer.yaml2
-rw-r--r--hot/autoscaling.yaml48
2 files changed, 32 insertions, 18 deletions
diff --git a/cfn/F17/AutoScalingCeilometer.yaml b/cfn/F17/AutoScalingCeilometer.yaml
index b35a6d4..55e1617 100644
--- a/cfn/F17/AutoScalingCeilometer.yaml
+++ b/cfn/F17/AutoScalingCeilometer.yaml
@@ -1,5 +1,5 @@
1HeatTemplateFormatVersion: '2012-12-12' 1HeatTemplateFormatVersion: '2012-12-12'
2Description: Creates an autoscaling wordpress application using Ceilometer. 2Description: Creates an autoscaling wordpress application using deprecated Ceilometer API.
3Parameters: 3Parameters:
4 KeyName: 4 KeyName:
5 Description: Name of an existing EC2 KeyPair to enable SSH access to the instances 5 Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
diff --git a/hot/autoscaling.yaml b/hot/autoscaling.yaml
index 1d8739e..82616fa 100644
--- a/hot/autoscaling.yaml
+++ b/hot/autoscaling.yaml
@@ -114,31 +114,45 @@ resources:
114 cooldown: 60 114 cooldown: 60
115 scaling_adjustment: -1 115 scaling_adjustment: -1
116 cpu_alarm_high: 116 cpu_alarm_high:
117 type: OS::Ceilometer::Alarm 117 type: OS::Aodh::GnocchiAggregationByResourcesAlarm
118 properties: 118 properties:
119 description: Scale-up if the average CPU > 50% for 1 minute 119 description: Scale up if CPU > 80%
120 meter_name: cpu_util 120 metric: cpu_util
121 statistic: avg 121 aggregation_method: mean
122 period: 60 122 granularity: 300
123 evaluation_periods: 1 123 evaluation_periods: 1
124 threshold: 50 124 threshold: 80
125 alarm_actions: 125 resource_type: instance
126 - {get_attr: [web_server_scaleup_policy, alarm_url]}
127 matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
128 comparison_operator: gt 126 comparison_operator: gt
127 alarm_actions:
128 - str_replace:
129 template: trust+url
130 params:
131 url: {get_attr: [scaleup_policy, signal_url]}
132 query:
133 list_join:
134 - ''
135 - - {'=': {server_group: {get_param: "OS::stack_id"}}}
129 cpu_alarm_low: 136 cpu_alarm_low:
130 type: OS::Ceilometer::Alarm 137 type: OS::Aodh::GnocchiAggregationByResourcesAlarm
131 properties: 138 properties:
132 description: Scale-down if the average CPU < 15% for 10 minutes 139 description: Scale down if CPU < 15% for 5 minutes
133 meter_name: cpu_util 140 metric: cpu_util
134 statistic: avg 141 aggregation_method: mean
135 period: 600 142 granularity: 300
136 evaluation_periods: 1 143 evaluation_periods: 1
137 threshold: 15 144 threshold: 15
138 alarm_actions: 145 resource_type: instance
139 - {get_attr: [web_server_scaledown_policy, alarm_url]}
140 matching_metadata: {'metadata.user_metadata.stack': {get_param: "OS::stack_id"}}
141 comparison_operator: lt 146 comparison_operator: lt
147 alarm_actions:
148 - str_replace:
149 template: trust+url
150 params:
151 url: {get_attr: [scaleup_policy, signal_url]}
152 query:
153 list_join:
154 - ''
155 - - {'=': {server_group: {get_param: "OS::stack_id"}}}
142 monitor: 156 monitor:
143 type: OS::Neutron::HealthMonitor 157 type: OS::Neutron::HealthMonitor
144 properties: 158 properties: