Hi Dejan, I don't need the ip itself of the node. That is stored elsewhere. Essentially, when the node becomes the master node (in 3 or more nodes), I will execute the following script.
1. Get my instance id from ec2 2. Read the public elastic ip from the file /etc/ec2/elasticip. Note this is not the node's internal ip, rather the external ip I need to map 3. Call the ec2 api and pass my instance id and the elastic ip so it gets mapped to the current instance. I only want to execute this script on the leader node when it becomes the leader. Make sense? Thanks, Todd On Mon, 2011-01-10 at 17:34 +0100, Dejan Muhamedagic wrote: > Hi, > > On Mon, Jan 10, 2011 at 09:09:12PM +1300, Todd Nine wrote: > > Hi all, > > I'm running haproxy on 3 nodes on amazon ec2. Unfortunately Amazon's ELB > > doesn't meet our security requirements. One of our requirements is fast > > automatic failover to standby nodes. It seems I can accomplish this via the > > heartbeat package. I've created a chef recipe that correctly installs and > > configures heartbeat. My configuration file is here. > > > > https://gist.github.com/7b37b9b2060842e3a364 > > > > Now, my next question. When a node becomes the DC, I need to execute a > > script (probably ruby) that will make a call to EC2 and set the public > > elastic ip to the DC node. I also cannot configure this interactively, I > > need to be able to automate this with Chef. Can anyone point me to an > > example of how to set this up? I read the doc for pacemaker, but it's not > > clear to me how do something as simple as execute a script on the "New DC" > > event and register it within the framework. > > There's no such hook in Pacemaker. Why do you need the IP on the > DC node? There's nothing special about the DC node from the > user's perspective. BTW, there was some discussion a while ago > about EC2 elastic ip addresses and pacemaker. Try to search the > archives, these and for the Pacemaker list. > > Thanks, > > Dejan > > > Thanks, > > Todd > > _______________________________________________ > > Linux-HA mailing list > > [email protected] > > http://lists.linux-ha.org/mailman/listinfo/linux-ha > > See also: http://linux-ha.org/ReportingProblems > _______________________________________________ > Linux-HA mailing list > [email protected] > http://lists.linux-ha.org/mailman/listinfo/linux-ha > See also: http://linux-ha.org/ReportingProblems _______________________________________________ Linux-HA mailing list [email protected] http://lists.linux-ha.org/mailman/listinfo/linux-ha See also: http://linux-ha.org/ReportingProblems
