<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:14px">Hello Jay,</span><div style="font-family:arial,sans-serif;font-size:14px"> Thanks, here is my template:</div><div style="font-family:arial,sans-serif;font-size:14px">
<br></div><div style="font-family:arial,sans-serif;font-size:14px"><div>{</div><div> "AWSTemplateFormatVersion" : "2014-03-06",</div><div><br></div><div> "Parameters" : {</div><div> "InstanceType" : {</div>
<div> "Description" : "WebServer EC2 instance type",</div><div> "Type" : "String",</div><div> "Default" : "m1.small",</div><div> "ConstraintDescription" : "must be a valid EC2 instance type."</div>
<div> },</div><div> </div><div> "WebServerPort" : {</div><div> "Description" : "TCP/IP port of the web server",</div><div> "Type" : "String",</div><div>
"Default" : "8888"</div><div> },</div><div> "KeyName" : {</div><div> "Description" : "Name of an existing EC2 KeyPair to enable SSH access to the instances",</div>
<div> "Type" : "String",</div><div> "Default" : "damonkey"</div><div> }</div><div> </div><div> },</div><div><br></div><div> "Resources" : {</div><div> "WebServerGroup" : {</div>
<div> "Type" : "AWS::AutoScaling::AutoScalingGroup",</div><div> "Properties" : {</div><div> "AvailabilityZones" : { "Fn::GetAZs" : "" },</div><div>
"LaunchConfigurationName" : { "Ref" : "LaunchConfig" },</div><div> "MinSize" : "1",</div><div> "MaxSize" : "3"</div><div> }</div>
<div> },</div><div> "ScaleUpPolicy": {</div><div> "Type": "AWS::AutoScaling::ScalingPolicy",</div><div> "Properties": {</div><div> "AdjustmentType": "ChangeInCapacity",</div>
<div> "AutoScalingGroupName": "WebServerGroup",</div><div> "Cooldown": "60",</div><div> "ScalingAdjustment": "1"</div><div> }</div><div>
},</div><div> "ScaleDownPolicy": {</div><div> "Type": "AWS::AutoScaling::ScalingPolicy",</div><div> "Properties": {</div><div> "AdjustmentType": "ChangeInCapacity",</div>
<div> "AutoScalingGroupName": "WebServerGroup",</div><div> "Cooldown": "60",</div><div> "ScalingAdjustment": "-1"</div><div> }</div><div>
},</div><div> "CPUAlarmHigh": {</div><div> "Type": "OS::Ceilometer::Alarm",</div><div> "Properties": {</div><div> "description": "Scale-up if CPU is greater than 90% for 10 seconds",</div>
<div> "meter_name": "cpu_util",</div><div> "statistic": "avg",</div><div> "period": "10",</div><div> "evaluation_periods": "1",</div>
<div> "threshold": "90",</div><div> "alarm_actions": [ {"Fn::GetAtt": ["ScaleUpPolicy", "AlarmUrl"]} ],</div><div> "matching_metadata": {"metadata.user_metadata.server_group": "WebServerGroup" },</div>
<div> "comparison_operator": "gt"</div><div> }</div><div> },</div><div> "CPUAlarmLow": {</div><div> "Type": "OS::Ceilometer::Alarm",</div><div> "Properties": {</div>
<div> "description": "Scale-down if CPU is less than 50% for 10 seconds",</div><div> "meter_name": "cpu_util",</div><div> "statistic": "avg",</div>
<div> "period": "10",</div><div> "evaluation_periods": "1",</div><div> "threshold": "50",</div><div> "alarm_actions": [ {"Fn::GetAtt": ["ScaleDownPolicy", "AlarmUrl"]} ],</div>
<div> "matching_metadata": {"metadata.user_metadata.server_group": "WebServerGroup" },</div><div> "comparison_operator": "lt"</div><div> }</div><div> },</div>
<div> "LaunchConfig" : {</div><div> "Type" : "AWS::AutoScaling::LaunchConfiguration",</div><div> "Properties" : {</div><div> "KeyName" : { "Ref" : "KeyName" },</div>
<div> "ImageId" : "CirrOS 0.3.1",</div><div> "UserData" : { "Fn::Base64" : { "Ref" : "WebServerPort" }},</div><div> "SecurityGroups" : [ "default" ],</div>
<div> "InstanceType" : { "Ref" : "InstanceType" }</div><div> }</div><div> }</div><div> }</div><div><br></div><div>}</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2014-03-13 13:29 GMT+08:00 Micheal <span dir="ltr"><<a href="mailto:pannov.tsth@gmail.com" target="_blank">pannov.tsth@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"> 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. <div>
All replies appreciated, thanks!</div></div>
</blockquote></div><br></div>