Additional configuration > Configuring Moab Accounting Manager

Configuring Moab Accounting Manager

To configure Moab Accounting Manager

  1. Uncomment all the AMCFG lines in the /opt/moab/etc/moab.cfg file:
  2. AMCFG[mam] TYPE=NATIVE
    AMCFG[mam] QuoteURL=exec://$TOOLSDIR/mam/usage.quote.mam.pl
    AMCFG[mam] CreateURL=exec://$TOOLSDIR/mam/usage.create.mam.pl
    AMCFG[mam] StartURL=exec://$TOOLSDIR/mam/usage.start.mam.pl
    AMCFG[mam] UpdateURL=exec://$TOOLSDIR/mam/usage.update.mam.pl
    AMCFG[mam] PauseURL=exec://$TOOLSDIR/mam/usage.pause.mam.pl
    AMCFG[mam] EndURL=exec://$TOOLSDIR/mam/usage.end.mam.pl
    AMCFG[mam] DeleteURL=exec://$TOOLSDIR/mam/usage.delete.mam.pl
    AMCFG[mam] FLUSHINTERVAL=DAY
  3. Enable communication between MWM and MAM by copying the auto-generated secret key from the token.value parameter in the /opt/mam/etc/site.conf file and adding it to the moab-private.cfg file as the CLIENTCFG KEY value. Restart MWM.
    [root]# nano /opt/moab/etc/moab-private.cfg
     
    CLIENTCFG[AM:mam] KEY=<MAMSecretKey>
     
    [root]# service moab restart
  4. Enable support for transactions (MySQL 5.5.5 and later supports transactions by default).
  5. [root]# nano /etc/my.cnf
     
    ## Place this in the [mysqld] section:
    # Enable transactions
    default-storage-engine = INNODB

    If the /etc/my.cnf file does not exist, start and stop the mysqld service to create it.

    [root]# service mysqld start
    [root]# service mysqld stop
  6. Start the mysql daemon.
  7. [root]# service mysqld start
    [root]# chkconfig mysqld on
  8. Create a database called mam, then create a user and give the user privileges to the database.
  9. [root]# mysql
     
    mysql> create database mam;
    mysql> grant all on *.* to 'moab'@'localhost' identified by '<password>';
    mysql> exit

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

  10. As the mysql user "moab," import the cloud.sql file into the mam database.
  11. [root]# mysql mam -u moab -p < /usr/share/moab-cloud-accounting-manager/7.5/cloud.sql
  12. Start the Moab Accounting Manager service.
  13. [root]# service mam start
    [root]# chkconfig mam on
  14. As the root user, add or edit the SSL virtual host definition as appropriate for your environment. To do so, configure the cgi-bin directory in ssl.conf. Directly under the <Directory "/var/www/cgi-bin"> element, create an alias for /cgi-bin pointing to your cgi-bin directory. If you chose to install to a cgi-bin sub-directory, you might want to create an alias for that as well. Also, add index.cgi to the DirectoryIndex so you can use the shorter sub-directory name.
  15. [root]# nano /etc/httpd/conf.d/ssl.conf
     
    <Directory "/var/www/cgi-bin">
    ## Add these lines
      Options ExecCGI
      AddHandler cgi-script .cgi
      AllowOverride All
      Order allow,deny
      Allow from all
    </Directory>
     
    # Aliases for /cgi-bin
    Alias /cgi-bin/ /var/www/cgi-bin/
    Alias /mam/ /var/www/cgi-bin/mam/
     
    # Make shorter sub-dir name available
    DirectoryIndex index.cgi

    For the highest security, it is recommended that you install a public key certificate that has been signed by a certificate authority. The exact steps to do this are specific to your distribution and the chosen certificate authority. An overview of this process for CentOS 5 is documented here.

  16. Start or restart the Apache HTTP server.
  17. [root]# chkconfig httpd on
    [root]# service httpd restart
  18. Create a password for the user "moab" to be used with the Moab Accounting Manager Web GUI.
  19. [root]# su - moab
    [moab]$ gchpasswd

    You can now access the GUI at https://<hostname>/cgi-bin/mam.

    Users, accounts, charge rates, etc. can now be defined as needed for your site. The "Getting Started" section of the Moab Accounting Manager Administrator Guide can help with this. 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:

    [moab]$ /usr/share/moab-cloud-accounting-manager/7.5/cloud-allocation-enforcement.sh

For more information on the Moab Accounting Manager component, including additional configuration information, see the Moab Accounting Manager Administrator Guide.

If you want to configure Moab Accounting Manager in Viewpoint, see Configuring Moab Accounting Manager in Viewpoint.