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:

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

2.2.1 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. Adaptive Computing recommends putting $MOABHOMEDIR in a global location, such as /etc/profile, /etc/bashrc, or /etc/environment.

Note

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

> export MOABHOMEDIR=/opt/moab
Note 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.0 documentation, that you have prepared TORQUE for a Moab installation, and that you use a RedHat or CentOS operating system.

To install Moab

  1. Untar the Moab distribution file.
  2. > tar -xzvf moab-7.0.0.tar.gz
  3. Navigate to the unpacked directory.
    > cd moab-7.0.0
  4. Configure the installation package.
  5. > ./configure
    Note

    In some cases, you might want to customize the location of the Moab home directory, the server daemon, the client commands, and configure Moab to use a resource manager when using the ./configure command. For a complete list of options, use ./configure --help.

    Note If you choose to alter the installation locations from the defaults, you must modify the installation steps that follow to reflect your chosen paths.

    An example of some commonly used options for ./configure is provided below.

    > ./configure --prefix=/usr/local --with-homedir=/var/moab --with-torque=/var/spool/torque/
    

    In the above example:

    • The install directory (--prefix option) is configured as /usr/local and the home directory (--with-homedir option) is configured as /var/moab/.
    • The Moab server daemon installs to /usr/local/sbin/.
    • The Moab client commands install to /usr/local/bin/.
    • The Moab tools files install to /usr/local/tools/.
    • Moab is configured to work with the TORQUE resource manager.
    Note

    You can install the Moab init.d script, allowing Moab to start automatically when the machine is booted, by using --with-init. If you are using Ubuntu or a related distribution, you must also run the command  sudo apt-get install chkconfig for the configuration option to work. If you are using RedHat or CentOS, you will still need to activate the init script as shown in step 5 below.

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

  6. Install Moab.
  7. Note Moab must be installed by root. If you cannot install Moab as root, please contact Customer Support.
    > sudo make install

    A default moab.cfg file will be created in the Moab home  /etc directory.

  8. If you did not configure Moab with the --with-init option described in step 3, you must manually copy the init script to start Moab automatically when the system boots. To do so, verify that you are in Moab's top-level directory, copy the moab file from the contrib/init.d directory to the etc/init.d directory, and set the permissions.
  9. > cp contrib/init.d/moab /etc/init.d/
    > chmod 755 /etc/init.d/moab

    Add Moab to the services that start automatically at system boot.

    > chkconfig --add moab
    Note The chkconfig command is RedHat-specific. If you are using a different operating system, consult its documentation for a similar command.
  10. Add the Moab library to the library search path.
  11. > echo '/opt/moab/lib' > /etc/ld.so.conf.d/moab.conf
    > ldconfig
    Note If you receive a warning message that says SQLite's shared library is not a symbolic link, you can safely ignore the message.
  12. Navigate to the directory containing moab.cfg (opt/moab/etc by default).  To allow Moab to send jobs to TORQUE, it must contain the line RMCFG[mgmtnode] SUBMITCMD=/usr/local/bin/qsub. If it doesn't, add it.
  13. ################################################################################
    #
    #  Moab Configuration File for moab-6.1.4
    #
    #  Documentation can be found at
    #  www.adaptivecomputing.com/resources/docs/mwm/7-0/Content/topics/schedBasics/configure.html
    #
    #  For a complete list of all parameters (including those below) please see:
    #  www.adaptivecomputing.com/resources/docs/mwm/7-0/Content/a.fparameters.html
    #
    #  For more information on the initial configuration, please refer to:
    #  www.adaptivecomputing.com/resources/docs/mwm/7-0/Content/topics/installation/initialconfig.html
    #
    #  Use 'mdiag -C' to validate config file parameters
    #
    ################################################################################
    SCHEDCFG[Moab]        SERVER=hostname:42559
    ADMINCFG[1]           USERS=root
    TOOLSDIR              /opt/moab/tools
    LOGLEVEL              3
    ################################################################################
    #
    #  Resource Manager configuration
    #
    #  For more information on configuring a Resource Manager, see:
    #  www.adaptivecomputing.com/resources/docs/mwm/7-0/Content/resourceManagers/rmconfiguration.html
    #
    ################################################################################
    RMCFG[hostname]      TYPE=PBS
    RMCFG[hostname]      SUBMITCMD=/usr/local/bin/qsub
    ################################################################################
    #
    #  Database configuration
    #
    #  For more information on Moab's integrated database see:
    #  www.adaptivecomputing.com/resources/docs/mwm/7-0/Content/a.fparameters.html#usedatabase
    #
    ################################################################################
    USEDATABASE        INTERNAL
    ################################################################################
    #
    # Statistical profiling
    #
    # Use the follwing parameters to enable statistical profiling, see 3.5.1.5:
    # www.adaptivecomputing.com/resources/docs/mwm/7-0/credoverview.html
    #
    ################################################################################
    #USERCFG[DEFAULT]       ENABLEPROFILING=TRUE
    #CLASSCFG[DEFAULT]      ENABLEPROFILING=TRUE
    #QOSCFG[DEFAULT]        ENABLEPROFILING=TRUE
    #GROUPCFG[DEFAULT]      ENABLEPROFILING=TRUE
    #ACCOUNTCFG[DEFAULT]    ENABLEPROFILING=TRUE
  14. Update $PATH manually to include the new default folders. One method of adding the Moab commands to the path for all users is shown in the following example:
  15. > echo 'export PATH=$PATH:/opt/moab/bin:/opt/moab/sbin' > /etc/profile.d/moab.sh 
    > source /etc/profile.d/moab.sh
  16. Copy the license file. It should be placed in the same directory as moab.cfg (which is /opt/moab/etc/ by default) before starting Moab.
  17. > 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
    Note 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, grid management, 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.
  18. The first time you start Moab after installation, use service moab start in RedHat, or /etc/init.d/moab start in another operating system, to verify that Moab will restart on boot.
  19. > service moab start

    Whenever you start Moab after installation, use moab or moabd.

    > moab
    Note > moabd is an alternate method of starting Moab that sets the MOABHOMEDIR and LD_LIBRARY_PATH environment variables before calling the Moab binary. It is safe and recommended if things are not installed in their default locations, but can be used in all cases.
  20. Run showq to verify that Moab is running as it should. The system should report the number of processors available as in the following example:
  21. > showq
     
    active jobs------------------------
    JOBID              USERNAME      STATE PROCS   REMAINING            STARTTIME
     
    0 active jobs               0 of 10 processors in use by local jobs (0.00%)
                                0 of 6 nodes in use by local jobs       (0.00%)
     
    eligible jobs----------------------
    JOBID              USERNAME      STATE PROCS     WCLIMIT            QUEUETIME
     
    0 eligible jobs
     
    blocked jobs-----------------------
    JOBID              USERNAME      STATE PROCS     WCLIMIT            QUEUETIME
     
    0 blocked jobs

2.2.2 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.

2.2.2.1 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.

2.2.2.2 Command Installation when Server and Client Have Diverse Architecture

Moab clients need to be built for each client system that has different architecture from the server. If you are using secret key security (enabled by default), a common secret key must be specified for the client and server. Verify moab-private.cfg is configured properly. For more information, see Configuring Peer-Specific Secret Keys.

Download the Moab build to the client node and then execute the following command to create the Moab client commands tarball for the architecture and operating system:

> ./configure --prefix=<install directory> --with-serverhost=<head node> --with-serverport=<port number>
Note If there is no moab.cfg file installed on the system when making the client commands tarball, the make command creates one using the ./configure arguments or other auto-generated defaults. If there is one already installed, it is packaged into the client commands tarball.

2.2.3 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
    Note 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.

See Also

Copyright © 2012 Adaptive Computing Enterprises, Inc.®