INSTALL GUIDE FOR glueman-providerContents:
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:
The organization of the rest of the user manual is as follows:
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
2.1.2 Licence Licence for GLUEMan: Copyright 2008 Istituto Nazionale di Fisica Nucleare http://www.infn.it 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-pegasusIn order to check the correct installation of Cimple type the following command and check that everything is ok rpm -qa cimpleand 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:
[configuration] The log file /var/log/glue/log/providers.log is managed by the unix utility logrotate which is configured by two files:
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]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 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] 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] 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 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=truein 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:
Options vary by command consistent with CIM Operations some of them are:
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:
service tog-pegasus restartIf 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=trueplease 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_AdminDomainplease 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. |