(Click to open topic with navigation)
This topic provides instructions to upgrade Moab Accounting Manager to the latest release version using the RPM upgrade method. It includes instructions for migrating your database schema to a new version if necessary.
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.
3.27.1 Upgrade Steps
Do the following:
Do the same as needed for the MAM GUI Host and each MAM Client Host.
See 3.20 Preparing for RPM Upgrades for more information.
You must complete all the previous upgrade steps in this topic before upgrading MAM Server. See the list of steps at the beginning of this topic.
On the MAM Server Host, do the following:
[root]# service mam stop
The MAM RPM name has changed between version 8.1 and 9.0. The RPM obsoleted process removes the old RPM and installs the new RPM separately; this results in removing the mam user and not preserving the customized configuration files. A special process must be followed when upgrading from an RPM version prior to 9.0.
for i in /opt/mam/etc/{gold,goldd,goldg,site}.conf do cp -p ${i} ${i}.rpmsave done rpm -e --nopostun moab-hpc-enterprise-suite moab-hpc-accounting-manager yum install moab-accounting-manager for i in /opt/mam/etc/mam-*.conf do cp -p ${i} ${i}.rpmnew done \cp -f /opt/mam/etc/gold.conf.rpmsave /opt/mam/etc/mam-client.conf \cp -f /opt/mam/etc/goldd.conf.rpmsave /opt/mam/etc/mam-server.conf \cp -f /opt/mam/etc/goldg.conf.rpmsave /opt/mam/etc/mam-gui.conf \cp -f /opt/mam/etc/site.conf.rpmsave /opt/mam/etc/mam-site.conf
[root]# yum update moab-accounting-manager
If installing on RHEL, you may need to enable optional RHEL repositories in order to find some of the dependent packages.
For example (for the current RHEL 7 repositories):
[root]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-8.noarch.rpm [root]# yum install yum-utils [root]# yum-config-manager --disable epel [root]# yum install --enablerepo=epel,rhel-7-server-optional-rpms moab-accounting-manager
[root]# service mam start
[root]# su -c "mam-create-user -u mam -d \"Accounting Admin\"" moab [root]# su -c "mam-modify-role -r SystemAdmin --add-user mam" moab [root]# perl -p -i -e 's/moab/mam/ if /^super.user/' /opt/mam/etc/mam-server.conf
[root]# vi /var/lib/pgsql/data/postgresql.conf standard_conforming_strings = on [root]# service postgresql restart
The migration scripts must be run as the mam user.
For example, if you are migrating from Moab Accounting Manager version 7.2, you must run six migration scripts: the first to migrate the database schema from 7.2 to 7.3, the second to migrate from 7.3 to 7.5, the third to migrate the database schema from 7.5 to 8.0, the fourth to migrate the database schema from 8.0 to 8.1, the fifth to migrate the database schema from 8.1 to 9.0, and the sixth to migrate the database schema from 9.0 to 9.1.
[root]# su - mam [mam]$ /usr/share/moab-accounting-manager/migrate_7.2-7.3.pl [mam]$ /usr/share/moab-accounting-manager/migrate_7.3-7.5.pl [mam]$ /usr/share/moab-accounting-manager/migrate_7.5-8.0.pl [mam]$ /usr/share/moab-accounting-manager/migrate_8.0-8.1.pl [mam]$ /usr/share/moab-accounting-manager/migrate_8.1-9.0.pl [mam]$ /usr/share/moab-accounting-manager/migrate_9.0-9.1.pl
Verify that the resulting database schema version is 9.1.
[mam]$ mam-shell System Query
Name Version Description
----------------------- ------- ------------------
Moab Accounting Manager 9.1 Commercial Release
Verify that the executables have been upgraded to 9.1.0.
[mam]$ mam-server -v
Moab Accounting Manager version 9.1.0
3.27.2.A Upgrade Remote MAM GUI
If you are using the MAM GUI and the MAM GUI Host is different from the MAM Server Host, then do the following on the MAM GUI Host:
cp -p /opt/mam/etc/goldg.conf /opt/mam/etc/goldg.conf.rpmsave rpm -e --nopostun moab-hpc-accounting-manager yum install moab-accounting-manager cp -p /opt/mam/etc/mam-gui.conf /opt/mam/etc/mam-gui.conf.rpmnew \cp -f /opt/mam/etc/goldg.conf.rpmsave /opt/mam/etc/mam-gui.conf
[root]# yum update moab-accounting-manager
3.27.2.B Upgrade Remote MAM Web Services
If you are using MAM Web Services and the MAM Web Services Host is different from the MAM Server Host, then do the following on the MAM Web Services Host:
[root]# yum update moab-accounting-manager
[root]# service httpd restart
3.27.2.C Upgrade Remote MAM Clients
If you are have any MAM Client Hosts that are different from the MAM Server Host or MAM GUI Hosts, then do the following on each MAM Client Host:
cp -p /opt/mam/etc/gold.conf /opt/mam/etc/gold.conf.rpmsave rpm -e --nopostun moab-hpc-accounting-manager
yum install moab-accounting-manager cp -p /opt/mam/etc/mam-client.conf /opt/mam/etc/mam-client.conf.rpmnew \cp -f /opt/mam/etc/gold.conf.rpmsave /opt/mam/etc/mam-client.conf
[root]# yum update moab-accounting-manager