[Openstack] Request for help - Heat Auto-scaling

Eoghan Glynn eglynn at redhat.com
Thu Mar 13 11:26:21 UTC 2014


What version of Heat are you using?

The repeat_actions attribute on the alarms was needed to set
explicitly True in Havana (whereas this is now the default).

This continuous notification is needed for the Heat autoscaling
logic to kick in successfully.

So if using Havana, please add this setting to CPUAlarmHigh
& CPUAlarmLow.

Cheers,
Eoghan


----- Original Message -----
> Hello Jay,
> Thanks, here is my template:
> 
> {
> "AWSTemplateFormatVersion" : "2014-03-06",
> 
> "Parameters" : {
> "InstanceType" : {
> "Description" : "WebServer EC2 instance type",
> "Type" : "String",
> "Default" : "m1.small",
> "ConstraintDescription" : "must be a valid EC2 instance type."
> },
> "WebServerPort" : {
> "Description" : "TCP/IP port of the web server",
> "Type" : "String",
> "Default" : "8888"
> },
> "KeyName" : {
> "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the
> instances",
> "Type" : "String",
> "Default" : "damonkey"
> }
> },
> 
> "Resources" : {
> "WebServerGroup" : {
> "Type" : "AWS::AutoScaling::AutoScalingGroup",
> "Properties" : {
> "AvailabilityZones" : { "Fn::GetAZs" : "" },
> "LaunchConfigurationName" : { "Ref" : "LaunchConfig" },
> "MinSize" : "1",
> "MaxSize" : "3"
> }
> },
> "ScaleUpPolicy": {
> "Type": "AWS::AutoScaling::ScalingPolicy",
> "Properties": {
> "AdjustmentType": "ChangeInCapacity",
> "AutoScalingGroupName": "WebServerGroup",
> "Cooldown": "60",
> "ScalingAdjustment": "1"
> }
> },
> "ScaleDownPolicy": {
> "Type": "AWS::AutoScaling::ScalingPolicy",
> "Properties": {
> "AdjustmentType": "ChangeInCapacity",
> "AutoScalingGroupName": "WebServerGroup",
> "Cooldown": "60",
> "ScalingAdjustment": "-1"
> }
> },
> "CPUAlarmHigh": {
> "Type": "OS::Ceilometer::Alarm",
> "Properties": {
> "description": "Scale-up if CPU is greater than 90% for 10 seconds",
> "meter_name": "cpu_util",
> "statistic": "avg",
> "period": "10",
> "evaluation_periods": "1",
> "threshold": "90",
> "alarm_actions": [ {"Fn::GetAtt": ["ScaleUpPolicy", "AlarmUrl"]} ],
> "matching_metadata": {"metadata.user_metadata.server_group": "WebServerGroup"
> },
> "comparison_operator": "gt"
> }
> },
> "CPUAlarmLow": {
> "Type": "OS::Ceilometer::Alarm",
> "Properties": {
> "description": "Scale-down if CPU is less than 50% for 10 seconds",
> "meter_name": "cpu_util",
> "statistic": "avg",
> "period": "10",
> "evaluation_periods": "1",
> "threshold": "50",
> "alarm_actions": [ {"Fn::GetAtt": ["ScaleDownPolicy", "AlarmUrl"]} ],
> "matching_metadata": {"metadata.user_metadata.server_group": "WebServerGroup"
> },
> "comparison_operator": "lt"
> }
> },
> "LaunchConfig" : {
> "Type" : "AWS::AutoScaling::LaunchConfiguration",
> "Properties" : {
> "KeyName" : { "Ref" : "KeyName" },
> "ImageId" : "CirrOS 0.3.1",
> "UserData" : { "Fn::Base64" : { "Ref" : "WebServerPort" }},
> "SecurityGroups" : [ "default" ],
> "InstanceType" : { "Ref" : "InstanceType" }
> }
> }
> }
> 
> }
> 
> 
> 2014-03-13 13:29 GMT+08:00 Micheal < pannov.tsth at gmail.com > :
> 
> 
> 
> Does Heat support auto-scaling in Havana ? The cloudwatch seems to be
> deprecated, and the new mechanism with ceilometer seems not working either.
> I can create stack successfully, but the stack with
> AWS::AutoScaling::AutoScalingGroup can not auto-scaling as expected.
> All replies appreciated, thanks!
> 
> 
> _______________________________________________
> Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> Post to     : openstack at lists.openstack.org
> Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> 




More information about the Openstack mailing list