(Click to open topic with navigation)
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.
MWS requires Tomcat 7. It is also recommended that you upgrade to Java 8 and MongoDB 2.4.x.
Tomcat 7 is required to run MWS 9.0 and later.
On the MWS Server Host, do the following:
[root]# rpm -qa tomcat tomcat-7.0.33-4.el6.noarch
[root]# service tomcat6 stop [root]# chkconfig tomcat6 off [root]# yum install tomcat
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.
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:
[root]# mongo --version
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
2.20.2 Upgrade Moab Web Services
You must complete the tasks in 2.20.1 Before You Upgrade before upgrading MWS.
On the MWS Server Host, do the following:
[root]# mkdir /tmp/mws-install [root]# cd /tmp/mws-install
The variable marked <version> is the desired version of the suite; for example, 9.0.2.
[root]# tar xvzf mws-9.0.2.tar.gz [root]# cd mws-9.0.2
If your prior MWS version had tomcat 6, you should have stopped the tomcat6 service when you upgraded to Tomcat 7 (required). See 2.20.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]# 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
[root]# cd utils [root]# cp * /opt/mws/utils [root]# chown tomcat:tomcat /opt/mws/utils/*
Depending on your current MWS version, do the following as needed:
insight.server is the DNS name of the host on which the Insight Server is running.
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.
// Any settings in this file may be overridden by any // file in the mws.d directory. // Change these to be whatever you like. auth.defaultUser.username = "moab-admin" auth.defaultUser.password = "changeme!" // Moab Workload Manager configuration. moab.secretKey = "<ENTER-KEY-HERE>" moab.server = "localhost" moab.port = 42559 moab.messageDigestAlgorithm = "SHA-1" // MongoDB configuration. // grails.mongo.username = "mws_user" // grails.mongo.password = "<ENTER-KEY-HERE>" // Insight configuration. // dataSource_insight.username = "mws" // dataSource_insight.password = "changeme!" // dataSource_insight.url = "jdbc:postgresql://127.0.0.1:5432/moab_insight" // insight.server = "localhost" // insight.command.port = 5568 // insight.command.timeout.seconds = 5 // Message bus configuration. moab.messageQueue.port = 5570 // moab.messageQueue.secretKey = "<ENTER-KEY-HERE>" mws.messageQueue.address = "*" mws.messageQueue.port = 5564 // Sample OAuth Configuration grails.plugin.springsecurity.oauthProvider.clients = [ [ clientId : "viewpoint", clientSecret : "<ENTER-CLIENTSECRET-HERE>", authorizedGrantTypes: ["password"] ] ] // Sample LDAP Configurations // Sample OpenLDAP Configuration //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" // Sample Active Directory Configuration //ldap.server = "192.168.0.5" //ldap.port = 389 //ldap.baseDNs = ["CN=Users,DC=acme,DC=com","OU=Europe,DC=acme,DC=com"] //ldap.bindUser = "cn=Administrator,cn=Users,DC=acme,DC=com" //ldap.password = "*****" //ldap.directory.type = "Microsoft Active Directory" log4j = { // Configure an appender for the events log. def eventAppender = new org.apache.log4j.rolling.RollingFileAppender( name: 'events', layout: pattern(conversionPattern: "%m%n")) def rollingPolicy = new org.apache.log4j.rolling.TimeBasedRollingPolicy( fileNamePattern: '/opt/mws/log/events.%d{yyyy-MM-dd}', activeFileName: '/opt/mws/log/events.log') rollingPolicy.activateOptions() eventAppender.setRollingPolicy(rollingPolicy) // Configure an appender for the audit log. def auditAppender = new org.apache.log4j.rolling.RollingFileAppender( name: 'audit', layout: new com.ace.mws.logging.ACPatternLayout("%j\t\t\t%c{1}\t\t\t%m%n")) def auditRollingPolicy = new org.apache.log4j.rolling.TimeBasedRollingPolicy( fileNamePattern: '/opt/mws/log/audit.%d{yyyy-MM-dd}', activeFileName: '/opt/mws/log/audit.log') auditRollingPolicy.activateOptions() auditAppender.setRollingPolicy(auditRollingPolicy) appenders { rollingFile name: 'stacktrace', file: '/opt/mws/log/stacktrace.log', maxFileSize: '100MB' rollingFile name: 'rootLog', file: '/opt/mws/log/mws.log', maxFileSize: '100MB', //The maximum file size for a single log file maxBackupIndex: 10, //Retain only the 10 most recent log files, delete older logs to save space layout: new com.ace.mws.logging.ACPatternLayout(), //Configures the output format of each log entry threshold: org.apache.log4j.Level.ERROR //Ignore any logging entries less verbose than this threshold rollingFile name: 'jdbc', file: '/opt/mws/log/jdbc.log', maxFileSize: '100MB', maxBackupIndex: 10, layout: new com.ace.mws.logging.ACPatternLayout() appender eventAppender appender auditAppender } // NOTE: This definition is a catch-all for any logger not defined below root { error 'rootLog' } // Individual logger configurations debug 'com.ace.mws', 'grails.app.conf.BootStrap', 'grails.app.controllers.com.ace.mws', 'grails.app.domain.com.ace.mws', 'grails.app.filters.com.ace.mws', 'grails.app.services.com.ace.mws', 'grails.app.tagLib.com.ace.mws', 'grails.app.jobs.com.ace.mws', 'grails.app.gapiParser', 'grails.app.gapiRequest', 'grails.app.gapiSerializer', 'grails.app.translator', 'plugins' // MWS plugins info 'com.ace.mws.gapi.Connection', 'com.ace.mws.gapi.parsers', 'grails.app.service.grails.plugins.reloadconfig', 'com.ace.mws.gapi.serializers' off 'org.codehaus.groovy.grails.web.errors' warn additivity: false, jdbc: 'org.apache.tomcat.jdbc' // Logs event information to the events log, not the rootLog trace additivity: false, events: 'com.ace.mws.events.EventFlatFileWriter' // Logs audit information to the audit log, not the rootLog trace additivity: false, audit: 'mws.audit' }
[root]# cd /opt/mws/plugins [root]# rm plugins-reports.jar plugins-storage.jar plugins-vcenter.jar
CATALINA_OPTS="-DMWS_HOME=/opt/mws -Xms256m -Xmx3g -XX:MaxPermSize=384m -Dfile.encoding=UTF8" JAVA_HOME="/usr/java/latest"
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.
You will need to start the "tomcat" service. Starting the "tomcat6" service will install the wrong version of Tomcat.
[root]# service tomcat start
You will see some sample queries and a few other actions.
If you encounter problems, or if MWS does not seem to be running, see the steps in 4.2 Moab Web Services Issues.