Metronome Installation

Preparing System Environment

If you are using Linux for your submit node, you must install the mysql-dev and Perl DBI modules.

perl -MCPAN -e "install DBI"
perl -MCPAN -e "install DBD::mysql"

Preparing the Database

Install the version of MySQL as listed in the release notes. You will need to create a database with the same name as defined DB_NAME (the default name is nmi_history) and install the default schema.

mysqladmin create nmi_history
mysql nmi_history < nmi-X.Y.Z/framework/database/schema.mysql

Now as a privileged user, create the following accounts. The first account shown below is the DB_WRITER_USER, and it needs to be able to insert and update records in the database. The second account, DB_READER_USER, is use by the web interface and needs only read access to the database, except to update the “notes” field (which you can turn off), and to write to the sessions table (which, at least for now, you can’t).

Replace ‘@%.example.com@’ with the appropriate domain or host. Only hosts you specify for the DB_WRITER_USER will be able to use the command-line tools, and only hosts you specify for the DB_READER_USER will be able to run the web interface.

NOTE: Be sure to execute FLUSH PRIVILEGES; to make sure these accounts are add appropriately. You may also need to create an additional ‘localhost’ record for each account if the database is running on the same host as the submit node.

# DB_WRITER ACCOUNT
GRANT SELECT,INSERT,UPDATE,DELETE ON nmi_history.* \
TO 'DB_WRITER_USER'@'.example.com' IDENTIFIED BY 'DB_WRITER_PASS';

# DB_READER ACCOUNT
GRANT SELECT,CREATE TEMPORARY TABLES ON nmi_history.* \
TO 'DB_READER_USER'@'
.example.com' IDENTIFIED BY 'DB_READER_PASS';
GRANT UPDATE (notes) ON nmi_history.Run \
TO 'DB_READER_USER'@'.example.com' IDENTIFIED BY 'DB_READER_PASS';
GRANT SELECT,INSERT,UPDATE,DELETE ON nmi_history.sessions \
TO 'DB_READER_USER'@'
.example.com' IDENTIFIED BY 'DB_READER_PASS';

Installing NMI Framework

Install the NMI software under your chosen prefix:

perl Makefile.PL prefix=<prefix>
make install

If you anticipate installing multiple versions of the framework, you may wish to set the prefix to a location such as /nmi-x.y.z, then create symbolic links to the installation directories:

mkdir <prefix>/nmi
cd <prefix>/nmi
ln -s <prefix>/nmi-X.Y.Z/share
ln -s <prefix>/nmi-X.Y.Z/bin
ln -s <prefix>/nmi-X.Y.Z/lib

Framework Configuration

Copy nmi-X.Y.Z/framework/nmi.conf.sample to prefix/etc/nmi.conf and edit as required. Please make sure that all non-trivial configuration parameters are customized for your local site (see Site Configuration Parameters for more information).

mkdir <prefix>/etc
cp nmi-X.Y.Z/framework/nmi.conf.sample <prefix>/etc/nmi.conf
edit <prefix>/etc/nmi.conf

If you intend to install future framework versions, you may want to place your nmi.conf file in a general location such as /nmi/etc and create the symlink from prefix/etc instead:

mkdir /nmi/etc/@
cp <prefix>/etc/nmi.conf /nmi/etc/
cd <prefix>/etc
ln -s /nmi/etc/nmi.conf nmi.conf