Installing Moab Web Services

Installing Moab Web Services

These instructions describe how to install Moab Web Services (MWS).

To install Moab Web Services

You must deploy Moab Web Services on the same server as Moab Workload Manager.

  1. You must install the dependencies listed in the Requirements section above before you begin to install Moab Web Services.
    1. Set up Tomcat.
    2. RHEL 5 and CentOS 5:

      [root]# rpm -Uvh 'http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm'
      [root]# cd /etc/yum.repos.d
      [root]# wget 'http://www.jpackage.org/jpackage50.repo'
      [root]# yum update
      [root]# yum install tomcat6

      RHEL 6 and CentOS 6:

      [root]# yum update
      [root]# yum install tomcat6
      SLES:
      [root]# zypper ar --refresh -r http://download.opensuse.org/evergreen/11.4/openSUSE:Evergreen:11.4.repo
      [root]# zypper in tomcat6
      [root]# zypper mr -d openSUSE_Evergreen_11.4
    3. Install the 64-bit RPM version of Oracle® Java® 6 Runtime Environment.
    4. Oracle Java 6 Runtime Environment is the only supported Java environment. All other versions of Java, including Oracle Java 7, OpenJDK/IcedTea, GNU Compiler for Java, and so on cannot run Moab Web Services.

      Follow this link to download Java 6. You must download the Linux 64-bit RPM package (jre-6u45-linux-x64-rpm.bin). Run the following:

      [root]# sh jre-6u45-linux-x64-rpm.bin
  2. Make sure that you have first installed and configured MWM as desired (for details, see Installing Moab Workload Manager).
  3. Generate a secret key to be used for communication between MWM and MWS.
  4. [root]# service moab stop
    [root]# dd if=/dev/urandom count=18 bs=1 2>/dev/null | base64 > /opt/moab/etc/.moab.key
    [root]# chown root:root /opt/moab/etc/.moab.key
    [root]# chmod 400 /opt/moab/etc/.moab.key
  5. Make sure you have started MWM.
  6. service moab start
  7. Create the MWS home directory (for more information, see the "Configuration" section of the Moab Web Services Reference Guide), and the etc, hooks, plugins, and log subdirectories. You will need to give the Tomcat user "read" access to all directories and "write" access to the plugins and log directories.
  8. The default location for the MWS home directory is /opt/mws. These instructions assume the default location.

    Here is an sample script for this setup:

    [root]# mkdir -p /opt/mws/etc /opt/mws/hooks /opt/mws/plugins /opt/mws/log
    [root]# chown -R tomcat:tomcat /opt/mws # Depending on your OS, the Tomcat username might be tomcat6.
    [root]# chmod -R 555 /opt/mws
    [root]# chmod u+w /opt/mws/plugins /opt/mws/log
  9. Download the latest MWS build (mws-<version>.tar.gz) from the Adaptive Computing website.
  10. Extract the contents of the MWS download tarball into a temporary directory. For example:
  11. [root]# mkdir /tmp/mws-install
    [root]# cd /tmp/mws-install
    [root]# tar xvzf $HOME/Downloads/mws-7.2.9.tar.gz
    [root]# cd /tmp/mws-install/mws-7.2.9
  12. Set up the MWS configuration file by doing the following:
    1. Copy mws-config-hpc.groovy to the MWS home etc/ sub-directory, and rename it to mws-config.groovy.
    2. [root]# cp mws-config-hpc.groovy /opt/mws/etc/mws-config.groovy
    3. In the /opt/mws/etc/mws-config.groovy file, make the following changes:
      • Modify the moab.secretKey setting to match the MWM secure key you generated earlier (contained in /opt/moab/etc/.moab.key).
      • Change the default MWS password (auth.defaultUser.password) to a password of your choosing.
      • (Optional) Change the default MWS username (auth.defaultUser.username) to any value you like.
      • [root]# nano /opt/mws/etc/mws-config.groovy
        
        // Change these to be whatever you like.
        auth.defaultUser.username = "admin"         
        auth.defaultUser.password = "adminpw"

        If you do not change auth.defaultUser.password, your MWS will not be secure (because anyone reading these instructions would be able to log into your MWS). Here are some tips for choosing a good password.

      • If you are using Moab Accounting Manager, you must set the mam.server, mam.port, and mam.secretKey parameters to your MAM host name, port number, and the secret key (obtained from the token.value parameter in the /opt/mam/etc/site.conf file), respectively.
      • ...
        mam.server = "hostname"
        mam.port = 7112
        mam.secretKey = "a1B2c3D4e5F6g7H8i9"
      • Add the following parameters to configure an MWS connection to your LDAP server:
      • ldap.server  = "192.168.0.5"
        ldap.port = 389
        ldap.baseDNs = ["dc=acme,dc=com"]
        ldap.bindUser = "cn=Manager,dc=acme,dc=com"
        ldap.password = "*****"
        ldap.directory.type = "OpenLDAP Using InetOrgPerson Schema"

        In this example, you see dc=acme,dc=com. "acme" is only used as an example to illustrate what you would use as your own domain controller if your domain name was "acme.com." You should replace any references to "acme" with your own organization's domain name.

        If you followed the Adaptive Computing tutorial, "Setting up OpenLDAP on CentOS 6," your ldap.directory.type should be set to "OpenLDAP Using InetOrgPerson Schema." However, the use of other schemas is supported. For more information see "LDAP Configuration Using mws-config.groovy" in the Moab Web Services Reference Guide.

        To see how to configure a secure connection to the LDAP server, see "Connection to LDAP" in the Moab Web Services Reference Guide.

      • In /opt/mws/etc/mws-config.groovy, add the grails.mongo.username and grails.mongo.password parameters to the MongoDB mws_user credentials you set in Installation overview.
        ...
        grails.mongo.username = "mws_user"
        grails.mongo.password = "secret3"
    4. Give the Tomcat user "read" access to the /opt/mws/etc/mws-config.groovy file.
    5. chown tomcat:tomcat /opt/mws/etc/mws-config.groovy
      chmod 400 /opt/mws/etc/mws-config.groovy
  13. Add the following line to the end of /etc/tomcat6/tomcat6.conf:
  14. CATALINA_OPTS="-DMWS_HOME=/opt/mws -Xms256m -Xmx3g -XX:MaxPermSize=384m -Dfile.encoding=UTF8"
    JAVA_HOME="/usr/java/latest"

    Some Linux distributions use /etc/default/tomcat6 or /etc/sysconfig/tomcat6 instead of /etc/tomcat6/tomcat6.conf.

  15. Start Tomcat and deploy mws.war.
  16. [root]# chkconfig tomcat6 on
    [root]# service tomcat6 stop
    [root]# cp /tmp/mws-install/mws-7.2.9/mws.war /var/lib/tomcat6/webapps
    [root]# service tomcat6 start
  17. Navigate to http://localhost:8080/mws/ in a web browser to verify that MWS is running (you will see some sample queries and a few other actions).
  18. Log in to MWS to verify that your credentials are working. (Your login credentials are the auth.defaultUser.username and auth.defaultUser.password values you set in the /opt/mws/etc/mws-config.groovy file.)
  19. Click to enlarge

    If you encounter problems, or if the application does not seem to be running, see the steps in the "Troubleshooting Installation" section of the Moab Web Services Reference Guide.

Related topics 

© 2014 Adaptive Computing