How to Setup a Load Balanced Cluster

Related Documentation: • Linux Virtual Server

Prerequisites

Last Updated for InterWorx version 2.1.0
  • A minimum of two servers are required (the cluster manager and one node)
  • Each InterWorx-CP server must be running CentOS 4 or above
  • All servers (cluster manager and nodes) MUST have an unlimited domain license
  • The cluster manager MUST have two public IP address and each node must have at least one public IP
  • All machines in the cluster MUST be the same architecture (all i386 or all x86_64)
  • The IPs of the cluster manager and nodes MUST be on the same network segment (e.g. to have a 2 node cluster (1 cluster manager and 1 node), you will need at least 3 different IPs, all on the same network segment )

Purpose

Procedure

Move InterWorx-CP To /usr/local

Make sure that the InterWorx-CP core files live in /usr/local/interworx and not /home/interworx. If you have a fresh install of 2.1.0 or newer then you can skip this step. All installations prior to 2.1.0 will probably need to perform this step. If you’re unsure then just follow the instructions below to make sure that InterWorx-CP lives on /usr/local. List the /home directory’s contents by doing:

[root@test-box ~]# ls -la /home/

The following line in the ls output shows that /home/interworx is actually symbolically linked to /usr/local/interworx so you can skip to the next step if you see the following:

lrwxrwxrwx  1 root root   20 Aug 17 16:13 interworx -> /usr/local/interworx

If instead you see the line below you’ll need to continue this step so we can move InterWorx-CP to /usr/local from /home:

drwx--x--x   17 iworx    iworx        4096 Jul 17 14:06 interworx

To move the InterWorx-CP core files from /home to /usr/local just do the following at the root shell prompt:

[root@test-box ~]# service iworx stop
[root@test-box ~]# mv /home/interworx /usr/local
[root@test-box ~]# ln -fs /usr/local/interworx /home/interworx
[root@test-box ~]# service iworx restart

If the move and link suceeded you should see the following output:

Stopping InterWorx-web:                                    [  OK  ]
Stopping InterWorx-db:                                     [  OK  ]
Starting InterWorx-db:                                     [  OK  ]
Starting InterWorx-web:                                    [  OK  ]
Binding IP Aliases:                                        [  OK  ]

Move Vpopmail to /var

Make sure that the Vpopmail files live in /var/vpopmail and not /home/vpopmail. If you have a fresh install of 2.1.0 or newer then you can skip this step. All installations prior to 2.1.0 will probably need to perform this step. If you’re unsure then just follow the instructions below to make sure that Vpopmail lives on /var. List the /home directory’s contents by doing:

[root@test-box ~]# ls -la /home/

The following line in the ls output shows that /home/vpopmail is actually symbolically linked to /var/vpopmail so you can skip to the next step if you see the following:

lrwxrwxrwx  1 root root   13 Aug 17 16:13 vpopmail -> /var/vpopmail

To move the Vpopmail files from /home to /var just do the following at the root shell prompt:

[root@test-box ~]# mv /home/vpopmail /var
[root@test-box ~]# ln -fs /var/vpopmail /home/vpopmail

That should be it for this step, but if you run into problems please check out the troubleshooting guide at the bottom of this HOWTO.

Install LVS

Verify that the LVS ipvsadm utility is installed

[root@test-box ~]# rpm -q ipvsadm

If you see output resembling the following then ipvsadm is installed:

ipvsadm-1.24-100.rhe4x.iworx

Otherwise you may see output such as:

package ipvsadm is not installed

which obviously means that ipvsadm couldn’t be found. To install ipvsadm in this case just run:

[root@test-box ~]# yum install ipvsadm

which will walk you through the installation process

Setup the Cluster Manager

At this point you should see a Clustering menu item in the NodeWorx Menu. If you don’t please verify the above steps have been performed correctly and use the troubleshooting guide below to flush out any possible problems.

If you see the menu item you are now ready to setup the Cluster Manager by following the Cluster Manager Howto

Add One (or More) Clustered Nodes

To expand your load balanced cluster beyond a single node (the Cluster Manager) you will need to add Clustered Nodes. This can be performed by following the Clustered Node Howto

Troubleshooting

No known problems to troubleshoot.

COPYRIGHT © InterWorx L.L.C. 2004-2008 PRIVACY POLICYEULA