A series I started way back in March of this year is beginning to wrap itself up as I push the project into production.

You may remember the purpose of this is to give a bit of a primer and ethnography, of sorts, from a primairly Microsoft, IIS world to a Linux/Apache world.

Well, recently the second server came in and I’ve been getting heartbeat up and rolling.  The complex thing about this is that the nics that service the shared IP address must be in the same slot and referenced the same (i.e. eth0) otherwise sadness will occur. 

After the fold, a brief overview of heartbeat and a plea for questions.

Currently, I have two front ends servicing a shared IP address and an apache instance (see here for more detail).  Heartbeat2 is running in between those two boxes on a crossover cable and privately addressed IPs.  A third connection services the rsync link to a privately addressed staging server with the staging server only accepting connections between the front ends. 

What’s nice is that once I figured out that the nics that share the resources needed to be in the same slot and once the heartbeat was running over a crossover cable, life was strangely easy.  Apache was trivial to setup since I just followed the instructions in the link above.  There are several good links off of that site and you would do well with exploring it if you’re in need of that information. 

In regards to heartbeat, I can’t emphasize enough that STONITH should be used for the cluster.  When I was creating some other resources before I turned it on, the box whigged out and decided to not come back up; STONITH fixed that.

Also, one final note on rsync.  I want to share my rsync command because I discovered a few things.  First, if you set AD permissions on a directory on your staging server and rsync it over, the perms will not copy successfully.  You must throw the –owner no and –group no parameters in there so that the rsync server won’t touch ownership on the frontend.

With that said, here’s my rsync with notes as to what each line does (borrowed from overtone.org’s long defunct article):

#!/bin/sh
/usr/bin/rsync –password-file /root/bin/rsync.pass \ #my password file I created for the rsync user
                     -avz user@1.2.3.4::share #avz \ (recursive, verbose, compressed) user@1.2.3.4 (user@staging server) and share is the rsync share I setup
                     –address 1.2.3.5 \ # the private interface on the front end I’m using to communicate with the staging server
                     –exclude /directory \ # a directory I’m excluding from the copy because I was having problems getting it up there
                     –owner no \ # put to keep the front end’s permissions from attempting to be copied over.
                     –group no \ # put to keep the group ownership from being changed
                     –delete \ # anything different?  change it.
                     /srv/www/htdocs # the directory I’m copying.

Even though this will go on into production shortly, please e-mail me if you have questions about my setup and want to emulate it; the people I’ve talked to with this have all been extremely helpful and I want to further the love.