The service can be installed automatically and basically
configured by running the install.sh script and following
the step-by-step procedure.
1. Automatic
installation and minimal configuration
For automatically installing the service the
"install.sh" script has to be run. MonaLisa Service MUST
be run by a non-privileged user, so the installation
script will first check whether the user running it is
root or not. If the user is not root, then "install2.sh"
script will be executed.
If the user is root then it will ask for an account
from which MonaLisa service will run. If the specified
account does not exist, then the script will attempt to
create one and it will copy the install2.sh and
MonaLisa.v1.2.tar.gz in the users' ~/monalisa_install and
will start install2.sh from there. After install2
finished the ~/monalisa_install will be deleted.
The "install2.sh" script will ask for the destination
folder, unpack the MonaLisa.v1.2.tar.gz file and ask for
the farm configuration options. One of the first options
you have to make is the farm name, this option defaults
to the short hostname of the computer. You will also have
to enter the latitude and longitude of your place for the
client to correct locate and show your service. You can
find an aproximate value with http://geotags.com/.
The user will also be asked the path to java, a
contact person name (the administrator of the service)
and his e-mail address.
If the destination folder already contains an older
MonaLisa installation, then all the configuration files
are kept unchanged. In fact the CMD, TEST and myFarm
folders remain untouched, which is bad if you run an
older version of MonaLisa. So if you want to upgrade from
an older MonaLisa installation please choose another
destination folder and then check if the newly generated
configuration is correct.
The directory structure is as follows:
-
Service - monitoring service directory
structure
-
- CMD - this directory contains a set of
scripts that are used for the management of
the MonALISA service execution as well as a
file where the user can set global
environment variables:
-
-> the ML_SER script is used to
start, stop or restart the Monitoring
Service.
-
-> the MLD script is used to
start the Monitoring Service from
init.d.
-
-> the CHECK_UPDATE script is
used to automatically update the
Monitoring Service.
-
-> in the ml_env file you have to
set some environment variables. This is
the only file from this directory that
can be modified.
-
- SSecurity - this directory contains the
farm keystore (FarmMonitor.ks),as well as
scripts for exporting, importing or creating
new certificates (exportCert, importCert and
genKey).
-
- lib - contains service needed
libraries.
-
- ml_dl - contains the dl jar - classes
that have to be remote loaded be users of the
service.
-
- myFarm - this directory contains files
for configuring your monitoring service. You
can rename it with the name of your
service.
-
- usr_code - this directory contains the
sources of some module examples. Users can
develop their own monitoring and gathering
module and load them in the monitoring
service.
-
bin - contains tools used from the scripts from
Service/CMD.
-
policy - contains policy files for running the
MonALISA service.
-
util - contains different simple programs, their
source and scripts for getting useful
information:
-
-> ShowReceivedValues - a short program
example that interrogates a farm database and
gets results from it. It receives as argument
a configuration file, like the
Service/TEST/ml.properties.
-
-> ShowStoreConfig - a short program
example that parses a farm configuration file
(as Service/TEST/ml.properties) received as
argument and shows the database tables
structure used.
-
-> SimpleClient - a program example
that finds the MonALISA farm services
registered in the reggie services from the
locators given in the locators.conf file and
shows their attributes.
-
-> SimpleDBShell - a set of useful
scripts for getting information from a mysql
farm database. For using these scripts you
must first edit the mysql_console.sh script,
set the variables from here and delete the
following lines:
echo "Please edit mysql_console.sh first" > /dev/stderr exit
All the other scripts use
"mysql_console.sh". Use them for getting
information from the service database
tables.
-
-> TestClient - simple client that
registers with predicates at farm service and
shows receiving information.
After the install completes you can check the
configuration by editing the following files:
-> ML_SER - starts,stops or restarts the
service.
-> MLD - to be put in init.d so you can control the
service.
-> CHECK_UPDATE - should be put in crontab to
automatically update the MonALISA.
For advanced configuration of the service environment
and of the monitoring parameters edit the following
files:
-> ML_HOME/Service/CMD/ml_env
-> ML_HOME/Service/CMD/site_env
-> ML_HOME/Service/myFarm/ml.properties
-> ML_HOME/Service/myFarm/myFarm.conf