Linux High Availability Part 1

Posted by BadReligion Mon, 14 Dec 2009 13:09:00 GMT

 I have been itching to dive into high availability clusters for quite some time now. As a network administrator uptime is a crucial part of my field. My goal in this series of blogs is to share my experience with setting up a high availability cluster using Linux systems.

Debriefing:

I will set up two virtual machines using VirtualBox. The two machines will both run Debian 5.0.2 i386 and will be on their own private network 192.168.2.0/24. The two nodes will together provide a high availability web and database service via Apache2 and MySQL using HA. With clustering an important factor is keeping data synchronized, that will be handled by DRDB.

 

Getting Up To Speed:

At this point I have setup my two virtual machines, Bravo and Echo, yes very original. I am using iptables on the host machine to masquerade the packets that need to go out to the Internet for the virtual machines. I have installed HA and drbd8 via the Debian packaging system. I configured HA using the Installing Heartbeat (Newbie) screencast tutorial. Similarly I configured a very simple setup of DRBD following the documentation. Now then, lets get into the details of my progress so far.

Networking Woes:

Ok, so the networking part of this mission was a slight barrier. I recall in the past I struggled to get multiple virtual machines to communicate with each other with VirtualBox. This time I seem to have planted that issue right on its ass, and I'm going to explain just how I did it.

In order to get virtual machines to network we need to change the guest operating systems from "NAT" to "Host Interface" in the "Network" settings. If only it were this simple! Well we actually need a "TAP" interface for the guest operating system to use. Lets hop into the trenches shall we?

First we need to let the kernel know wish to act like a router, forwarding packets:

Note this can also be set in /etc/sysctl.conf then it will not have to be set at every boot.
echo 1 > /proc/sys/net/ipv4/ip_forward

Next we need to create our TAP interfaces:

The interface names are arbitrary but it is important that the same name is used when assigning them to each virtual machine.
tunctl -t tap0 -u username
tunctl -t tap1 -u username
ifconfig tap0 up
ifconfig tap1 up

Now lets create a bridge interface and add our TAP interfaces:

The IP assigned is arbitrary but do make note of it
brctl addbr br0
brctl addif br0 tap0
brctl addif br0 tap1
ifconfig br0 up
ifconfig br0 192.168.2.1

Now assign each one of the TAP interfaces to each virtual machine and start them up. Assign an IP address to each virtual machine that is in the same network as the bridge interface on the host system. The virtual machines should be able to ping each other as well as the host system. Notice that they can not get out to the Internet though. For this we will need some help from iptables:

Beware that using MASQUERADE target is not technically proper with static IP addresses, however its the only way I can get NAT to work properly in this situation. The rule below should not be considered a permanent solution, I don't plan on leaving it that way at least.
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -j MASQUERADE

Now the virtual machines should be able to ping each other, and also make it out to the Internet, assuming that other barriers do not exist like firewalls etc.

I will end part 1 at this point. I will catch up on configuring HA and DRBD in part 2 and hopefully at that point also have some more information to share, for now its off to bed and preparing for Monday.

So long

 

Posted in , ,  | no comments

Dell Inspiron Zino HD Where Is Linux

Posted by BadReligion Wed, 02 Dec 2009 01:36:00 GMT

Although I was extraordinarily excited about Dell's Zino HD I was quickly let down to find out Linux is NOT offered as an operating system choice.

At the base model (even adding some some features) the price point is great in my opinion. The base model of the Inspiron Zino HD can be had for just a little more than $200. I had read rumors that Linux was offered on the Zino HD, after attempting to customize one of the models I found there was no Linux option available. After a few days I called Dell and spoke to sales representative who assured me the Zino HD was not available with Linux. The rep was quick to push me toward another Inspiron for around $500 that came with Linux. At this point I explained that my interest was more involved with purchasing a unit that does NOT come with Windows, than a unit that is offered with Linux, even if a discount is not granted.

Still the response was the same.

If Dell does offer the Inspiron Zino HD with Linux or at least without Windows I will most certainly purchase a unit. Of course this assumes they will not only offer Linux on a high priced model. My guess is that Dell has some contract with Microsoft on the Inspiron Zino HD in relation to the new release of Windows 7.

Until then I'm off to find other low priced mini/multimedia computing solutions that are more open to the idea that not EVERYONE wants a Microsoft product.

Posted in ,  | Tags , , , ,  | no comments

Call of Duty Modern Warfare 2

Posted by BadReligion Tue, 17 Nov 2009 06:59:00 GMT

I am writing this blog in a feeble attempt to rally against this new (stupid ass) game from Infinity Ward. I personally have never been impressed with a number of areas of Call of Duty series from Infinity Ward, however I played because the community I was involved with played almost exclusively CoD series. The group I am involved with currently also plays a great deal of Call of Duty WaW. Many obviously are excited about the new CoD Modern Warfare 2, however I am not the only one that is pissed off about its cost, features and Infinity Wards direction with game costs.

Let me first point out the new feature that Call of Duty Modern Warefare 2 will possess that I and others feel is the most user unfriendly! To the best of my knowledge instead of selecting the server you wish to play in the game will choose the best server for you. Sorry, I know you are trying to be slick here but this is a terrible feature. It's not so shabby if the vast majority of users that are groups of friends all playing on the same connection. Even then with intelligent routing protocols I see the potential for groups of people with the same ISP and general location being sent to different servers. The greatest atrocity is when people from other countries or even areas of the same country wish to play together, sorry guys your fucked.

Now as much as I disagree with this I would still consider purchasing Call of Duty Modern Warefare 2. However the next change with Infinity Ward's game is what has caused me to turn against the game I play as much or more than Starcraft and the Diablo series. Infinity Ward will now charge for game patches. Two words IW, piss off! I'm sorry but your games just aren't stable enough on release nor are they so great that I will not subscribe to this sort of behavior. I am perfectly fine with charging for add-ons to the game, however, charging for patches because your original product was inferior enough to raise the need for a fix I will happily refuse.

I see that Infinity Ward has chosen to bend over the table the same group of people that made their game a success. Before you know it Infinity Ward will partner with, yes I'm going there, Microsoft. Then only subscribers to Games for Windows Live will be able to play and the game will play like hell on anything that isn't a Microsoft Xbox.

Surely Infinity Ward and CoD will continue to thrive (for awhile at least) on primarily game consoles. However, they will do so without much of the support from PC gamers as well as my support. For me this move by IW is the death of a great game.

Posted in  | Tags , , ,  | 1 comment