> Hi guys, > I'm having a hard time finding the info I need to configure pacemaker from > an > input file. I've been using Zookeeper a lot in our application tier, so I'm > familiar with clusters, however I'm struggling to adapt that knowledge to the > pacemaker configuration. > > > Now I need to perform the following. > > Only 1 node is running these services at a time, the other two do not have > these services running. I need to check our public IP, which can be > configured > from chef. > > > On Start > start haproxy > start stunnel > execute custom script to switch our amazon ec2 ip to the node running > > on stop > stop haproxy > stop stunnel > > > > Another caveat. I've read the cluster_from_scratch several times. It uses > the > interactive command line to configure pacemaker. I need to create an xml > file > directly using my chef recipes. I have no ability to know each node's UUID, > only the hostname. Can anyone provide me with an example of how I can > configure pacemaker from an xml file to execute several scripts?
Todd, You can configure pacemaker from the commandline in the following way: crm configure < resource.res The resource.res should look like the command's you would enter from crm. e.g.: primitive haproxy lsb:/usr/local/bin/haproxy primitive stunnel lsb:/usr/local/bin/lsb primitive amazonip lsb:/usr/local/bin/amazonip order stunnel-after-haproxy inf: haproxy stunnel order amazonip-after-stunnel inf: stunnel amazonip commit Regarding you're custom scripts I would create a OCF or LSB compliant script as in the example above. You can place these in the standard dirs or you could use the full path. Now you can simply manage these as "standard" resources. Hope this helps, Robert van Leeuwen _______________________________________________ Pacemaker mailing list: Pacemaker@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