Farm Guide

From Pmgwiki

(Difference between revisions)
Jump to: navigation, search
(Hardware Details)
Line 1: Line 1:
The farm machines are a set of 14 rack mounted servers in the CSAIL machine room, available for experiments. In November 2008, these machines were upgraded to Ubuntu 8.10. These machines are shared: please be courteous. Use <tt>top</tt> or <tt>uptime</tt> to see if a machine is being used by someone else for something that may be computationally expensive. If so, please use a different machine.
The farm machines are a set of 14 rack mounted servers in the CSAIL machine room, available for experiments. In November 2008, these machines were upgraded to Ubuntu 8.10. These machines are shared: please be courteous. Use <tt>top</tt> or <tt>uptime</tt> to see if a machine is being used by someone else for something that may be computationally expensive. If so, please use a different machine.
 +
 +
=== Installing Software ===
 +
 +
Please don't run <tt>make install</tt> as root to install software system-wide. Please use Ubuntu packages, since that will permit the software to be painlessly installed across all the machines, and to be removed/upgraded. If you need something specific for your research, please consider installing it into your home directory, to avoid cluttering up the systems.
 +
 +
To install software:
 +
 +
# Find the package name in [http://packages.ubuntu.com/ the Ubuntu package archive]
 +
# Run <tt>apt-get install [package-name]</tt> as root
 +
 +
=== Disk Space ===
 +
 +
Each of the farm machines has the following configuration:
 +
 +
* Root partition: /dev/sda1 using ext3, occupying the entire disk (minus swap)
 +
* Swap: /dev/sda2 (supposed to be 2x RAM = ~4 GB)
 +
* <tt>/space</tt>: /dev/sdb1 using ext3, occupying the entire disk
 +
 +
In other words, if you need more disk space, put stuff in <tt>/space</tt>
 +
=== Using AFS ===
=== Using AFS ===

Revision as of 15:43, 20 November 2008

The farm machines are a set of 14 rack mounted servers in the CSAIL machine room, available for experiments. In November 2008, these machines were upgraded to Ubuntu 8.10. These machines are shared: please be courteous. Use top or uptime to see if a machine is being used by someone else for something that may be computationally expensive. If so, please use a different machine.

Contents

Installing Software

Please don't run make install as root to install software system-wide. Please use Ubuntu packages, since that will permit the software to be painlessly installed across all the machines, and to be removed/upgraded. If you need something specific for your research, please consider installing it into your home directory, to avoid cluttering up the systems.

To install software:

  1. Find the package name in the Ubuntu package archive
  2. Run apt-get install [package-name] as root

Disk Space

Each of the farm machines has the following configuration:

  • Root partition: /dev/sda1 using ext3, occupying the entire disk (minus swap)
  • Swap: /dev/sda2 (supposed to be 2x RAM = ~4 GB)
  • /space: /dev/sdb1 using ext3, occupying the entire disk

In other words, if you need more disk space, put stuff in /space


Using AFS

The farm machines are configured to use AFS. To access your CSAIL AFS files:

  1. Get a Kerberos ticket: kinit [username]. Type your CSAIL password.
  2. Access your files: ls /afs/csail.mit.edu/u/[first letter of user name]/[user name] Example: ls /afs/csail.mit.edu/u/e/evanj

To access your Athena AFS account, first follow the above to get a Kerberos ticket for your CSAIL account. The following are adapted from the CSAIL cross-cell HOWTO:

  1. Create a cross-cell entry: aklog -cell athena.mit.edu. You will get a message like: created cross-cell entry for [username]@csail.mit.edu (Id 16383603) at athena.mit.edu
  2. Log in to an Athena machine, give your CSAIL account access to all the files in your home directory: cd; find . -name .snapshot -prune -o -type d -exec fs sa {} [username]@athena.mit.edu all \;

Important Packages

  • am-utils: used for amd to automount NFS. At some point we might want to migrate to autofs, the in-kernel implementation.
  • g++ gdb make gcc-4.2 subversion: Development tools, including GCC 4.2 for compiling older C code
  • csh tcsh emacs: shells and editors that people use
  • sun-java6-jre ant ant-optional: Java development environment
  • ntp: for time synchronization
  • libxp-dev: libxp is needed for matlab? Is this true? the matlab binary is statically linked

Hardware Details

farm1-4

  • Dell PowerEdge 650
  • 1x Intel(R) Pentium(R) 4 CPU 3.06GHz (with hyperthreading: two virtual CPUs)
  • 2 GB RAM
  • 2x 120 GB disks
  • 2x Intel e1000 gigabit Ethernet (eth0 connected)
  • BIOS: Revision A05 (except farm1, which is using A04)

farm5-15

  • Dell PowerEdge SC1420
  • 2x Intel(R) Xeon(TM) CPU 3.20GHz (with Hyperthreading: 4 virtual CPUs)
  • 2 GB RAM
  • 2x 160 GB disks
  • 2x Intel e1000 gigabit Ethernet (eth0 connected)
  • BIOS: Revision A03

Special Configurations

  • farm2-4 have a RAID controller card in them. farm1 has this card removed. Besides that, their hardware is identical.
  • farm2 has backups on it, on its second disk (/dev/sdb). These backups are mounted in /archive. As such, it does not have a second disk mounted on /space like the others. It still has the /space directory, to maintain compatability with the matlab symlinks.
  • farm6 has backups located in /space/archive.

Installing Ubuntu Server

Installing Ubuntu on these machines is relatively straightforward.

  1. Grab the Ubuntu Server CD from the Media Lab Ubuntu Mirror
  2. (Optional): I put Ubuntu on a USB key, instead of on a CD, by following the "flexible" directions in the Ubuntu install guide.
  3. Reboot. (Optional): For the USB key: Press F2 to enter bios; change Hard Drive boot order to put USB Flash first.
  4. Use the default partitioning on /dev/sda.
  5. Tell the installer to mount /dev/sdb1 as /space, but not partition it
  6. Install the default Ubuntu Server. Add the OpenSSH package, but no others.
  7. When logged in to the new system, edit /etc/network/interfaces to have the correct static IP address. Edit /etc/resolv.conf to have the right DNS server and search domain (copy from an existing machine)
  8. ifdown eth0; ifup eth0 to use the new configuration
  9. Edit /etc/apt/sources.list to use the media lab Ubuntu mirror, since that is faster.
  10. apt-get update; apt-get upgrade
  11. With the base system installed, install the "important" packages above.
  12. Restore the SSH host keys: cp [backup location]/etc/ssh/ssh_host* /etc/ssh
  13. Fix automount to start at boot: update-rc.d am-utils defaults (Ubuntu bug filed: hopefully this will be unneeded in the future)
  14. Uncomment the line server pool.ntp.org in /etc/ntp.conf to get more accurate NTP synchronization.
  15. copy home directories from a backup
  16. Remove shadow passwords (needed for PMG stuff): pwunconv
  17. Copy passwd file to passwd.base. This gets used to produce the "real" passwd file, by adding users to it: cp /etc/passwd /etc/passwd.base
  18. Edit /etc/passwd.base to remove any user accounts. You can store any local passwords in /etc/passwd.local
  19. Install the PMG scripts and accounts:
cd /
curl http://pmg.csail.mit.edu/internal/new-pmg.tar.gz | tar xzf -
/usr/local/adm/bin/updatemachine


Installing AFS

The following procedure builds an AFS module package specific for the kernel being used on the system. This package can be used on other systems, provided that they have the same kernel. This can save some time on other systems.

  1. sudo apt-get install openafs-krb5 openafs-client krb5-user module-assistant
  2. Accept the defaults. Set the AFS cell to csail.mit.edu
  3. sudo module-assistant prepare
  4. sudo module-assistant auto-install openafs
  5. sudo /etc/init.d/openafs-client restart


Installing Matlab

These directions are stolen from [1]

mkdir /space/matlab
cp /space/backup*/space/matlab7.4/etc/license.dat /space/matlab
cd /space/backup*/space/matlab-download*
./install -t
        (probably don't need -t: -t only necessary when X is not available...)
a       (accept license)
/space/matlab   (where the install should go)
c       (continue)
y       (make links)
        (/usr/local/bin is fine)
y       (begin installation)
matlab  (test it minimally)
quit


Cloning a Ubuntu Server

Installing individual machines using the procedure above is somewhat reasonable, but when installing more than a few servers, you want to automate the task. Here is how I installed Ubuntu across all the servers:

  1. Install and configure one machine with Ubuntu, as it should be replicated across all the machines.
  2. Burn System Rescue CD on a CD or on a USB key (I put in on the same USB key as the Ubuntu installer, so I could choose which to boot)
  3. Reboot your "source" machine using the System Resuce CD. (if you boot with rescuecd docache you will be able to eject the CD/unmount the disk, which can be useful)
  4. Mount the root filesystem: mkdir /mnt/root; mount /dev/sda1 /root
  5. Create a tar archive containing all the files in the root filesystem: cd /mnt/root; tar cpf tmp/image.tar . --exclude ./tmp/image.tar
  6. Reboot back to the main Ubuntu system.
  7. Start an "image server": while true; do nc -l 12345 < /tmp/image.tar; done
  8. Boot the server you want to install the image on to, using the System Rescue CD.
  9. Configure the network: net-setup eth0
  10. Run the script to clone the image: ./clone_farm.sh

The clone script does all the main work. It will need to be customized, depending on what kind of configuration needs to be done. In particular, the parameters to sfdisk will need to be changed, depending on the size of the hard drive. Additionally, there may be configuration steps that need to be customized for each machine. The script I used is:



						
						
Personal tools