Skip to content

Instantly share code, notes, and snippets.

@keith
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keith/d21637ae67f93e8e8452 to your computer and use it in GitHub Desktop.
Save keith/d21637ae67f93e8e8452 to your computer and use it in GitHub Desktop.
Instructions for setting up a Beowulf cluster (use at your own risk)

Installation

  1. Shut down the machine and insert a USB drive with the Ubuntu 10.04 64 bit installation disk.

  2. (Re)Boot the machine and press F12 (on Dell Optiplex 960) during the BIOS loading

  3. Choose USB drive from the list of boot devices.

    • If the machine continues to boot go back to step 2
  4. Once Ubuntu starts up choose 'Install Ubuntu 10.04 LTS' (Desktop LTS ending April 2013)

  5. Choose your timezone and keyboard layout

  6. On the disk selection screen choose 'Specify partitions manually'

    • Delete all the current partitions until the entire disk is classified as 'free space'

    • Click on the free space and choose 'Add'

      • For 250GB disk set the size to '241807' bytes
      • Set 'Use As' to 'Ext4 journaling file system'
      • Set the mount point to '/'
      • Click OK
    • Click on the remaning free space and choose 'Add'

      • Leave the size to be the rest of the disk
      • Set 'Use As' to 'swap area'
      • Click OK
    • Click forward to move on

  7. Set the name and username to 'master'

  8. Set the password

  9. Set the computer name to either 'herot' or 'node#' where # is the node's identifier

  10. Click forward then install to begin the installation.

  11. After installation has completed, click restart now to reboot the machine.

Main node setup

  1. Make sure the machine is connected to the internet

  2. From a terminal (CTRL-ALT-T) run sudo apt-get update; sudo apt-get upgrade; sudo apt-get install nfs-kernel-server nis portmap vim openssh-server

    • During this process you may have to enter 'Y' a few times.
    • When asked for an NIS domain, enter herotnis
    • You can now remove the network cable
  3. From your terminal enter sudo -s to begin a sudo shell

  4. Run vim /etc/hosts

    • Comment out the line that says 127.0.1.1 herot
    • Add new lines that the bottom that say:
      • 192.168.100.1 herot
      • 192.168.100.1xx nodexx (one line for each node)
      • Save and exit the file <ESC>, <SHIFT>-ZZ
  5. Run vim /etc/exports

    • At the end of the file add: /home *(rw,sync,no_subtree_check,no_root_squash,fsid=0)
    • Save and exit the file
  6. If you don't plan on restarting the computer, run service nfs-kernel-server restart; service idmapd restart

  7. Run vim /etc/default/nis

    • Set NISSERVER to master
    • Set NISCLIENT to false
    • Save and exit the file
  8. Run vim /etc/default/nfs-common

    • Set NEED_IDMAPD=yes
    • Set NEED_GSSD=no
    • Save and exit the file
  9. Run vim /etc/yp.conf

    • Add the line: domain herotnis server herot
    • Save and exit the file
  10. Run vim /etc/nfs-kernel-server

    • Set NEED_SVCGSSD=no
    • Save and exit the file
  11. Run vim /etc/ypserv.securenets

    • Add lines for each of the client nodes. EX: 255.255.255.0 192.168.100.1xx
    • Save and exit the file
  12. Run /usr/lib/yp/ypinit -m

    • When it asks for more NIS serviers press CTRL-D
    • Then press Y to confirm the settings
  13. If you don't plan on restarting the computer, run service portmap restart

  14. When you add a new user to the system you must run sudo make -C /var/yp

  15. Exit the sudo shell with CTRL-D (or just open a new shell)

  16. Run ssh-keygen Accept the defaults for all prompts (press return)

  17. Run cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

  18. Open the 'Connection Information' settings by right clicking the networking icon in the top bar

    • Copy down the mac addresses of the 2 network cards and determine which is in which location (the Intel card should be the integrated connection)
  19. Open the 'Edit Connections' settings by right clicking the networking icon in the top bar

    • Under 'wired' delete all current connections

    • Add a new connection named "External - Location" where location is the location of the physical port

      • Check the "Avaliable to all users" checkbox (You may have to authorize this)

      • Enter the mac address of the Ethernet port you want to use for the external connection

      • Go to the IPv4 tab

        • Choose manual for the connection method

        • Click 'add' to add a new line of IP information

          • Enter '10.3.8.83', '255.255.248.0', '10.3.8.1' for the 3 fields
        • For the DNS servers enter '10.2.0.51, 10.2.0.38'

      • Save the connection

    • Add another connection named "Internal - Location"

      • Check the "Avaliable to all users" checkbox (You may have to authorize this)

      • Enter the mac address of the Ethernet port you want to use for the internal connection

      • Go to the IPv4 tab

        • Choose manual for the connection method

        • Click 'add' to add a new line of IP information

          • Enter '192.168.100.1', '255.255.255.0', '192.168.100.1' for the 3 fields
        • For the DNS servers enter '10.2.0.51, 10.2.0.38'

        • Click Routes, and check the 'Use this connection only for resources on it's network' box

      • Save the connection

  20. Restart the machine to make sure everything takes effect

Node Setup

  1. Make sure the machine is connected to the internet

  2. From a terminal (CTRL-ALT-T) run sudo apt-get update; sudo apt-get upgrade; sudo apt-get install nfs-common nis portmap vim openssh-server

    • During this process you may have to enter 'Y' a few times.
    • When asked for an NIS domain, enter herotnis
    • You can now remove the network cable
  3. From your terminal enter sudo -s to begin a sudo shell

  4. Run vim /etc/hosts

    • Remove the line that says 127.0.0.1 nodex

    • Add new lines that the bottom that say:

      • 192.168.100.1 herot
      • 192.168.100.1xx nodexx (one line for each node)
  5. Run vim /etc/fstab

    • Add the line: (Make sure to use tabs between options not spaces) herot:/ /home nfs4 _netdev,nolock,hard,intr 0 0
    • Save and close the file
  6. Run vim /etc/default/nfs-common

    • Set NEED_IDMAPD=yes
    • Set NEED_GSSD=no
  7. If you don't plan on restarting the machine run sudo service idmapd restart

  8. Run vim /etc/passwd

    • Add +:::::: to the end of the file
  9. Run vim /etc/group

    • Add +::: to the end of the file
  10. Run vim /etc/shadow

    • Add +:::::::: to the end of the file
  11. Run vim /etc/yp.conf

    • Add ypserver herot to the end of the file
  12. Open the 'Network Connections' settings by right clicking the networking icon in the top bar

    • Under 'wired' remove all current connections

    • Add a new connection

      • Check the "Avaliable to all users" checkbox (You may have to authorize this)

      • Go to the IPv4 tab

        • Choose manual for the connection method

        • Click add to add a new line of IP information

        • Enter '192.168.100.1xx', '255.255.255.0', '192.168.100.1' where xx is the node identifier for the 3 fields

        • For the DNS servers enter '10.2.0.51, 10.2.0.38'

    • Save the connection

  13. Restart the machine to make sure everything takes effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment