[Pacemaker] Automating Pacemaker Setup

Todd Nine todd at spidertracks.com
Fri May 27 00:47:42 CEST 2011


Hey Mate,
  I have a setup nearly working.  Would you be willing to share recipes?
I specifically am trying to get haproxy and NginX ssl termination
running in groups.  1 node runs ha proxy and the other nodes run nginx
for ssl termination.  I've set it up with chef.  It's not quite working
yet, but it's close.  Since you've managed to get this working, you may
be able to finish these off.  I have everything working except the init
start/stop hooks for pacemaker to set the Elastic IP automatically and
then run chef-client to reconfigure everything on all the other nodes.

Todd





On Thu, 2011-05-26 at 22:26 +0000, veghead wrote:

> Does anyone have any links to documentation on automating Pacemaker setup with 
> tools like Chef or Puppet?
> 
> I have a working two node cluster for HAProxy on EC2, but I'd like to fully 
> automate the setup process for future nodes. Specifically so I can spin up a new 
> instance w/out any manual intervention.
> 
> Thanks.
> 
> 
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> 
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20110527/80845788/attachment-0003.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ec2_failover.rb
Type: application/x-ruby
Size: 3722 bytes
Desc: not available
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20110527/80845788/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ec2setip.rb
Type: application/x-ruby
Size: 1100 bytes
Desc: not available
URL: <http://oss.clusterlabs.org/pipermail/pacemaker/attachments/20110527/80845788/attachment-0007.bin>
-------------- next part --------------
#Auto generated ha.conf file for all load balancer nodes
udpport 694
use_logd yes
autojoin none
keepalive 2
warntime 5
deadtime 10
initdead 60

<%node[:haproxy][:peers].each_value do |peer| %>
ucast eth0 <%=peer%>
<% end %>

<%node[:haproxy][:peers].each_key do |peer| %>
node <%=peer%>
<% end %>
crm respawn
-------------- next part --------------
#Turn off stonith, does not apply to our use case
property stonith-enabled=false
property no-quorum-policy=ignore

#Define all the primitives
#primitive haproxy lsb:/etc/init.d/haproxy
#primitive nginx lsb:/etc/init.d/nginx
primitive ec2setip lsb:/etc/init.d/ec2setip

#Group all services together TODO use Collocating to try and offload nginx to other 2 nodes
#group proxygroup haproxy nginx ec2setip
 


commit 


More information about the Pacemaker mailing list