You are here: Manual Installation > Upgrading > Upgrading Moab Web Services

2.22 Upgrading Moab Web Services

This topic provides instructions to upgrade Moab Web Services to the latest release version.

These instructions assume you are upgrading MWS from version 8.0 or later. If you are upgrading MWS from a version prior to 8.0, contact your Adaptive Computing account manger for more information.

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.

2.22.1 Before You Upgrade

This section provides instructions for tasks that need to be performed before you upgrade Moab Web Services.

In this section:

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

2.22.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 2.5.2.A Install Java instructions.

2.22.1.C Upgrade to MongoDB 3.2.x

Beginning with version 9.1.0, Moab Web Services requires MongoDB 3.2.x.

On the MWS MongoDB host, do the following:

  1. Check your MongoDB server version.
    [root]# rpm -qa | grep mongo
  2. If the MongoDB server version is older than 3.2.x, then you will need to upgrade the databases. See 2.18 Upgrading to MongoDB 3.2.x for more information.

2.22.2 Back up the MongoDB Databases

This procedure is only applicable if you did not have to upgrade the MongoDB databases earlier in this topic. See 2.22.1.C Upgrade to MongoDB 3.2.x for more information.

On the MWS MongoDB server host, do the following:

  1. Stop all services that are using the MongoDB databases.
  2. Back up the MongoDB databases.
    [root]# cd /root
    [root]# mongodump -u admin_user -p secret1
  3. Restart the services.

2.22.3 Upgrade Moab Web Services

You must complete the tasks in 2.22.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 from the Adaptive Computing website.
  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.1.1.1.tar.gz
    [root]# cd mws-9.1.1.1
  4. Deploy the updated mws.war to Tomcat.
    [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-<version>-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

    Where <version> if the product version being backed up.

  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.1.1.1/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:
        • remove the Insight PostgreSQL information (dataSource_insight.username, dataSource_insight.password, dataSource_insight.url); prior to version 9.1.

          Version 9.1 removed the Insight PostreSQL database.

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

      • If Viewpoint is part of your configuration, register Viewpoint as client; prior to version 9.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 all plugins from /opt/mws/plugins except for those that you may have created. The presence of obsolete plugins can prevent MWS from starting up. Out-of-the-box plugins will be recreated when MWS is restarted.
    [root]# cd /opt/mws/plugins
    [root]# rm *.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"

    MaxPermSize is ignored using Java 8; and therefore can be omitted.

  13. Start Tomcat.

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

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

  16. 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.)
  17. If you encounter problems, or if MWS does not seem to be running, see the steps in 5.3 Moab Web Services Issues.

© 2017 Adaptive Computing