Home‎ > ‎Installation‎ > ‎

Installing Client

INSTALL GUIDE FOR glueman-client

Contents:

  1. Introduction
    1. glueman-client overview
    2. hot to use this manual
  2. Installation instructions
    1. Installation instructions
      1. Prerequisites
        1. Software
        2. License
        3. Other requirements
      2. Installation Steps
        1. Prerequisites Satisfied
        2. Downloading glueman-client
        3. Installing glueman-client
      3. Configurations
        1. Configuration: client.conf
        2. Configuration: gluelogger
  3. Quick Start
  4. Functionalities Description
  5. Example of glueman-client Usage Scenarios
  6. APPENDIX A: How to install OpenPegasus with src.rpm (not SL4 operating system


1. Introduction

This manual is for users of the glueman-client and will give users a guide on how to install and use the glueman-client. If users require further advanced technology information, please refer to the document Architectural overview of glueman-client.

1.1 glueman-client overview

glueman-client is a component that makes queries to the glueman-provider, it receives information about entities and represents them according to different formats (XML, ldif, ...).

glueman-client version: 1.0.
organization: CNAF-INFN
developers: Sergio Andreozzi, Marco Canaparo, Michele Carpené

1.2 How to use this Manual

If you follow this instructions, here's what you'll end up with:
  • glueman-client executable file will be installed underneath /usr/bin. The glueman-client executable file enables you to make queries to the glueman-provider and to receive the information in xml (default), ldif or sql format.
  • an important configuration file named client.conf in /etc/glue/client/conf/default which you can customize according to you needs and put it underneath the /etc/glue/client/conf/local directory.
  • two important files for the logging mechanism. One is located in /etc/cron.daily/ and it is called gluerotate. It a shell script that execute a logrotate of the config file gluelogger. The second file is called gluelogger and it is installed underneath /etc/logrotate.d/. This file specifies some important features about the automatic rotation, compression, removal of log file.


The organization of the rest of the user manual is as follows:
  • Section 2 contains the instructions for the installation of software prerequisites and of the glueman-client. Moreover it explains how you can determine glueman-client's behaviour passing it some parameters by command line or modifying client.conf configuration file.
  • Section 3 concerns the instruction necessary to execute glueman-client

2. Installation Instructions

glueman-client is a component very easy to install.

2.1 Prerequisites



2.1.1 Software

These instructions were written based on Scientific Linux 4.6 installation.

Make sure you've installed the following packages on your Scientific Linux 4 installation before continuing

Software Description
OpenPegasus To install OpenPegasus download it with using the following command wget http://downloads.sourceforge.net/glueman/tog-pegasus-2.7.0-2.el4_6.i386.rpm and install it using the following command: rpm -i tog-pegasus-2.7.0-2.el4_6.i386.rpm You can find futher information about OpenPegasus at www.openpegasus.org
g++ compilers and development libraries To install g++ compilers and development libraries execute the following command: yum install gcc-c++
log4cpp To install log4cpp execute the following command: yum install log4cpp. Further information about log4cpp could be found at http://log4cpp.sourceforge.net/
xerces-c++ To install xerces-c++ execute the following command: yum install xerces-c. Further information about xerces-c++ could be found at http://xerces.apache.org/xerces-c/

2.1.3 Licence

Copyright 2008 Istituto Nazionale di Fisica Nucleare http://www.infn.it

Authors: Sergio Andreozzi, Michele Carpene', Marco Canaparo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

2.2 Installation Steps


2.2.1 Prerequisites Satified

If you want to make sure that all the prerequisites have been satisfied before the installation, execute the following instructions.
In order to check the correct installation of OpenPegasus type the following command. Moreover you can check that the version of tog-pegasus package is 2.7
rpm -qa | grep tog-pegasus
In order to check the correct installation of log4cpp type the following command
rpm -qa | grep log4cpp
In order to check the correct installation of xerces-c type the following command. Moreover you can check that the version of is 2.8
rpm -qa | grep xerces-c

2.2.2 Downloading glueman-client

wget http://downloads.sourceforge.net/glueman/glueman-client-1.0-1.i386.rpm

2.2.3 Installing glueman-client

rpm -i glueman-client-1.0-1.i386.rpm

2.3 Configurations

Sample configuration files have now been installed in the /etc/glue/client/conf/default directory. This sample file should work fine for getting started with glueman-client. You'll need to make just one change before you proceed.
In the new version of glueman-client it is possible to specify by command line a lot of values of configuration.

Executing the following command
$ glueman-client -h
is possible to know all the possibile parameters you can pass to glueman-client.
Here's what you should see after having executing the command before:

*** Usage of glueman-client ***

-h --help Prints this help
-u --user Specifies user name (default YOURACCOUNT)
-p --password Specifies password (default PASSWORD)
-l --location Specifies location for connection (default LOCATION )
--portnumber Specifies portNumber for connection (default 5988)
--local Specifies local connection (default no )
-f --format Specifies format output. Available: xml, sql, ldif (default xml)
-o --output Specifies stdoutput. Available stdoutput: NOMEFILE, console (default console)
--log Specifies log message output. Available values: console NOMEFILE off (default /var/log/glue/log/client.log)
--prioritylevel Specifies the priority level of the logger. Avilable values: [DEBUG|INFO|NOTICE|WARN|ERROR|CRIT|ALERT|FATAL|EMERG] (default DEBUG)

With -u option you can specify the user of the host where glueman-provider is installed, with -p his password.
-l indicates the location where it is supposed that it is installed glueman-provider
--portnumber specifies the port number where openpegasus server is listening to
--local specifies if a connection to localhost is requested
-f you can specifies the desidered format for information (for example xml or ldif)
-o you can specify if you want data printed on screen or on file
--log you can specify a different lof file respect to the default log file
--prioritylevel you can specify the priority level of the logger. The lower it is the level, the higher will be the number of messages printed in the log file

So, in the beta release of glueman-client log.conf file disappeared

Moreover, it is not mandatory to create a new file called client.conf. Anyway if you prefer configuration file to passing arguments by command line, you can check the section below.

2.3.1 Configuration : client.conf

Create a new file in the directory /etc/glue/client/conf/local and name it client.conf.
In the new version of glueman-client, client.conf file has a different format. In this file we gathered all the information previously present in log.conf and client.conf file. Moveover we do not use iniparser library any more, but another library called anyoption. For these reasons the format of glueman-client configuration file changed a bit.
In client.conf you have to specify how glueman-client can reach an OpenPegasus cimserver with glueman-provider installed.
In particular you have to specify:
  • Your username and password and the location of a glueman-provider
  • If you want xml or ldif rendering of the result
  • If you want that the output will be printed on console or on a file named FILENAME
  • The file where you want to output log messages
  • The priority level of the debugger
Below you can see a template of client.conf file
user : USER
password : PASSWORD
location : GLUEMAN-PROVIDER HOST
portnumber : 5988
format : [xml | ldif | sql]
output : [console | NOMEFILE ]
log : /PATH-TO-FILE/logfile.log
prioritylevel : [NOTSET|DEBUG|INFO|NOTICE|WARN|ERROR|CRIT|ALERT|FATAL|EMERG]
TTL : 10

TTL is a parameter that specifies the time to live of the cache of glueman-client.

With gluman-client rpm a client.conf file is installed. This file is important because it determines the glueman-client's default behaviour
user : ROOT
password : PASSWORD
location : GLUEMAN-PROVIDER HOST
portnumber : 5988
format : xml
output : console
log : /var/log/glue/log/client.log
prioritylevel : DEBUG
TTL : 10

2.3.2 Configuration : gluelogger

The gluelogger file is responsibile for automatic rotation, compression and removal of the log file. it is handled daily. gluelogger file installed with glueman-client rpm is shown below
#
# File: /etc/logrotate.d/gluelogger
#
# Detail: Logrotate config for providers log file
/var/log/glue/log/client.log {
# If file grows over 200K, rotate it
size 200
# keep 6 copy of backlogs
rotate 6
# Truncate the original log file in place after creating a copy
copytruncate
# log files compressed
compress
}
It specifies what is the log file to handle: /var/log/glue/log/client.log. For this file:
  • size 200 indicates that if the file grows over 200K, logrotate have to rotate it
  • rotate 6 indicates that it will keep at most 6 copy of backlogs
  • copytruncate specifies that it has to truncate the original log file in place after creating a copy
  • compress specifies that old version of log file will be compressed

If want to use a different log file, please modify gluelogger file in /etc/logrotate.d/ directory in order to let it handle your file log.

3. Quick start

In order to test the client type
glueman-client -u YOURACCOUNT -p YOURPASSWORD -l GLUEMAN-PROVIDER-LOCATION
Anyway if you modified client.conf file with user, password and location information you can type simply
glueman-client
If you want to check the behaviour of glueman-client look at /var/log/glue/log/client.log file.

4. Functionalities description

glueman-client enables to connect to an OpenPegasus server which exposes GLUE2-based information of grid resources and renders the output in different data formats (i.e. xml, ldif).
It is important to underline that GLUEMan performs validation of data and only meaningful info are exposed (where meaningful means both properties and associations make sense). In order to build the rendering, the GLUEMan client performs a hierarchical navigation of the data following the structure of GLUE and the desidered rendering structure.

5. Example of glueman-client Usage Scenarios

In order to be used glueman-client requires a running OpenPegasus server with GLUE2-related providers (see here for installing and configuring the server side).
Then select the server do you want to query and acquire the necessary information: username, password, location, port.

APPENDIX:

How to install OpenPegasus with src.rpm (not SL4 operating system)


In order to install OpenPegasus on Scientific Linux 3 (or other platform) download the following file (see Download section)

1. Download tog-pegasus source rpm
wget http://www.openpegasus.org/pr/uploads/40/14962/tog-pegasus-2.7.0-2.src.rpm

2. Install the Source RPM using the following command:
rpm -ih tog-pegasus-2.7.0-2.src.rpm

3. Build the binaries RPMs for OpenPegasus 2.7.0 using
rpmbuild -bb --define 'LINUX_VERSION {distro}' /usr/src/redhat/SPECS/tog-pegasus.spec

4. The resulting binary RPMs will be placed in the following location
/usr/src/redhat/RPMS/{arch}/tog-pegasus-2.7.0-2.{distro}.{arch}.rpm
/usr/src/redhat/RPMS/{arch}/tog-pegasus-devel-2.7.0-2.{distro}.{arch}.rpm

5. Install OpenPegasus
cd /usr/src/redhat/RPMS/{arch}/
$ rpm -i tog-pegasus-2.7.0-2.{distro}.{arch}.rpm
$ rpm -i tog-pegasus-devel-2.7.0-2.{distro}.{arch}.rpm
Comments