(Click to open topic with navigation)
This topic provides instructions to upgrade Moab Web Services to the latest release version using the RPM upgrade method. It includes instructions for migrating your database schema to a new version if necessary.
If upgrading Moab Web Services from a version prior to 8.0, this upgrade removes all MWS roles and permissions and recreates the default roles. If you have modified any MWS permissions or roles, you will need to recreate them after the upgrade is complete.
Because many system-level files and directories are accessed during the installation, the instructions in this guide should be executed with root privileges.
You will see that the instructions execute commands as the root user. Please note that the same commands will work for a non-root user with the sudo command.
Do the following:
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.
You must complete all the previous upgrade steps in this topic before upgrading MWS server. See the list of steps at the beginning of this topic.
The MWS RPM automatically creates a backup of all relevant files. These backups are stored in /var/tmp/backup-<rpmName>-<timestamp>.tar.gz.
If changes are detected between any existing configuration files and new configuration files, a version of the new configuration file will be saved under <configurationFileLocation>/<fileName>.rpmnew.
On the MWS Server Host, do the following:
[root]# service tomcat6 stop [root]# chkconfig tomcat6 off
Tomcat 6 is not supported for MWS 9.0 and after. The MWS RPM will automatically install Tomcat 7.
[root]# service tomcat stop
Back up the MWS home directory.
[root]# cp -r /opt/mws /opt/mws-8.1-backup
[root]# yum update moab-web-services*
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
You may be prompted for the mongo password. The password can be found in the /opt/mws/etc/mws-config.groovy file under the "grails.mongo.password" key.
The script might take several minutes to execute.
Depending on your current MWS version, do the following as needed:
insight.server must be changed to the DNS name for the host on which the Insight Server is running; "localhost" is not valid.
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 -Dfile.encoding=UTF8" JAVA_HOME="/usr/java/latest"
[root]# service tomcat start
MWS 9.0.2 introduced a new Connection Health entry for Insight Server. The new Insight Server health check will display a connection problem until you upgrade Insight to 9.0.2.