Lemon Installation for GT Virtual Testbed

Server installation

A SLC4 64 virtual machine has been created using vNode: vtb-generic-45.cern.ch, with:
# cat /etc/redhat-release 
Scientific Linux CERN SLC release 4.8 (Beryllium)
# uname -a
Linux vtb-generic-45.cern.ch 2.6.9-78.0.13.EL.cernxenU #1 SMP Mon Jan 19 14:11:02 CET 2009 x86_64 x86_64 x86_64 GNU/Linux

The documentation for installing Lemon is here. The instructions for a flat file based server installation have been followed. A client installation will been done on the same host in order to do some preliminary tests.

The following repo file have been created:

[root@vtb-generic-19 yum.repos.d]# cat lemon.repo 
[lemon]
name=Lemon
baseurl=http://linuxsoft.cern.ch/lemon/linux/RPMS/x86_64/sl4/stable/
enabled=1
gpgcheck=1
gpgkey=http://linuxsoft/lemon/RPM-GPG-KEY-lemon

[root@vtb-generic-19 yum.repos.d]# cat lemon-server.repo 
[lemon-servers]
name=Lemon Servers
baseurl=http://linuxsoft.cern.ch/lemon/cern/
enabled=1
gpgcheck=1
gpgkey=http://linuxsoft/lemon/RPM-GPG-KEY-lemon
In order to solve some dependencies issues, some additional rpms have been downloaded directly from the repository http://linuxsoft.cern.ch/lemon/linux/RPMS/x86_64/sl4/stable/:
# wget http://linuxsoft.cern.ch/lemon/linux/RPMS/x86_64/sl4/stable/apr-1.2.9-1.x86_64.rpm
# wget http://linuxsoft.cern.ch/lemon/linux/RPMS/x86_64/sl4/stable/apr-util-1.2.8-1.x86_64.rpm

# rpm -ivh apr-1.2.9-1.x86_64.rpm
# yum install postgresql-libs
# rpm -ivh apr-util-1.2.8-1.x86_64.rpm

# yum install lemon-server
# yum install lemon-admin

Pysqlite2 needs to be installed as well if you plan to use an sqlite db:

#  wget http://pysqlite.googlecode.com/files/pysqlite-2.6.0.tar.gz
# tar -xvzf pysqlite-2.6.0.tar.gz
# cd pysqlite-2.6.0
# python setup.py build_static install

Server Configuration

# ls -l /etc/lemon-server-metadata.conf
-rw-r--r--  1 root root 174730 Aug 12  2008 /etc/lemon-server-metadata.conf
# usermod -a -G root lemon
# id lemon
uid=100(lemon) gid=103(lemon) groups=103(lemon),0(root)
# lemon-admin --backend=sqlite --create-schema
        Creating metadata structure.
                Processing file: flat/metric_tables.sql
                DDL successfull


# lemon-admin --backend=sqlite --create-schema > lemon-admin --backend=sqlite --all --file=/etc/lemon-server-metadata.conf
At this point the lemon database should be present in /var/lib/lemon-server/lemon.db

The file /etc/sysconfig/lemon-server has not been modified since it contains only Oracle information and we are not planning to use an Oracle database.

The file /etc/lemon/server/lemon-server.conf has been modified to enable the sqlite3 database:

 /* sqlite3 */
 filename   = "/var/lib/lemon-server/lemon.db";
 timeout    = 15;
 driver     = "/usr/lib64/lemon-server/libsqlite.so";

At this point the server should correctly (look at /var/log/lemon-server.log)

# /etc/init.d/lemon-server start 
Starting lemon-server:                                     [  OK  ]

Client installation

We want to install an agent and at least one sensor on the same server machine in order to validate the deployment.
# yum install lemon-agent
# yum install lemon-sensor-linux
The configurations file holding details about sensors and metrics, located in /etc/lemon/agent/*.conf have not been modified.

The agent process has been started enabling the debug mode:

# /etc/rc.d/init.d/lemon-agent start -d
Starting lemon-agent:                                      [  OK  ]

Metrics looks correctly accumulated in _ /var/spool/lemon-agent/vtb-generic-45/_, e.g:

# more /var/spool/lemon-agent/vtb-generic-45/last.00004115 
1273223935      GenuineIntel Intel(R)_Xeon(R)_CPU___________E5410__@_2.33GHz 2327 37281 8 8

Tests

In order to validate the installation, the CLI has been installed on the same host:
# yum install lemon-cli
To get usage info on the CLI use the '--help' option.

Check MSA.alive metric with:

# /usr/sbin/lemon-cli --metrics="alive"
[INFO] lemon-cli version 1.2.0 started by root at Fri May  7 12:00:32 2010 on vtb-generic-45.cern.ch
[VERB] Nodes:      vtb-generic-45 
[VERB] Metrics:    10003 
[VERB] Method:     Latest
[VERB] 
[INFO] local:   vtb-generic-45  10003   Fri May  7 11:58:58 2010        1 2 2
[VERB] 
[VERB] Total: 1 result

In order to retrieve the list of available metrics do:

# lemon-cli --info
[INFO] lemon-cli version 1.2.0 started by root at Fri May  7 15:12:14 2010 on vtb-generic-45.cern.ch
[INFO] 32
[INFO]          Name:   cupsd
[INFO]          Class:  system.numberOfProcesses
[INFO] 43
[INFO]          Name:   crond
[INFO]          Class:  system.numberOfProcesses

[...]

A simple query to validate the installation to retrieve the metric 'CPUInfo' in a specified time interval:

# lemon-cli --start 1273220000 --end 1273225000 --nodes vtb-generic-45 --metrics CPUInfo
[INFO] lemon-cli version 1.2.0 started by root at Fri May  7 15:06:29 2010 on vtb-generic-45.cern.ch
[VERB] Nodes:      vtb-generic-45 
[VERB] Metrics:    4115 
[VERB] Start:      Fri May  7 10:13:20 2010 - 1273220000
[VERB] End:        Fri May  7 11:36:40 2010 - 1273225000 (difference: 5000 seconds)
[VERB] Method:     Historical
[VERB] 
[INFO] local:   vtb-generic-45  4115    Fri May  7 11:18:55 2010        GenuineIntel Intel(R)_Xeon(R)_CPU___________E5410__@_2.33GHz 2327 37281 8 8
[VERB] 
[VERB] Total: 1 result

Note that by default the query is run against the local cache (--localcache). In order to run the query against the local server you have to specify the option --server.

Lemon-web installation

PHP version 5 needs to be installed as well in order to install lemon-web. The repository can be take from here:
=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 php                     x86_64     5.2.11-jason.1   utterramblings    3.9 M
Installing for dependencies:
 apr-util-ldap           x86_64     1.3.9-1.jason.1  utterramblings     19 k
 php-cli                 x86_64     5.2.11-jason.1   utterramblings    2.6 M
 php-common              x86_64     5.2.11-jason.1   utterramblings    515 k
Updating for dependencies:
 apr-util                x86_64     1.3.9-1.jason.1  utterramblings    206 k
 httpd                   x86_64     2.2.14-jason.1   utterramblings    3.1 M
 subversion              x86_64     1.4.6-jason.1    utterramblings    4.4 M

After this the lemon-web installation should work:

# yum install lemon-web
[...]
=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 lemon-web               noarch     1.0.1-2          lemon             2.7 M
Installing for dependencies:
 lemon-web-libs          noarch     1.0.2-1          lemon              22 k

-- GianniPucciani - 05-May-2010

Edit | Attach | Watch | Print version | History: r8 < r7 < r6 < r5 < r4 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r7 - 2010-05-07 - GianniPucciani
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback