Installation and Configuration > Manual installation > Installation > Installing Moab Accounting Manager

Installing Moab Accounting Manager

These instructions describe how to install and start Moab Accounting Manager (MAM).

Optional: To build a custom RPM

  1. Install rpm-build.
  2. [root]# yum install rpm-build
  3. Download the latest MAM build (mam-8.0.1.tar.gz) from the Adaptive Computing website.
  4. The variable marked <version> is the desired version of the suite; for example, 8.0.1.

  5. Untar the downloaded package.
  6. Change directories into the untarred directory.
  7. Edit the ./mam.spec file for RPM customization.
  8. Run ./rpm-build.
  9. Locate the custom RPM in rpm/RPMS/x86_64.

To install Moab Accounting Manager

  1. Create a user called mam and switch to that user.
  2. [root]# useradd -m mam
    [root]# su - mam
    [mam]$ mkdir src
    [mam]$ cd src
  3. Download the latest MAM build (mam-8.0.1.tar.gz) from the Adaptive Computing website.
  4. Untar the MAM tarball.
  5. [mam]$ tar -zxvf mam-8.0.1.tar.gz
  6. Verify that each of the dependencies and prerequisites (listed above) are satisfied.
  7. Navigate to mam-8.0.1.
  8. [mam]$ cd mam-8.0.1
  9. Configure the software. For a list of all the configuration options, see Moab Accounting Manager configuration options.
    [mam]$ ./configure
  10. Compile and install the software.
  11. [mam]$ make
    [mam]$ exit
    [root]# cd ~mam/src/mam-8.0.1
    [root]# make install
  12. As the database user, create a database called mam and grant database privileges to the mam user.

    PostgreSQL should have previously been installed using the instructions in Preparing for installation.

    [root]# su - postgres
    [postgres]$ psql
    
    create database "mam";
    create user mam with password 'changeme!';
    \q
    
    [postgres]$ exit

    The password you define must be synchronized with the database.password value in /opt/mam/etc/goldd.conf

    [root]# vi /opt/mam/etc/goldd.conf
     
    database.password = changeme!
  13. Run the hpc.sql script to populate the Moab Accounting Manager database with objects, actions, and attributes necessary to function as an Accounting Manager.
    [root]# su - mam
    [mam]$ cd src/mam-8.0.1
    [mam]$ psql mam < hpc.sql
    [mam]$ exit
  14. Configure MAM to automatically start up at system boot, then start the mam service.
  15. [root]# chkconfig --add mam
    [root]# service mam start
  16. Copy the auto-generated secret key from the token.value parameter in the /opt/mam/etc/site.conf file. Add it to the moab-private.cfg file as the value of the CLIENTCFG KEY attribute so that Moab Workload Manager can communicate with Moab Accounting Manager. Restart Moab Workload Manager.
  17. [root]# vi /opt/moab/etc/moab-private.cfg
    CLIENTCFG[AM:mam] KEY=<MAMSecretKey> AUTHTYPE=HMAC64
     
    [root]# service moab restart
  18. Configure Apache to use SSL (needed only for SuSE-based systems).

    SuSE-based system:

  19. [root]# a2enflag SSL
  20. You can define users, accounts, charge rates, etc., as needed for your site (for more information, see the "Getting started" section of the Moab Accounting Manager Administrator Guide). An initialization script has been provided that can set up a sample initial environment (with some dummy users, accounts, charge rates, etc.) To initialize your database with this sample data, execute the script as the mam user:
  21. [mam]$ cd src/mam-8.0.1
    [mam]$ test/hpc-allocation-enforcement.sh

Related topics 

© 2014 Adaptive Computing