6.21 Upgrading Moab Web Services

This topic provides instructions to upgrade Moab Web Services to the latest release version. Depending on which version of MWS you are presently running, upgrade instructions may vary.

You must deploy Moab Web Services on the same host as Moab Server (Moab Server Host). For documentation clarity, these instructions refer to the host for Moab Server and MWS Server as the MWS Server Host.

6.21.1 Before You Upgrade

MWS requires Tomcat 7, 8. It is also recommended that you upgrade to Java 8 and MongoDB 2.4.x.

6.21.1.A Upgrade to Tomcat 7

Tomcat 7, 8 is required to run MWS 9.0 and later. Tomcat 7 is installed by default. No further action is needed.Tomcat 7 is installed by default. No further action is needed.

On the MWS Server Host, do the following to install Tomcat 7:

  1. Check your Tomcat version.
    [root]# rpm -qa tomcat
    tomcat-7.0.33-4.el6.noarch
  2. If your Tomcat version is prior to 7, upgrade Tomcat.
    [root]# service tomcat6 stop
    [root]# chkconfig tomcat6 off
    [root]# yum install tomcat

6.21.1.B Upgrade to Java 8

Oracle Java 8 Runtime Environment is the recommended Java environment, but Oracle Java 7 is also supported. All other versions of Java, including OpenJDK/IcedTea, GNU Compiler for Java, and so on cannot run MWS.

If you wish to upgrade to Java 8, refer to the 6.13.2.A Install Java instructions.

6.21.1.C Upgrade the MongoDB

It is highly recommended that you perform a full database backup before updating your database. This can be done using the mongodump utility documented in the MongoDB documentation.

On the host where the MWS MongoDB database resides, do the following:

  1. Check your MongoDB version.
    [root]# mongo --version
  2. If your MongoDB version is prior to 2.4, upgrade the database.

    When upgrading, you must add 'exclude=mongodb-org mongodb-org-server' to the /etc/yum.repos.d/mongodb.repo file to maintain 2.4.x. Depending on your MongoDB version, the file path may be /etc/yum.repos.d/10gen.repo.

    [mongodb]
    name=MongoDB Repository
    baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/
    gpgcheck=0
    enabled=1
    exclude=mongodb-org mongodb-org-server
    [root]# zypper ar --refresh -r http://download.opensuse.org/repositories/server:/database/SLE_12/server:database.repo 
    [root]# zypper install mongodb 
    [root]# systemctl enable mongodb.service 
    [root]# systemctl start mongodb.service

6.21.2 Upgrade Moab Web Services

You must complete the tasks in 6.21.1 Before You Upgrade before upgrading MWS.

On the MWS Server Host, do the following:

  1. Create a directory for which you will extract the contents of the MWS download tarball. For example:
    [root]# mkdir /tmp/mws-install
    [root]# cd /tmp/mws-install
  2. Download the latest MWS build (mws-<version>.tar.gz) from the Adaptive Computing website.

    The variable marked <version> is the desired version of the suite; for example, 9.0.3.

  3. In the directory you created earlier, extract the contents of the MWS download tarball and then change directory into the extracted directory. For example:
    [root]# tar xvzf mws-9.0.3.tar.gz
    [root]# cd mws-9.0.3
  4. Deploy the updated mws.war to Tomcat.

    If your prior MWS version had tomcat 6, you should have stopped the tomcat6 service when you upgraded to Tomcat 7 (required). See 6.21.1.A Upgrade to Tomcat 7 for more information.

    [root]# service tomcat stop
    [root]# rm -rf /usr/share/tomcat/webapps/mws /usr/share/tomcat/webapps/mws.war
    [root]# cp mws.war /usr/share/tomcat/webapps/
    [root]# chown -R tomcat:tomcat /usr/share/tomcat/webapps/mws.war
    [root]# systemctl stop tomcat.service
    [root]# rm -rf /usr/share/tomcat/webapps/mws /usr/share/tomcat/webapps/mws.war
    [root]# cp mws.war /usr/share/tomcat/webapps/
    [root]# chown -R tomcat:tomcat /usr/share/tomcat/webapps/mws.war
    [root]# systemctl stop tomcat.service
    [root]# rm -rf /usr/share/tomcat/webapps/mws /usr/share/tomcat/webapps/mws.war
    [root]# cp mws.war /usr/share/tomcat/webapps/
    [root]# chown -R tomcat:tomcat /usr/share/tomcat/webapps/mws.war
  5. Back up the MWS home directory and create the required destination directory structure.
    [root]# cp -r /opt/mws /opt/mws-9.0-backup
    [root]# mkdir -p \
       /opt/mws/etc/mws.d \
       /opt/mws/hooks \
       /opt/mws/log \
       /opt/mws/plugins \
       /opt/mws/spool/hooks \
       /opt/mws/utils
    [root]# chown -R tomcat:tomcat /opt/mws
    [root]# chmod -R 555 /opt/mws
    [root]# chmod u+w \
       /opt/mws/log \
       /opt/mws/plugins \
       /opt/mws/spool \
       /opt/mws/spool/hooks \
       /opt/mws/utils
  6. Copy the extracted utility files to the utility directory created above and give the tomcat user ownership of the directory.
  7. [root]# cd utils
    [root]# cp * /opt/mws/utils
    [root]# chown tomcat:tomcat /opt/mws/utils/*
  8. Merge the changes in the /tmp/mws-install/mws-9.0.3/mws-config.groovy file into your existing /opt/mws/etc/mws-config.groovy.
    1. Depending on your current MWS version, do the following as needed:

      • If Insight is part of your configuration:
        • add the health check information for the Insight Server (insight.server, insight.command.port, insight.command.timeout.seconds); prior to version 9.0.2.

          insight.server is the DNS name of the host on which the Insight Server is running.

        • add the Insight configuration information (dataSource_insight.username, dataSource_insight.password, dataSource_insight.url); prior to version 9.0.

          dataSource_insight.url is "jdbc:postgresql://<insight database host>:5432/moab_insight"; where <insight database host> is the IP address or name of the host on which the Insight PostgreSQL Database Server is running.

      • If Viewpoint is part of your configuration, register Viewpoint as client; prior to version 9.0
      • Change the moab.messageQueue.port to 5570; prior to version 8.0
      • Configure and appender for the audit log; prior to version 8.0
      • Change the layout to "new com.ace.mws.logging.ACPatternLayout()" for the output format of each log entry; prior to version 8.0
      • Remove the mws.suite parameter and the mam.* parameters (they have been moved to /opt/mws/etc/mws.d/); prior to version 8.0
    2. Confirm the value for moab.messageQueue.secretKey matches the value located in /opt/moab/etc/moab-private.cfg; if you have not yet configured a secret key, see Secure communication using secret keys.
  9. Merge any changes supplied in the new mws-config-hpc.groovy file in to your installed /opt/mws/etc/mws.d/mws-config-hpc.groovy.
  10. Remove unused MWS plugins. Unused plugins must be removed as their presence will prevent MWS from starting up.
    • Remove all plugins from /opt/mws/plugins except for the diagnostics, native, and power-management plugins.
      [root]# cd /opt/mws/plugins
      [root]# rm plugins-reports.jar plugins-storage.jar plugins-vcenter.jar
  11. Verify the Tomcat user has read access to the /opt/mws/etc/mws-config.groovy and /opt/mws/etc/mws.d/mws-config-hpc.groovy file.
  12. Verify the following lines are added to the end of /etc/tomcat/tomcat.conf.
    CATALINA_OPTS="-DMWS_HOME=/opt/mws -Xms256m -Xmx3g -XX:MaxPermSize=384m -Dfile.encoding=UTF8"
    JAVA_HOME="/usr/java/latest"
  13. Upgrade the schema of the mws database in MongoDB.
  14. You must perform this step, regardless of whether you upgraded MongoDB to version 2.4.x.

    Run the database migration script provided with MWS. (It is safe to run this script more than once. If for any reason, errors occur during the execution of the script, run it again.)

    [root]# mongo -u mws_user mws /opt/mws/utils/db-migrate.js -p

    The script might take several minutes to execute.

  15. Start Tomcat.

    You will need to start the "tomcat" service. Starting the "tomcat6" service will install the wrong version of Tomcat.

    [root]# service tomcat start
    [root]# systemctl start tomcat.service
    [root]# systemctl start tomcat.service
  16. Visit http://localhost:8080/mws/ in a web browser to verify that MWS is running again.
  17. You will see some sample queries and a few other actions.

  18. Log into MWS to verify configuration. (The credentials are the values of auth.defaultUser.username and auth.defaultUser.password set in /opt/mws/etc/mws-config.groovy.)
  19. If you encounter problems, or if MWS does not seem to be running, see the steps in 6.59 Moab Web Services Issues.

© 2017 Adaptive Computing