You are here: Manual Installation > Upgrading > Upgrading Moab Accounting Manager

2.22 Upgrading Moab Accounting Manager

This topic provides instructions to upgrade MAM to the latest release version. It includes instructions for migrating your database schema to a new version if necessary.

Moab Accounting Manager uses the standard configure, make, and make install steps for upgrades. This document provides a number of sample steps referenced to a particular installation on a Linux platform using the bash shell. These steps indicate the user ID in brackets performing the step. The exact commands to be performed and the user that issues them will vary based on the platform, shell, installation preferences, and other factors.

2.22.1 Upgrade Moab Accounting Manager

On the MAM Server Host, do the following:

  1. Determine the MAM Accounting admin user and change to that user.
    • If you are upgrading MAM from a version prior to 9.0, use glsuser.
      [root]# glsuser | grep 'Accounting Admin'
      mam      True                                                            Accounting Admin
      [root]# su - mam
    • If you are upgrading MAM from a version at or after 9.0, use mam-list-users.
      [root]# mam-list-users | grep 'Accounting Admin'
      mam      True                                                            Accounting Admin
      [root]# su - mam
  2. Determine whether you need to migrate your database.
    1. Determine your database version.
      • If you are upgrading MAM from a version prior to 9.0, run goldsh System Query.
        [mam]$ goldsh System Query
      • If you are upgrading MAM from a version at or after 9.0, run mam-shell System Query.
        [mam]$ mam-shell System Query
    2. If the current version is lower than 9.1, you must migrate your database. The steps required to do so are incorporated in the remaining steps for this topic.
  3. Stop the server daemon.
    [mam]$ su -c "service mam stop"
  4. If you determined that you must migrate your database, create a database backup.
    [mam]$ pg_dump -U <mam_database_user> -W <old_database_name> > /tmp/<old_database_name>.sql

    MySQL is no longer a supported database for MAM. If you are using MySQL for your MAM database, follow the instructions in 2.28 Migrating the MAM Database from MySQL to PostgreSQL to convert your database.

  5. If your PostgreSQL database version is prior to version 9.1, update the postgresql configuration to avoid interpreting backslashes as escape characters.
    [root]# vi /var/lib/pgsql/data/postgresql.conf
    				
    standard_conforming_strings = on
    
    [root]# service postgresql restart
  6. Verify that each of the prerequisites listed in 2.4 Installing Moab Accounting Manager have been satisfied.
  7. Download the latest MAM build from the Adaptive Computing website.
  8. Unpack the tar archive and change directory into the top directory of the distribution.

    [mam]$ tar -zxvf mam-9.1.0.tar.gz
    [mam]$ cd mam-9.1.0
  9. Configure Moab Accounting Manager by running configure with the desired options.

    It is recommended that you use the same configure options that were used in the previous installation. You can examine the config.log file where you unpacked your previous distribution to help determine the configuration options that were used to install the prior version of MAM.

    Client and server command names changed beginning with 9.0. If you want to create symbolic links to enable you to continue to use the old client and server command names, use the --with-legacy-links option with configure. When running a command under its old name, the command will issue a deprecation warning. This warning can be disabled by setting client.deprecationwarning = false in the mam-client.conf file.

    [mam]$ ./configure
  10. Run make to compile the program.

    [mam]$ make

    Depending on your configuration, you may need to replace "make" with a make command that includes additional functionality. Specifically:

    • If you only need to install the clients on a particular system, use clients-only.
    • If you only need to install the web GUI on a particular system, use make gui-only.
    • If you only need to install the web services on a particular system, use make ws-only
  11. Run make install as root to install Moab Accounting Manager.

    [mam]$ su -c "make install"

    Depending on your configuration, you may need to replace "make install" with a make command that includes additional functionality. Specifically:

    • If you only need to install the clients on a particular system, use make install-clients-only.
    • If you only need to install the web GUI on a particular system, use make install-gui-only.
    • If you only need to install the web services on a particular system, use make install-ws-only
  12. Edit the configuration files as necessary. You may want to compare your existing configuration files with those distributed with the new release to determine if you want to merge and change any of the new options within your configuration files.

    • If you are upgrading MAM from a version prior to 9.0, the install process will have saved your prior configuration files to {goldd,gold,goldg}.conf.pre-9.0 and written new default server configuration file as mam‑{server,client,gui}.conf. You will need to merge any non-default parameters from your prior config files to the new default config files.
      [mam]$ diff /opt/mam/etc/goldd.conf.pre-9.0 /opt/mam/etc/mam-server.conf
      [mam]$ vi /opt/mam/etc/mam-server.conf
      [mam]$ diff /opt/mam/etc/gold.conf.pre-9.0 /opt/mam/etc/mam-client.conf
      [mam]$ vi /opt/mam/etc/mam-client.conf
      [mam]$ diff /opt/mam/etc/goldg.conf.pre-9.0 /opt/mam/etc/mam-gui.conf
      [mam]$ vi /opt/mam/etc/mam-gui.conf
    • If you are upgrading MAM from a version at or after 9.0, merge and change any of the new options supplied in the new default configuration files (saved in mam‑{server,client,gui}.conf.dist) into your existing configuration files (mam‑{server,client,gui}.conf).

      [mam]$ diff /opt/mam/etc/mam-server.conf /opt/mam/etc/mam-server.conf.dist
      [mam]$ vi /opt/mam/etc/mam-server.conf
      [mam]$ diff /opt/mam/etc/mam-client.conf /opt/mam/etc/mam-client.conf.dist
      [mam]$ vi /opt/mam/etc/mam-client.conf
      [mam]$ diff /opt/mam/etc/mam-gui.conf /opt/mam/etc/mam-gui.conf.dist
      [mam]$ vi /opt/mam/etc/mam-gui.conf

    • If you are upgrading MAM from a version at or after 9.1, and you are using MAM Web Services, merge and change any of the new options supplied in the new default MAM Web Services configuration file (saved in mam‑ws.conf.dist) into your existing MAM Web Services configuration file (mam‑ws.conf).
      [mam]$ diff /opt/mam/etc/mam-ws.conf /opt/mam/etc/mam-ws.conf.dist
      [mam]$ vi /opt/mam/etc/mam-ws.conf
  13. Start the server daemon.
    [mam]$ su -c "service mam start"
  14. If you are migrating your database to 9.1, you will do so by running one or more migration scripts. You must run every incremental migration script between the version you are currently using and the new version (9.1). These scripts are designed to be rerunnable, so if you encounter a failure, resolve the failure and rerun the migration script. If you are unable to resolve the failure and complete the migration, contact Support.

    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.

    [mam]$ sbin/migrate_7.2-7.3.pl
    [mam]$ sbin/migrate_7.3-7.5.pl
    [mam]$ sbin/migrate_7.5-8.0.pl
    [mam]$ sbin/migrate_8.0-8.1.pl
    [mam]$ sbin/migrate_8.1-9.0.pl
    [mam]$ sbin/migrate_9.0-9.1.pl
  15. 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
  16. Verify that the executables have been upgraded to 9.1.0.

    [mam]$ mam-server -v
    
    Moab Accounting Manager version 9.1.0
  17. If you are upgrading MAM from a version prior to 9.1.0, and you wish to use MAM Web Services, perform the following procedures:

© 2016 Adaptive Computing