Conventions

2.2 Installing Moab

After reading this section you will be able to:

This section assumes a working knowledge of Linux or Unix based operating systems, including use of commands such as:

Some operating systems use different commands (such as "gmake" and "gtar" instead of "make" and "tar").

2.2-A Moab Server Installation

Before installing Moab, view the Prerequisites to verify your platform is supported.

By default, the Moab home directory is configured as /opt/moab, the Moab server daemon is installed to /opt/moab/sbin/, and the client commands are installed to /opt/moab/bin/. $MOABHOMEDIR is the location of the etc/, log/, spool/, and stat/ directories and the moab.lic file. The default location for moab.cfg and moab-private.cfg is /opt/moab/etc/ and is the recommended location for the license and configuration files.

$MOABHOMEDIR is required whenever the Moab binary is started or when client commands are used. It is recommended that you insert the $MOABHOMEDIR environment variable and its value into a global environment variable profile by editing the /etc/profile, /etc/bashrc, or /etc/environment files (depending on your installation). Doing this will ensure that this environment variable is available to all users on the system without any action on their part.

All Moab executables are placed in $MOABHOMEDIR/bin or $MOABHOMEDIR/sbin (such as /opt/moab/bin/).

If you need to export your Moab home directory, run the following:

> export MOABHOMEDIR=/opt/moab

Moab contains a number of architectural parameter settings that you can adjust for non-standard installations. See Appendix D - Adjusting Default Limits and make any needed changes prior to using make install.

The following installation assumes that you have done a standard TORQUE installation according to the TORQUE 4.2 documentation, and that you have prepared TORQUE for a Moab installation, and that you use a RedHat or CentOS operating system.

To install Moab

The following instructions demonstrate installing Moab on a Red Hat 6 or CentOS 6 system. Run each step as the root user.

  1. Install the required dependencies and packages.
  2. RHEL 5 and CentOS 5

    [root]# yum update
    [root]# yum install make curl unixODBC unixODBC-devel perl-CPAN libxml2-devel

    RHEL 6, CentOS 6, and Scientific Linux 6:

    [root]# yum update
    [root]# yum install make libcurl unixODBC unixODBC-devel perl-CPAN libxml2-devel

    SLES:

    [root]# zypper update
    [root]# zypper install make curl unixODBC unixODBC-devel libxml2-devel
  3. Run each of the following commands in order.
  4. [root]# tar xzvf moab-7.2.9-xxxx.tar.gz (where xxxx can be one of: generic, generic-odbc, torque, torque-odbc)
    [root]# cd moab-7.2.9
    [root]# ./configure <option>

    In some cases, you might want to customize the location of the Moab home directory, the server daemon, and the client commands. You can make these configurations by using the ./configure options (For a complete list of ./configure options, use ./configure --help.). We strongly recommend that you configure Moab with the --with-init and --with-profile options. If you are using TORQUE as your resource manager, use the --with-torque option. If you are installing Moab Accounting Manager, configure Moab with the --with-am option.

    Here are some examples of commonly used ./configure options:

    Option Description Example
    --with-flexlm Causes Moab to install the license.mon.flexLM.pl script in the /opt/moab/tools directory. For more information about this script, see Interfacing to FLEXlm.
    [root]# ./configure --with-flexlm
    --with-homedir

    Specifies the location of the Moab configuration directory and the MOABHOMEDIR environment variable. The default location is /opt/moab.

    MOABHOMEDIR is automatically set on some distributions during installation, when the --with-profile option is enabled.

    [root]# ./configure --with-homedir=/var/moab

    The Moab home directory will be /var/moab instead of the default /opt/moab.

    --with-init

    Enables the installation of a distribution-specific /etc/init.d/moab service startup script.

    This option is required if you want to install this script onto a new system. If you do not set this option, you must manually set up the Moab daemon service.

    The startup script is located at OS/EL/etc/init.d/moab.

    The TORQUE and Moab initialization scripts are provided in the contrib/init.d directory as a courtesy and may be modified at your discretion to work on your system.

    [root]# ./configure --with-init
    --prefix

    Specifies the location of the binaries and libraries of the Moab install.

    The default location is /opt/moab.

    [root]# ./configure --prefix=/usr/local
    --with-profile

    Enables the installation of distribution-specific /etc/profile.d/moab.[c]sh setup script for bash and cshell.

    The MOABHOMEDIR, PERL5LIB, PATH and MANPATH environment variables are setup to specify where the new moab configuration, scripts, binaries and man pages reside. If you do not set this option, these scripts are not installed, and you must manually perform this set up.

    The environment setup scripts are located at OS/EL/etc/profile.d/moab.[c]sh.

    [root]# ./configure --with-profile
    --with-am

    Specifies that you want to configure Moab with Moab Accounting Manager. <type> can be mam or native.

    There is a similar --with-torque option that configures Moab with TORQUE, but you do not need to specify this option if you install the "torque" tarball version.

    [root]# ./configure --with-am=<type>
  5. (Only if you are using green computing, or if you are using a resource manager other than TORQUE) Run the make perldeps command to install the necessary perl modules using CPAN. When first running CPAN, you will be asked for configuration information. It is recommended that you choose an automatic configuration. You will be prompted to provide input during module installation; running the make perldeps command with a script is not recommended.
  6. [root]# make perldeps
  7. Install Moab.
  8. [root]# make install
  9. ONLY if you are installing on non-RHEL distributions, copy the appropriate init.d file, set the permissions on it, and configure Moab to start automatically at system boot.
  10. * If SLES distribution, do the following *
    [root]# cp OS/SUSE/etc/init.d/moab /etc/init.d/moab
    				
    [root]# chmod 755 /etc/init.d/moab
    [root]# chkconfig --add moab
    				
    * If chkconfig doesn't work, try the following *
    [root]# update-rc.d moab defaults
  11. Modify the Moab configuration file.
  12. [root]# vim /opt/moab/etc/moab.cfg

    Do the following:

    1. Verify that SUBMITCMD is set up for your TORQUE resource manager (change RMCFG<hostname> to RMCFG[torque]), and that it points to a valid qsub executable. For example:
    2. RMCFG[torque] SUBMITCMD=/usr/local/bin/qsub
      ADMINCFG[1] USERS=root,tomcat
    3. Make sure that you set ENABLEPROXY to TRUE:
    4. ADMINCFG[1] ENABLEPROXY=TRUE
  13. If you ran ./configure with the --with-profile option, source the following file to add the MWM home directory to your current shell $PATH environment.
  14. [root]# . /etc/profile.d/moab.sh
  15. Copy your license file into the same directory as moab.cfg (/opt/moab/etc/ by default). For example:
  16. [root]# cp moab.lic $MOABHOMEDIR/etc/moab.lic

    To verify the current status of your license, use moab --about.

    Moab checks the status of the license every day just after midnight. At 60 and 45 days before, and daily from 30 days before license expiration to and including the license expiration date, Moab sends an e-mail to all level 1 administrators informing them of the pending Moab license expiration. A log record is also made of the upcoming expiration event. For the notifications to occur correctly, administrator e-mail notification must be enabled and moab.cfg must contain e-mail addresses for level 1 administrators:

    ADMINCFG[1] USERS=u1,u2,u3[,...]
    
    USERCFG[u1] [email protected]
    USERCFG[u2] [email protected]
    USERCFG[u3] [email protected]
    
    MAILPROGRAM DEFAULT

    Moab has an internal license that enables some functionality for a limited time for evaluation purposes. If you want to enable adaptive energy management, dynamic multi-OS provisioning, and other features, or if you want to evaluate Moab for a longer period, contact evaluation support. Use mdiag -S -v to see which features your license supports.

  17. Install and connect MongoDB. See Connecting Moab to MongoDB for instructions.
  18. Start Moab.
  19. [root]# service moab start

    If Moab fails to start because libodbc.so.1 cannot be found and libodbc.so.2 is available on your system, you must create a symbolic link from libodbc.so.1 to libodbc.so.2.

    [root]# ln -s /usr/lib64/libodbc.so.2 /usr/lib64/libodbc.so.1

    If Moab fails to start because libodbc.so.2 cannot be found and libodbc.so.1 is available on your system, you must create a symbolic link from libodbc.so.2 to libodbc.so.1.

    [root]# ln -s /usr/lib64/libodbc.so.1 /usr/lib64/libodbc.so.2

    For more information, see the Unix ODBC documentation.

  20. Submit a sleep job as a non-root user and verify the job is running.
  21. [root]# su - user
    [user]$ echo sleep 150 | msub
    [user]$ showq

2.2-B Moab Client Installation

After installing the Moab server on the head node, Moab can create a "client commands-only" tarball you can use to install just the Moab client commands on a login/client node. The tarball allows you to install the binary Moab client command files, with their man pages, using a single tar command. In addition, the tarball contains a moab.cfg file configured with the Moab host name and port number so you do not have to manually configure this information on the login/client node.

Command Installation when Server and Client Have Similar Architecture

After installing Moab on the head node, enter the following command:

> make client-pkg

A tarball is created with the name "client.tgz". Copy the tarball to the root directory of the client node, log in to the client node as root, and install the client commands using the following command:

> tar xvf client.tgz

The Moab client commands are now available on the login/client node.

Command Installation when Server and Client Have Diverse Architecture

By default, Moab client commands (from any build) are able to communicate and authenticate with any server. This can be a security risk depending on the type of environment in which Moab is running. If your site needs secure communication and authentication between Moab client commands and Moab server, it is recommended that you create a site-specific key and place it in the same directory as your moab.cfg file. By default, this is $MOABHOMEDIR/etc/.moab.key. When the Moab server and client commands detect the presence of those two files they will use the key in those files to authenticate and communicate, instead of the default key.

For more details, please see Mauth Authentication.

2.2-C Preparing TORQUE for a Moab Installation

Several steps must be taken before installing Moab with TORQUE to ensure that they will communicate properly.

To prepare TORQUE for a Moab Installation

  1. Edit the nodes file to list all of your nodes somewhere inside of it.
  2. > vim /var/spool/torque/server_priv/nodes
    ...
    node04
    node05
    node06
    ...
  3. Copy pbs_server to the etc/init.d/ directory.
  4. > cp contrib/init.d/pbs_server /etc/init.d
  5. Configure TORQUE to start automatically when the system boots.
  6. > chkconfig --add pbs_server

    The chkconfig command is RedHat-specific. If you are using a different operating system, consult its documentation for a similar command.

  7. Specify a TORQUE setup user.
  8. > ./torque.setup root
  9. Stop TORQUE and restart it to verify that the startup script runs correctly.
  10. > qterm
    > /etc/init.d/pbs_server start

    You can verify that the installation was successful by running the following command:

    > pbsnodes

    TORQUE returns information about each node. If TORQUE is properly configured, each node should report state = free to indicate that the server and moms are communicating.

Related topics 

© 2014 Adaptive Computing