Jump to: navigation, search

Difference between revisions of "Heat/Using-HA"

m (Text replace - "__NOTOC__" to "")
Line 1: Line 1:
__NOTOC__
+
 
 
= Follow the getting started guide for your particular distribution. =
 
= Follow the getting started guide for your particular distribution. =
  

Revision as of 23:29, 17 February 2013

Follow the getting started guide for your particular distribution.

Open firewall for metadata server

Open up port 8002 on your firewall so that the guests can communicate with the metadata server.


sudo lokkit -p 8002: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}}