Installation > Installing Moab Accounting Manager

Installing Moab Accounting Manager

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

To build a custom RPM

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

  5. Untar the downloaded package.
  6. Change directories into the untarred directory.
  7. Edit the ./moab.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 moab, and switch to that user.
  2. [root]# useradd -m moab
    [root]# su - moab
    [moab]$ mkdir src
    [moab]$ cd src
  3. Download the latest MAM build (mam-<version>.tar.gz) from the Adaptive Computing website.
  4. Untar the MAM tarball.
  5. [moab]$ tar -zxvf mam-7.5.0.tar.gz
  6. Verify that each of the dependencies and prerequisites (listed above) are satisfied.
  7. Navigate to mam-7.5.0.
  8. [moab]$ cd mam-7.5.0
  9. Configure the software. For a list of all the configuration options, see Moab Accounting Manager configuration options.
    • PostgreSQL database:
    • [moab]$ ./configure --with-db-type=Pg
    • MySQL database:
    • [moab]$ ./configure --with-db-type=mysql
  10. Compile and install the software.
  11. [moab]$ make
    [moab]$ exit
    [root]# cd ~moab/src/mam-7.5.0
    [root]# make install
  12. If you are using the PostgreSQL database, initialize the database.
    • RedHat 6 based system:
    • [root]# service postgresql initdb
    • RedHat 5 or SLES based system:
    • [root]# service postgresql start
  13. If you are using the MySQL database, configure the server to support transactions with the READ COMMITTED transaction isolation level. Then start the mysqld service.
  14. [root]# nano /etc/my.cnf
    ## Place this in the [mysqld] section:
    default-storage-engine = INNODB
    transaction-isolation = READ-COMMITTED
     
    [root]# service mysqld start
  15. As the database user, create a database called mam and grant database privileges to the moab user.
    • PostgreSQL database:
    • [root]# su - postgres
      [postgres]$ psql
      
      create database "mam";
      create user moab with password 'changeme';
      \q
      
      [postgres]$ exit
    • MySQL database:
    • [root]# mysql
      
      mysql> create database mam;
      mysql> grant all on *.* to 'moab'@'localhost' identified by 'changeme';
      mysql> exit

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

    [root]# nano /opt/mam/etc/goldd.conf
     
    database.password = changeme
  16. Configure the database to start on system startup. Start or restart the database server with the new configurations in effect.
    • PostgreSQL database on a RedHat-based or SuSE-based system:
    • [root]# chkconfig postgresql on
      [root]# service postgresql restart
    • MySQL database on a RedHat-based system:
    • [root]# chkconfig mysqld on
      [root]# service mysqld restart
    • MySQL database on a SuSE-based system:
    • [root]# chkconfig mysql on
      [root]# service mysql restart
  17. Run the hpc.sql script to populate the Moab Accounting Manager database with objects, actions, and attributes necessary to function as an Accounting Manager.
    • PostgreSQL database:
    • [root]# su - moab
      [moab]$ cd src/mam-7.5
      [moab]$ psql mam < hpc.sql
      [moab]$ exit
    • MySQL database:
    • [root]# su - moab
      [moab]$ cd src/mam-7.5
      [moab]# mysql mam -u moab -p < hpc.sql
      [moab]$ exit
  18. Configure MAM to automatically start up at system boot, then start the mam service.
  19. [root]# chkconfig --add mam
    [root]# service mam start
  20. 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.
  21. [root]# nano /opt/moab/etc/moab-private.cfg
    CLIENTCFG[AM:mam] KEY=<MAMSecretKey> AUTHTYPE=HMAC64
     
    [root]# service moab restart
  22. (Only if you use a SuSE-based system) Edit the Apache configure files to use SSL.
  23. [root]# nano /etc/sysconfig/apache2
     
    APACHE_SERVER_FLAGS="-DSSL"
  24. 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 moab user:
  25. [moab]$ cd src/mam-7.5.0
    [moab]$ test/hpc-allocation-enforcement.sh

    If you want to be able to access the Moab Accounting Manager GUI via Viewpoint, please see Configuring Moab Accounting Manager in Viewpoint.

Related topics