Installing cluster
From ISPWiki
Contents |
Introduction
The cluster has a shared file storage. MySQL databases are not stored there in order to increase performance.
The article below does not describe how to create a data storage. The most suitable variants are:
- External NAS + NFS
- GlusterFS
- iSCSI+mdadm+reiserfs+NFS
Preparing basic system
You must perform all the operations below only on one node.
We assume this storage is mounted on each node in /storage. Install a debootstrap utility:
apt-get install debootstrap
Using this utility, create a chroot-environment in the storage:
debootstrap lenny /storage
This command will install a Debian Lenny basic system into /storage.
Run the commands below to allow the chroot-environment correct operation:
mount --bind /dev /storage/dev mount --bind /dev/pts /storage/dev/pts mount --bind /lib/modules /storage/lib/modules mount --bind /proc /storage/proc mount --bind /tmp /storage/tmp mount --bind /var/run /storage/var/run mount --bind /var/log/account /storage/var/log/account
All these commands should be customized to automatically perform once the storage has been mounted. For example, in /etc/rc.local.
Installing ISPmanager Cluster
Enter the node that the ISPmanager IP-address is bound to. Enter the chroot-environment:
chroot /storage
Download an installation script:
wget http://download.ispsystem.com/install.sh
Run it:
sh install.sh
Perform the procedures below.
Customizing node roles
Edit /usr/local/ispmgr/etc/cluster_nodes.conf, as described in cluster_nodes.conf, and a ready sample file that will be installed along with ISPmanager. The role of each node is specified by its IP-address.
For the web-servers specified in cluster_nodes.conf, create configuration files according to the paths specified in a configuration file. There is a sample file 127.0.0.1.conf with ISPmanager. Apache mod_macro module is used there to create similar configuration files for different IP-addresses. You can install mod_macro using the command:
apt-get install libapache2-mod-macro
Once web-server has been customized, run the command:
/usr/local/ispmgr/sbin/sitesctl --distribute
This command creates missing Include directories for web-servers.
Running node roles
All the node's roles run with the command:
chroot /storage /usr/local/ispmgr/sbin/clusterctl --node LOCAL start
Or within the chroot-environment:
/usr/local/ispmgr/sbin/clusterctl --node LOCAL start
