Thursday, October 2, 2014

Installing TORQUE and Maui on a Rocks Cluster

Download Torque:
  1. http://www.adaptivecomputing.com/download/torque/torque-5.0.0-1_43d8f09a.tar.gz
Download Maui
  1. http://www.adaptivecomputing.com/download/mauischeduler/maui-3.3.1.tar.gz
  2. NOTE: You will need an account to download maui from adaptivecomputing.com

Install Torque:

On the RocksCluster Headnode - 
  1. As root move to the directory containing the tar files for torque.
  2. Execute the following commands to change the folder/package name
    1. Copy torque-5.0.0-1_43d8f09a.tar.gz to /tmp and extract
      1. tar xvf torque-5.0.0-1_43d8f09a.tar.gz
      2. mv torque-5.0.0-1_43d8f09a torque-5.0.0
      3. tar czvf torque-5.0.0.tar.gz torque-5.0.0
      4. rm -rf torque-5.0.0-1_43d8f09a torque-5.0.0
      5. tar xvf torque-5.0.0.tar.gz
    2. yum --enablerepo=base install boost-devel
    3. cd ./torque-5.0.0
    4. ./configure
    5. make
    6. make install
    7. cp contrib/init.d/trqauthd /etc/init.d/
    8. cp contrib/init.d/pbs_server /etc/init.d/
    9. chkconfig --add trqauthd
    10. chkconfig --add pbs_server
    11. echo /usr/local/lib > /etc/ld.so.conf.d/torque.conf
    12. ldconfig
    13. service trqauthd start
  3. Verify /var/spool/torque/server_name exists with the server hostname
  4. Run Torque.Setup
    1. ./torque.setup root 
    2. qterm
    3. pbs_server
    4. qmgr -c 'p s'
  5. Make client packages
    1. Install rpmbuild 
      1. yum --enablerepo=base install rpmdevtools rpmlint
      2. Switch to a regular user account and run
        1. rpmdev-setuptree
    2.  Build Torque RPMS
      1. Switch to a regular user account and run
        1. rpmbuild -tb /tmp/torque-5.0.0.tar.gz
    3. Switch to root and run move the following RPMS from /state/partition1/home/<user_name>/rpmbuild/RPMS/x86_64/ to /export/rocks/install/contrib/6.1.1/x86_64/RPMS
      1. torque-5.0.0-1.adaptive.el6.x86_64.rpm
      2. torque-client-5.0.0-1.adaptive.el6.x86_64.rpm
    4. Create extend-compute.xml
      1. In the /export/rocks/install/site-profiles/6.1.1/nodes run the following
        1. cp skeleton.xml extend-compute.xml
      2. Edit the extend-compute.xml file
        1. In the packages section add
          1. <package>torque</package>
          2. <package>torque-client</package>
        2. In the post section add
          1. echo <your_hostname.local> > /var/spool/torque/server_name
          2. echo <your_hostname.yourdomain> > /var/spool/torque/mom_priv/config
    5. Create distro
      1. cd to /export/rocks/install
      2. Run the following
        1. rocks create distro
Install Maui:
  1. As root move to the directory containing the tar files for maui.
  2. Execute the following commands
    1. tar xvf maui.3.3.1.tar.gz
    2. cd maui.3.3.1
    3. ./configure
    4. make 
    5. make install
  3. Move the following files
    1. mv /usr/local/maui/sbin/* /usr/local/sbin
    2. mv /usr/local/maui/bin/* /usr/local/bin
    3. rmdir /usr/local/maui/sbin /usr/local/maui/bin
    4. cp /tmp/maui-3.3.1/etc/maui.d /etc/init.d/maui
  4. Verify the following
    1. /etc/init.d/maui
      1. MAUI_PREFIX=/usr/local
  5. Run the following
    1. chkconfig --add maui
    2. service maui start
  6. Reboot the head node
Provision Compute Nodes:
      1. Follow compute node provisioning from Installing Rocks Cluster
      2. Run the following for each node
        1. qmgr -c 'create node compute-<x-x>.local np=<number_of_processors>'
        2. pbsnodes -c <compute-<x-x>.local
      3. Reboot the head node then compute nodes
      Create Test Job:
      1. As a user create a test job called sleep.job with execute permissions and the following text inside
      #!/bin/sh
      for i in `seq 1 60` ; do
              echo $i
              sleep 1
      done
      Run Test Job:

      1. Run the following 
        1. qsub sleep.job
      2. Executing qstat should show the job in the queue
      3. As root diagnose -n / pbsnodes -a should both show the nodes
      4. After ~1 Min the files sleep.job.e<job_number> and sleep.job.o<job_number> should appear in the same directory sleep.job is located in.
        1. sleep.job.e<job_number> should be empty
        2. sleep.job.o<job_number> should have seq 1 60 in it

      Friday, September 26, 2014

      Rocks Cluster - Install On VMWare Workstation

      Setup of Login-Node and Compute Node Utilizing Rocks Clusters 6.1.1 (SandBoa) and CentOS 6.5

      Download Page:
      http://www.rocksclusters.org/wordpress/?page_id=477


      1. In VMWare Workstation:
      2. Create a blank VM using typical settings and the Rocks ISO/CD selecting Linux/CentOS 64-bit as the operating system.
      3. Customize the hardware of the VM giving it a NAT Network Adapter as well as a Host-only Network adapter. 
      4. Virtual Network Settings for 1st Adapter
        1. VMNet10 - Host Only
        2. IP 10.1.1.0
        3. Subnet Mask 255.255.255.0
        4. Disable DHCP
      5. Virtual Network Settings for 2nd Adapter
        1. VMNet8 - NAT
        2. IP 192.168.74.0
        3. Subnet Mask 255.255.255.0
        4. Disable DHCP


      Create HeadNode:
      Upon boot, the Rocks Clusters splash screen should appear. Type build to launch to begin setup.

      Rolls - 

      1. For this installation we will select the following rolls:
        1. base
        2. ganglia
        3. kernel
        4. os
        5. web-server

      Cluster Information - 
      Add information as applicable.

      1. Ethernet for Public Network - 
        1. eth1 - Public IP address - Used to communicate outside of the cluster
        2. IP             192.168.74.80
        3. Netmask  255.255.255.0
      2. Ethernet for Private Network
        1. eth0 is for the private IP address used within the cluster
        2. IP:            10.1.1.1
        3. Netmask: 255.255.255.0
      3. Misc. Network
        1. Gateway  192.168.74.2
        2. DNS        192.168.74.80

      Once the system comes up, ensure VM settings still have

      1. Network Device 1 as VMNet10 - Host Only
      2. Network Device 2 as NAT.

      At this point it's recommended to install VMWare tools and check connectivity to the internet.

      To run yum update use the following command -

      1. yum --enablerepo=updates update 

      To add a user complete the following -

      1. login as root
      2. useradd <username>
      3. passwd <username>
      4. rocks sync users
      Install VMWare Tools and restart
      Now would be a good time to clone the VM for troubleshooting.
      NOTE: If installing Torque/Maui do this before building compute nodes.


      Create Compute-0-0:

      1. Create a new VM with the same VMNet10 network adapter.
      2. On the head node run insert-ethers and select compute
      3. Boot compute-0-0 vm
      4. Compute-0-0 should PXE boot and automatically begin provisioning. Once there is a (*) next to the device press F8 to quit insert-ethers and type rocks-console compute-0-0 to view the installation in progress.
      5. Repeat this as many times as necessary for additional compute nodes.
      6. NOTE: Updating compute nodes with yum could lead to problems.

      Create Login-0-0:

      1. Create a new VM with the same VMNet10 network adapter and NAT network adapter
      2. On the head node run insert-ethers and select login
      3. Boot login-0-0 vm
      4. Login-0-0 should kickstart and automatically begin provisioning. Once there is a (*) next to the device press f8 to quit insert-ethers and type rocks-console login-0-0 to view the installation in progress.
      5. On headnode execute the following commands 
        1. # rocks set host interface ip login-0-0 iface=eth1 ip=192.168.74.81
        2. # rocks set host interface subnet login-0-0 eth1 public
        3. # rocks add host route login-0-0 192.168.74.81 eth1 netmask=255.255.255.0
        4. # rocks sync config
        5. # rocks sync host network login-0-0
      6. Update the login node with  yum --enablerepo=updates update