Setting up the cluster uses the following steps
- Add CDROM drive to master node (optionally we can set up the master node to boot using PXE)
- Setting up a netboot environment using PXE. We need to configure DHCP and add tftpd
We follow the following guides to setup the linux cluster
Setting up the Master Node
The Box cluster machine does not have a CD-ROM drive. One option is to attach a CD/DVD drive to the SATA slot. The other option is to boot this node through netboot (PXE). To do this, we should use another machine. In our case, we use the first option - viz. adding a CD-ROM drive.
Software that we need for a basic setup
We will use Ubuntu Linux for the cluster. As a first step, we install the server version of Ubuntu to the master node. Additionally we install the following software apt-get install ssh dhcp3-server ruby1.9.1 nfs-common nfs-kernel-server tftpd-hpa apache2 apt-cacher
The purpose and configuration of these software is described in detail here.
Setting up the Slave nodes
The setup of the slave nodes includes mainly two steps: a) keyless SSH access and b) NFS mouting of the home directory from the master node. We also develop some scripts to manage users and software packages for all the nodes from the master node.
Keyless SSH access
Login to each node and set the root passwd using the following steps
sudo su - passwd
The next step is from the master node. First login as root and create an ssh key. Then copy the .ssh/authorized_keys to all the nodes using ssh. This can be done with the following set of commands
su - ssh-keygen cp .ssh/id_pub .ssh/authorized_keys for NODE in `cat /etc/machines` do rsh $NODE mkdir .ssh rcp .ssh/authorized_keys $NODE:.ssh/authorized_keys done
Keyless access for users
Users can benefit from keyless access by performing the following steps
ssh-keygen cp .ssh/id_pub .ssh/authorized_keys