Difference between revisions of "Heat/Using-HA"
< Heat
m (Text replace - "__NOTOC__" to "") |
(→Open firewall for metadata server) |
||
Line 2: | Line 2: | ||
= Follow the getting started guide for your particular distribution. = | = Follow the getting started guide for your particular distribution. = | ||
− | == Open firewall | + | == Open required firewall ports == |
− | |||
− | |||
+ | Guests need to be able to communicate with the heat-api-cfn and heat-api-cloudwatch services, which run by default on port 8000 and 8003 respectively | ||
<pre><nowiki> | <pre><nowiki> | ||
− | sudo lokkit -p | + | sudo lokkit -p 8000:tcp |
+ | sudo lokkit -p 8003:tcp | ||
</nowiki></pre> | </nowiki></pre> | ||
Revision as of 08:15, 9 April 2013
Contents
Follow the getting started guide for your particular distribution.
Open required firewall ports
Guests need to be able to communicate with the heat-api-cfn and heat-api-cloudwatch services, which run by default on port 8000 and 8003 respectively
sudo lokkit -p 8000:tcp sudo lokkit -p 8003:tcp
Run the heat-metadata server
sudo heat-metadata &
Note: If you start the server at about the same time as the engine, the metadata server may not register properly. The metadata server registration code needs improvement.
Create the HA template
heat stack-create ha -f ./templates/WordPress_Single_Instance_With_HA.template --parameters="InstanceType=m1.xlarge;DBUsername=${USER};DBPassword=verybadpass;KeyName=${USER}_key"
Test service restarting
ssh into the guest and test service and VM restart.
ssh ec2-user@10.0.0.2 sudo systemctl stop httpd.service # at most 1 minute later sudo systemctl status httpd.service
Note: If this is done three times, the entire instance will be restarted, demonstrating recovery escalation.
Confirm CloudWatch working
Examine logs for data that shows the service failure
sudo grep Http /var/log/heat/engine.log
2012-06-19 14:31:03 DEBUG [heat.engine.manager] new watch:HttpFailureAlarm data:{u'Namespace': u'system/linux', u'ServiceFailure': {u'Units': u'Counter', u'Value': 1}}