Home‎ > ‎Installation‎ > ‎

Installing the Server (framework for providers)

INSTALL GUIDE FOR glueman-provider


Contents:

  1. Introduction
    1. glueman-provider overview
    2. how to use this manual
  2. Installation instructions
    1. Prerequisites
      1. Software
      2. Licence
      3. Other requirements
    2. Installation Steps
      1. Prerequisites Satisfied
      2. Downloading glueman-provider
      3. Installing glueman-provider
    3. Configurations
      1. Configuration step 1: access.conf
      2. Configuration step 2: enable http connection
      3. Configuration step 3: providers.conf
      4. Configuration step 4: information providers configuration
      5. Configuration step 5: logger configuration
  3. Quick Start
  4. Fuctionalities Description
    1. the cimconfig command
    2. the cimcli command
    3. the cimprovider command
    4. How to enable/disable providers Modules
  5. Examples of GLUEMan providers usage scenarios
    1. Creating Associations
  6. Troubleshooting
    1. Installation Problems
    2. Usage Problems


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

1.1 glueman-provider overview
glueman-provider is a component that sends to the client informations represented like couples attribute-value.
This provider implements the GLUE2 schema and fills instances of the schema's classes with attributes returned by a script (the information provider) created by the user in any programming language (Perl, Python, ecc..).
The client receives these instances serialized and provides the proper rendering in XML or other formats.

glueman-provider 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-provider library installed: /usr/lib/Pegasus/providers/libGLUE2.so
  • configuration files copied into proper folders: /etc/glue/providers/conf
  • cache files and log file copied into /var/log/glue/cache and /var/log/glue/log
  • GLUE2Module registered

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-provider. Moreover it explains how you can determine glueman-provider's behaviour modifying configuration files
  • Section 3 concerns the instructions necessary to execute glueman-provider

2. Installation Instructions
glueman-provider is 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 the OpenPegasus software: download it 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/
Cimple To install Cimple: download it wget http://downloads.sourceforge.net/glueman/cimple-1.2.0-1.i386.rpm and install it using the following command rpm -i cimple-1.2.0-1.i386.rpm You can find further information about Cimple at www.cimple.org

2.1.2 Licence

Licence for GLUEMan:

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.1.3 Other requirements
Assumptions made:
knowledge of installation of rpm
knowledge of GLUE2 standard

2.2 Installation Steps

2.2.1 Prerequisites Satified
If you want to make sure that all the prerequisites must have been satisfied before the installation execute the following instructions.
In order to check the correct installation of OpenPegasus type the following command and check that everything is ok
rpm -qa tog-pegasus
In order to check the correct installation of Cimple type the following command and check that everything is ok
rpm -qa cimple
and so also for log4cpp

2.2.2 Downloading glueman-provider
wget http://downloads.sourceforge.net/glueman/glueman-provider-1.0-1.i386.rpm

2.2.3 Installing glueman-provider
rpm -i glueman-provider-1.0-1.i386.rpm

this will create also new directories: /etc/glue and /var/log/glue for cache and configuration files.

2.3 Configurations
Sample configuration files have now been installed in the /etc/glue/providers/conf/default directory. This sample file should work fine for getting started with glueman-provider.

2.3.1 Configuration step 1: access.conf

Chose which unix account can access to Pegasus:

OpenPegasus provides several ways to authenticate clients. The basic approach is to use a UNIX account. Therefore you can define a UNIX account (name and password) and authorize it by editing the file /etc/Pegasus/access.conf

vi /etc/Pegasus/access.conf

for example you can add root in this line to allow http connection also for root user:

-: ALL EXCEPT pegasus root:wbemNetwork

by default the http/s connection is enabled only for Pegasus users


2.3.2 Configuration step 2: enable http connection

Enable http connection with cimconfig command:

cimconfig -p -s enableHttpConnection=true

and then type:

service tog-pegasus restart


2.3.3 Configuration step 3: providers.conf

In the same folder there is also the providers.conf general file, inside this file you can set:
  • the alarm parameter which enables the timeout in the case your script provider is blocked, the thread executing your script will be killed, if you don't set this parameter the default timeout value is 10 seconds
  • The log-cache-dirs parameter which sets the path for the logfile
  • the logger priority level

[configuration]
log-cache-dirs = /var/log/glue/;
prioritylevel = DEBUG;
ALRM = 4;

The log file /var/log/glue/log/providers.log is managed by the unix utility logrotate which is configured by two files:

  • gluerotate: a bash script executed everyday by the cron deamon and copied by the rpm installer into the daily.cron folder
  • gluelogger: a configuration file for the logrotate unix command which sets options like the number of rotation files and the maximum size of the log file

The rpm installer copies the first file into daily.cron and the second one into /etc/logrotate.d folder, if the user wants he can change the gluelogger preferences.

2.3.4 Configuration step 4: information provider configuration

In order to create your personal information provider you have to write your own script which sends in output the attribute-value pairs according to a proper format: in the example we have created a simple Perl script that executes a sequence of print commands, sending on output all the attribute values for the class AdminDomain.
The format is:
[n1]
ID = urn:admindomain:t1.infn.it
Name = INFN-T1
Description = This is the italian T1 of EGEE Grid
WWW = http://www.cnaf.infn.it
OtherInfo = Part-of-INFN-GRID
Distributed = true
Owner = INFN
The output of your information provider must be like the one above, every instance of a particular class must be described by an enumerative [n1/n2....nx] and a sequence of couples attribute/value.
Each Information Provider is associated to one Pegasus module, for example this one is associated with the AdminDomain_Module.
To know how to register or unregister providers modules read the section Functionalities, anyway the provider module is responsible to return class instances (filled with your own attributes) to the glueman client, after the client writes the output informations in different formats (e.g. XML).
Once you have created your own script you can put it into the folder /opt/glueman/providers. The software glueman will run them at the moment of a client request, it is obvious that you can create your personal script in whatever programming language you want (Perl, Python, etc...).
The only requirement is that your script returns back informations on the standard output in the format we have showed because glueman needs this kind of representation to create runtime the instances for the client, furthermore the information provider script path have to be set properly in the configuration file of the provider.
With the software rpm, we provide a collection of examples to try to make queries with glueman-client on the provider, in this case we have created some hardcoded perl script that you can test for example with the cimcli command.
The glueman.tar.gz folder containing provider examples will be copied into /opt/glueman/providers/ and if you want to use these examples you can untar the file into the same folder.
You can also download the glueman.tar.gz file from glueman.tar.gz (or from the same page where you download the glueman-provider rpm) and put the examples into the /opt/glueman/providers/ folder.

When you have put your script into the /opt/glueman/providers/ folder you have to write a series of configuration files: in particular for this example you have to create AdminDomain.conf into the /etc/glue/providers/conf/local/ folder.
In this file you will set:
  • the script path
  • the TimeToLive for the cache (a file containing the Information Providers output), the TimeToLive is simply a parameter which sets the time for the cache file to be refreshed if you don't query the providers for a certain amount of time
  • the InstanceClass name (e.g. AdminDomain)

The rpm installer will create two different folders: one is /default for the default configuration files (AdminDomain.conf.dist) and the other one is /local, for user defined configuration files (AdminDomain.conf)

[configuration]
namespace = glue2
classname = AdminDomain
TTL = 10
scriptfpath = /opt/glueman/providers/AdminDomain.pl

If GLUEMan doesn't find the conf file GLUE2ClassName.conf into local it will search GLUE2ClassName.conf.dist into default, in the installation package we have inserted the default configuration files so you haven't to do anything else except done for creating your information providers scripts.

Finally there's another file to configure: the static.conf file into the /opt/glueman/ folder.
This file contains the static representation of instances by the Administrator and it's written also in the ini format.
When glueman receives the request from the client it activates the scripts and then it reads the static.conf file, the information which results is the union of static and dynamic values.
The idea is that the System Administrator configures the static file containing static attributes and that the developers of the service write the provider scripts that retrieve dynamic information from the underlying system, static attributes are attributes that have to be set manually and that could not be read using some particular function as for example querying the batch system.
The Administrator have to be sure that instances ids are set properly into the static file, this is mandatory becouse glueman has to recognize instances identifiers to merge attribute static and dynamic into an unique instance (this feature of the static.conf file has been introduced from beta release of glueman).
Above we show an example of the static.conf file content

[ComputingService_1]
ID = urn:infn:cnaf:computing;
Name = INFN-T1 computing service;
Capability = executionmanagement.jobexecution;
Type = org.glite.ce.lcg;
QualityLevel = production;
StatusPage = http://...;
Complexity = endpointType=1, share=2, resource=1;

[ComputingEndpoint_1]
ID = urn:infn:cnaf:computing:endpoint:1;
Name = INFN-T1 computing endpoint;
URL = gram://grid011f.cnaf.infn.it:2119;
Capability = executionmanagement.jobexecution;
Technology = legacy;
InterfaceName = GRAM;
InterfaceVersion = 1.6;
Implementor = globus+cern;
ImplementationName = lcg-pbs;
ImplementationVersion = x.y;
QualityLevel = production;
HealthState = ok;
ServingState = production;

[ExecutionEnvironment_1]
LocalID = urn:acme:xeon1\n;
OSFamily = Linux;
PlatformType = i386;


3. Quick start

After installing glueman-provider you have to register the module libGLUE2.so into the CIMServer repository:

regmod -n GLUE2 -c -i /usr/lib/Pegasus/providers/libGLUE2.so

Where GLUE2 is the namespace of GLUEMan into the Pegasus repository.
Once you have configured all the system properly, you can try to execute:

cimcli -n GLUE2 ei GLUE_AdminDomain

and the software will output:

instance of GLUE_AdminDomain
{
ID = "urn:admindomain:t1.infn.it";
Name = "INFN-T1";
Description = "This is the italian T1 of EGEE Grid";
WWW = {"http://www.cnaf.infn.it"};
OtherInfo = {"Part-of-INFN-GRID"};
Distributed = TRUE;
Owner = {"INFN"};
};

4. Description Functionalities

4.1 The cimconfig command
The cimconfig command manages CIM Server configuration properties. The operations are executed on the CIM Server running on the localhost.
Use the cimconfig command to get, set, or unset CIMServer property values. Use the -l (list) option to see all properties and their values.
An operation on a current property (cimconfig with -c option) takes effect immediately.
An operation on a planned property (cimconfig with a -p option) takes effect the next time the CIM Server is started with the service tog-pegasus start command.
Modifications made by cimconfig remain in effect until they are changed by another cimconfig command. The CIM Server must be running to change the current configuration options.
You can temporarily modify property values when OpenPegasus is down, by entering options at start up in the cimserver command line. However. these modifications last only as long as the execution of the CIM Server.

In our case, after having installed OpenPegasus you have to run the following command
cimconfig -p -s enableHttpConnection=true
in order to be enable to make tests.

After executing the command above you MUST restart cimserver
service tog-pegasus restart

In order to show the value of enableHttpConnection you have to run the following command
cimconfig -g enableHttpConnection

4.2 The cimcli command
The cimcli command is a OpenPegasus command that execute single CIM Operations. Cimcli is normally with several options. Some of which are:
  • - u User. Defines user name for authentication
  • - p password. Defines password for authentication
  • - n namespace. Specifies namespace to use for operation

Options vary by command consistent with CIM Operations some of them are:
ni enumerateInstanceNames Enumerate instancenames of <instancename>
niall enumallInstanceNames Enumerate all instancenames in namespace.
ei enumerateInstances Enumerate instances of <classname>
gi getInstance Get instance of <objectname> | <classname>
a associators Enumerate Associators of <classname>|<instancename>.
an associatorNames Enumerate Associator Names of <classname>|<instancename>
For other information on cimcli command, after having installed tog-pegasus, type
cimcli -h

For testing glueman-provider using cimcli command you can run the following commands:

cimcli -n GLUE2 ei GLUE_AdminDomain
...

4.3 The cimprovider command
The cimprovider command - disable, enable, remove or list registered CIM provider modules and modules status

4.4 How to enable/disable providers Modules
After installing glueman-provider you have to register the module libGLUE2.so into the CIMServer:

regmod -n GLUE2 -c -i /usr/lib/Pegasus/providers/libGLUE2.so

in order to see names and status of the modules loaded run the following command:
cimprovider -l -s

It is also possible to enable and disable a single provider. For example if you want only to enable the GLUE_AdminDomain provider run the following command
regmod -n GLUE2 -c -i /usr/lib/Pegasus/providers/libGLUE2.so GLUE_AdminDomain

In order to unregister libGLUE2.so run the following command
regmod -n GLUE2 -u -c -i /usr/lib/Pegasus/providers/libGLUE2.so

It is also possible to disable a single provider. For example if you want to disable the GLUE_AdminDomain provider run the following command:
regmod -n GLUE2 -u -c -i /usr/lib/Pegasus/providers/libGLUE2.so GLUE_AdminDomain


5. Examples of glueman-provider usage scenarios

After everything has been installed you can execute cimcli ei queries on instances of AdminDomain, Service or Endpoint to read on standard output what is received from the information providers.
You can also create your own script and test them, if something goes wrong you can read the providers.log file to know what is gone bad.

5.1 Creating Associations

if you also want to create associations between instances you have to fill the right attributes values into the instance in your provider script.
For example:

[AdminDomain_1]
CreationTime=2006-05-04T18:13:51.0Z;
Validity=92;
BaseType=Domain;
ID=INFN:T1;
Name=INFN T1;
Extension=quartiere$sandonato quartiere$savena;
GLUE_LocationLocalID=urn:italy:bologna;
GLUE_ContactLocalID=urn:infn:cnaf:t1admin-3 urn:infn:cnaf:t1admin-2 urn:infn:cnaf:t1admin;
GLUE_ComputingServiceID=urn:infn:cnaf:computing;

With the last version of GLUEMan the Links are not implemented with real concrete providers but with these properties inside the classes instances.

6. Troubleshooting

This section will help users to solve the possible problems during the usage of glueman-provider. It will list parts of the problem that users may encounter and ways to solve them. If users can not find the proper solution for their problem, please see more help information at http://support.omii-europe.org or contact support@omii-europe.org.

6.1 Installation Problems

6.1.1 If you have the automatic updating/downgrade active it could append that the system download and install the wrong version of OpenPegasus.

It's better to execute:

chkconfig yum-autoupdate off
service yum-autoupdate stop

6.1.2 If you want to uninstall glueman-provider be careful to deregister before the libGLUE2.so module to avoid problems after reinstalling.

To deregister libGLUE2.so library simply type
regmod -n GLUE2 -u -c -i /usr/lib/libGLUE2.so

6.1.3 if you have not the yum command installed.

use apt-get install or install yum with apt-get install yum.

Alternatively you could download the rpm from a mirror site like for example:

http://dag.wieers.com/rpm/packages/log4cpp/

6.2 Usage problems

6.2.1 If after executing cimcli you will not able to see any response please:
  • stop cimcli execution with CTRL-C command
  • type "ps -e" In order to see if there are more than one cimserver process running.
  • If there are more than one cimserver process running please execute the following command
service tog-pegasus restart
If this command is executed correctly you will be able using cimcli command again.

6.2.2 When executing the following command:
cimconfig -p -s enableHttpConnection=true
please make sure to type enableHttpConnection in the correct way. Otherwise Pegasus will add a wrong entry into its configuration files and you'll not be able again to restart cimserver.
After you have to uninstall and reinstall the tog-pegasus package.

6.2.3 After run "cimcli ei GLUE_Instance" you have this:
> [root@omiitest07 local]# cimcli ei GLUE_AdminDomain
>
> cimcli CIMException: Cmd= ei Object= GLUE_AdminDomain
>
> CIM_ERR_INVALID_CLASS: GLUE_AdminDomain
please check if you have copied the providers into the /opt/glueman/providers folder.

6.2.4 Scientific Linux Security Edition

If you have SELinux then set SELINUX=disabled in /etc/sysconfig/selinux and then run "setenforce 0"

This because SELinux has more complicated permission configurations and this could give you a lost connection invoking the provider.
Comments