(Click to open topic with navigation)
This topic contains instructions on how to install, configure, and start Moab Accounting Manager (MAM).
Perform the following:
The first step is determining the number of different hosts (physical machines) required for your MAM installation.
Your MAM installation includes:
Each of these components can be installed on their own hosts (meaning the actual physical machine) or can be combined on same hosts. For example, the MAM Database can be installed on the same host as the MAM Server. Or the MAM Server may be installed on the same host on which you installed the Moab Server.
Once you have determined which components are installed on which hosts, complete the rest of the instructions for the MAM installation.
The instructions that follow in this topic will use the term host after each component to indicate the physical machine on which the component is installed (for example, MAM Server Host and MAM Database Host). Depending on your configuration, the host may refer to the component installed on its own machine or installed on the same machine as another component.
In this section:
MAM is commonly installed on the same host as Moab; however, in some cases you might obtain better performance by installing them on different hosts.
3.9.2.B Supported Operating Systems
MAM has been tested on the following variants of Linux:
MAM uses an RDBMS as a back end. If this is a new installation, use the following database:
If your site is running firewall software on its hosts, you will need to configure the firewall to allow connections to the necessary ports.
Location | Ports | Functions | When Needed |
---|---|---|---|
MAM Server Host | 7112 | MAM Server Port | If you will be installing the MAM Server on a different host from where you installed the Moab Server or you will be installing the MAM Clients on other hosts |
MAM GUI Host | 443 | HTTPS Port | If using the MAM GUI |
MAM Web Services Host | 443 | HTTPS Port | If using MAM Web Services |
MAM Database Host | 5432 | MAM PostgreSQL Server Port | If you will be installing the MAM Database on a different host from the MAM Server |
See 2.11 Opening Ports in a Firewall for general instructions and an example of how to open ports in the firewall.
3.9.4 Install Dependencies, Packages, or Clients
In this section:
3.9.4.A Install and Initialize PostgreSQL Server
Moab Accounting Manager uses a database for transactions and data persistence. The PostgreSQL database may be installed on a different host from the MAM Server; however, it is often convenient to install them on the same host.
On the MAM Database Host, do the following:
[root]# zypper install postgresql-server [root]# service postgresql start
Edit or add a "host" line in the pg_hba.conf file for the interface from which the MAM Server will be connecting to the database and ensure that it specifies a secure password-based authentication method (for example, md5).
[root]# vi /var/lib/pgsql/data/pg_hba.conf # Replace 127.0.0.1 with the IP address of the MAM Server Host if the # MAM PostgreSQL server is on a separate host from the MAM server. host all all 127.0.0.1/32 md5 host all all ::1/128 md5
[root]# vi /var/lib/pgsql/data/postgresql.conf # Replace <mam-server-host> with the TCP/IP address on which the database server is to listen for connections # from the MAM server. This will normally be the hostname or ip address of the MAM Database Host. listen_addresses = '<mam-database-host>'
[root]# systemctl enable postgresql.service [root]# systemctl restart postgresql.service
3.9.4.B Install Perl ReadLine (Optional)
Moab Accounting Manager can be optionally configured to provide command history editing functionality in the mam-shell command.
The perl-Term-ReadLine-Gnu package is recommended and is typically included in the standard repositories for the OS.
To install the perl-Term-ReadLine-Gnu package:
[root]# zypper install perl-Term-ReadLine-Gnu
You must complete all the previous sections in this topic before installing MAM server. See the list of steps at the beginning of this topic.
On the MAM Server Host do the following:
zypper install moab-accounting-manager
As the database user, create a database called mam and grant database privileges to the mam user.
PostgreSQL was installed and initialized earlier in this topic. See 3.9.4.A Install and Initialize PostgreSQL Server.
[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/mam-server.conf.
[root]# vi /opt/mam/etc/mam-server.conf database.password = changeme!
[root]# su - mam [mam]$ psql mam < /usr/share/moab-accounting-manager/hpc.sql [mam]$ exit
[root]# systemctl enable mam.service [root]# systemctl start mam.service
If you plan to use the web GUI, then on the MAM GUI Host, do the following:
[root]# a2enflag SSL [root]# cp /etc/apache2/vhosts.d/vhost-ssl.template /etc/apache2/vhosts.d/mam-ssl.conf [root]# vi /etc/apache2/vhosts.d/mam-ssl.conf # Edit the SSLCertificate lines to coincide with the certificates you will produce in the next step SSLCertificateFile /etc/apache2/ssl.crt/server.crt SSLCertificateKeyFile /etc/apache2/ssl.key/server.key <Directory "/srv/www/cgi-bin"> Options ExecCGI AddHandler cgi-script .cgi AllowOverride All Require all granted </Directory> # Aliases for /cgi-bin Alias /cgi-bin/ /srv/www/cgi-bin/ Alias /mam /srv/www/cgi-bin/mam/ # Make shorter sub-dir name available DirectoryIndex index.cgi
Alternatively, if your network domain can be secured from man-in-the-middle attacks, you could use a self-signed certificate.
If your configuration uses self-signed certificates, do the following:
[root]# cd /etc/apache2 [root]# openssl genrsa -out ssl.key/server.key 1024 [root]# openssl req -new -key ssl.key/server.key -x509 -out ssl.crt/server.crt
[root]# systemctl enable apache2.service [root]# systemctl restart apache2.service
3.9.7 Configure MAM Web Services
If you plan to use MAM Web Services, then on the MAM Web Services Host, do the following:
Edit the SSL virtual host definition in ssl.conf to include the mamws location. For example:
[root]# a2enflag SSL [root]# a2enmod perl # Do not repeat the following copy step if performed previously on the same host when configuring the web server [root]# cp /etc/apache2/vhosts.d/vhost-ssl.template /etc/apache2/vhosts.d/mam-ssl.conf [root]# vi /etc/apache2/vhosts.d/mam-ssl.conf # Place the following within the 443 VirtualHost definition PerlOptions +Parent PerlSwitches -Mlib=/opt/mam/lib PerlModule MAM::WSResponseHandler PerlModule MAM::WSAuthenHandler <Location /mamws> SetHandler perl-script PerlResponseHandler MAM::WSResponseHandler Options +ExecCGI AuthName MAM PerlAuthenHandler MAM::WSAuthenHandler Require valid-user AllowOverride All </Location>
Alternatively, if your network domain can be secured from man-in-the-middle attacks, you could use a self-signed certificate. Often this does not require any additional steps since in many distributions, such as Red Hat, the Apache SSL configuration provides self-signed certificates by default.
If your configuration uses self-signed certificates, do the following:
[root]# cd /etc/apache2 [root]# openssl genrsa -out ssl.key/server.key 1024 [root]# openssl req -new -key ssl.key/server.key -x509 -out ssl.crt/server.crt
[root]# systemctl enable apache2.service [root]# systemctl restart apache2.service
If you plan to use the web GUI, then on the MAM Server Host, do the following:
[root]# su - mam [mam]$ mam-set-password [mam]$ exit
If you plan to use MAM web services, then on a MAM Client Host, do the following:
[root]# su - mam [mam]$ mam-set-password [mam]$ exit
Make a call to web services.
[root]# curl -k -X GET --basic -u mam:changeme! 'https://<mam-web-services-host>/mamws/system'
Alternatively, for queries, you can use the browser to access the URL. For example: 'https://<mam-web-services-host>/mamws/system'.
3.9.10 Configure Moab Workload Manager to use Moab Accounting Manager
If integrating with Moab Workload Manager, do the following, as applicable:
[root]# vi /opt/moab/etc/moab.cfg
AMCFG[mam] TYPE=MAM HOST=<mam_server_host>
[root]# vi /opt/moab/etc/moab-private.cfg CLIENTCFG[AM:mam] KEY=<MAMSecretKey>
[root]# systemctl restart moab.service
3.9.11 Initialize Moab Accounting Manager
You will need to initialize Moab Accounting Manager to function in the way that is most applicable to the needs of your site. See Initial Setup in the Moab Accounting Manager Administrator Guide to set up Moab Accounting Manager for your desired accounting mode.
Related Topics