Changes between Initial Version and Version 1 of installation_guide

Show
Ignore:
Timestamp:
06/10/11 17:31:07 (13 years ago)
Author:
piontek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • installation_guide

    v1 v1  
     1[[PageOutline]] 
     2Contact: [mailto:piontek@man.poznan.pl Tomasz Piontek] [mailto:pkopta@man.poznan.pl Piotr Kopta] 
     3 
     4= QCG Broker Installation = 
     5 
     6The !QosCosGrid Resource Management System (QCG-Broker) is an open source meta-scheduling system, which allows developers to build and deploy resource management systems for large scale distributed computing infrastructures. The QCG-Broker, based on dynamic resource selection, mapping and advanced scheduling methodology, combined with feedback control architecture, deals with dynamic Grid environment and resource management challenges, e.g. load-balancing among clusters, remote job control or file staging support. Therefore, the main goal of the QCG-Broker is to manage the whole process of remote job submission to various batch queuing systems, clusters or resources. It has been designed as an independent core component for resource management processes which can take advantage of various low-level Core Services and existing technologies. Finally, the QCG-Broker can be considered as a robust system which provides abstraction of the complex grid infrastructure as well as a toolbox which helps to form and adapts to distributing computing environments. 
     7 
     8= Requirements = 
     9* '''Java (>= 1.5)'''\\ 
     10{{{ 
     11#!div style="font-size: 90%" 
     12For SL5.x 
     13{{{#!sh 
     14yum install java-1.6.0-sun-compat.x86_64 
     15}}} 
     16}}} 
     17* '''PostgreSQL (>= 7.0)''' - configured to allow TCP/IP connections from localhost (default configuration) 
     18{{{ 
     19#!div style="font-size: 90%" 
     20For SL5.x 
     21{{{#!sh 
     22yum install postgresql-server.x86_64 
     23}}} 
     24}}} 
     25 
     26 Start the PostgreSQL service: 
     27{{{ 
     28#!div style="font-size: 90%" 
     29For SL5.x 
     30{{{#!sh 
     31service postgresql start 
     32}}} 
     33}}} 
     34* '''Apache Ant''' (>= 1.6) ("Optional tasks for ant" are required. For SL5.x the ''ant-nodeps.x86_64'' package must be installed) 
     35{{{ 
     36#!div style="font-size: 90%" 
     37For SL5.x 
     38{{{#!sh 
     39yum install ant.x86_64 ant-nodeps.x86_64 
     40}}} 
     41}}} 
     42* '''xml-commons-apis''' - installation of this package is not mandatory, but is recommended to avoid confusing information about not important errors. 
     43{{{ 
     44#!div style="font-size: 90%" 
     45For SL5.x 
     46{{{#!sh 
     47yum install xml-commons.x86_64 xml-commons-apis.x86_64 
     48}}} 
     49}}} 
     50* '''certificates''' 
     51 * QCG-Broker' certificate and private key signed by one of trusted Certificate Authorities [CA], 
     52 * set of trusted CA certificates (must be coppied either into `/etc/grid-security/certificates` or `QCG-BROKER_USER_HOME/.globus/certificates` directory) 
     53 
     54 For the PL-Grid Project install Polish Grid and PL-Grid Simpla-CA certificates: 
     55{{{ 
     56#!div style="font-size: 90%" 
     57{{{#!sh 
     58wget https://dist.eugridpma.info/distribution/igtf/current/accredited/RPMS/ca_PolishGrid-1.38-1.noarch.rpm 
     59wget http://software.plgrid.pl/packages/general/ca_PLGRID-SimpleCA-1.0-2.noarch.rpm 
     60wget https://dist.eugridpma.info/distribution/util/fetch-crl/fetch-crl-2.8.5-1.noarch.rpm 
     61 
     62su - 
     63rpm -i ca_PolishGrid-1.38-1.noarch.rpm  
     64rpm -i ca_PLGRID-SimpleCA-1.0-2.noarch.rpm  
     65 
     66#install certificate revocation list fetching utility 
     67rpm -i fetch-crl-2.8.5-1.noarch.rpm 
     68  
     69#get fresh CRLs now 
     70/usr/sbin/fetch-crl  
     71  
     72#install cron job for it 
     73echo '#!/bin/sh' > /etc/cron.daily/fetch-crl.cron 
     74echo '/usr/sbin/fetch-crl' >> /etc/cron.daily/fetch-crl.cron 
     75chmod a+x /etc/cron.daily/fetch-crl.cron 
     76}}} 
     77}}} 
     78* '''range of opened ports''' 
     79 
     80  QCG-Broker needs set of opened ports to be able to receive notifications about changes of jobs and tasks statuses and to communicate with gridFTP server.The port range must be set in ~/.globus/cog.properties file. 
     81{{{#!sh 
     82mkdir -p ~/.globus 
     83echo "tcp.port.range=5000,5100" >> ~/.globus/cog.properties 
     84}}} 
     85 
     86 
     87= Preparing the environment = 
     88 
     89'''IMPORTANT:''' Altought it's possible to install QCG-Broker service on any account (`root`, regular user) we strongly recommend to deploy QCG-Broker service on the account designated specifically for this service (`qcg-broker` for example). 
     90 
     91We recommend to create a new user (e.g. `qcg-broker`) that will be used by the service to run in unprivileged mode 
     92{{{ 
     93#!div style="font-size: 90%" 
     94{{{#!sh   
     95mkdir -p /opt/QCG 
     96useradd -d /opt/QCG/qcg-broker -m -s /bin/bash qcg-broker  
     97}}} 
     98}}} 
     99'''IMPORTANT:''' If you want to configure QCG-Broker to use its own list of trusted CA certificates, please do not forget to copy them into `~/.globus/certificates` directory. 
     100 
     101= Database setup = 
     102* Create new database user (e.g. `qcg-broker`) authenticated via password (the same password must be later used to setup QCG-Broker deployment): 
     103{{{ 
     104#!div style="font-size: 90%" 
     105{{{#!sh 
     106su - postgres 
     107createuser -P qcg-broker 
     108 
     109Enter password for new role:  
     110Enter it again:  
     111Shall the new role be a superuser? (y/n) n 
     112Shall the new role be allowed to create databases? (y/n) y 
     113Shall the new role be allowed to create more new roles? (y/n) n 
     114CREATE ROLE 
     115 
     116exit 
     117}}} 
     118}}} 
     119 
     120* Create new database (e.g. qcg-broker) owned by the `qcg-broker` user: 
     121{{{ 
     122#!div style="font-size: 90%" 
     123{{{#!sh 
     124su - qcg-broker 
     125createdb -U qcg-broker qcg-broker 
     126exit 
     127}}} 
     128}}} 
     129 '''Note:''' The `qcg-broker` user must be allowed to create new databases. 
     130 
     131* Depending on the local PostgreSQL configuration you may need to edit the `pg_hba.conf` file  (''host based authentication'' configuration file) to enable password authentication to the `qcg-broker` database for the `qcg-broker` user. 
     132 
     133 For SL5.x: edit the `/var/lib/pgsql/data/pg_hba.conf` file. 
     134 
     135 If the PostgreSQL installation is fully dedicated for QCG-Broker replace the default configuration with rules (lines) given below, otherwise insert them to the configuration file in a proper place: 
     136{{{ 
     137#!div style="font-size: 90%" 
     138{{{#!default 
     139local   qcg-broker   qcg-broker                         md5 
     140host    qcg-broker   qcg-broker   127.0.0.1/32          md5 
     141}}} 
     142}}} 
     143 
     144 '''Note:''' You must reload the PostgreSQL server in order to make the changes visible e.g: 
     145{{{ 
     146#!div style="font-size: 90%" 
     147{{{#!sh 
     148service postgresql reload 
     149}}} 
     150}}} 
     151 
     152= Installation = 
     153 
     154'''IMPORTANT:''' Perform the installation as the `qcg-broker` user. 
     155{{{ 
     156#!div style="font-size: 90%" 
     157{{{#!sh 
     158su - qcg-broker 
     159}}} 
     160}}} 
     161 
     162* download the QCG-Broker archive from [[http://node2.qoscosgrid.man.poznan.pl/~piontek/qcg-broker/qcg-broker.tgz|qcg-broker.tgz]] 
     163{{{ 
     164#!div style="font-size: 90%" 
     165{{{#!sh 
     166wget http://node2.qoscosgrid.man.poznan.pl/~piontek/qcg-broker/qcg-broker.tgz 
     167}}} 
     168}}} 
     169 
     170* unpack the archive 
     171{{{ 
     172#!div style="font-size: 90%" 
     173{{{#!sh 
     174tar xzf qcg-broker.tgz 
     175}}} 
     176}}} 
     177 
     178== Compilation [Optional step] == 
     179The distribution contains precompiled version of QCB-Broker, that can be deployed as it is. The compilation step is optional and can be skiped, except the situation in which some specific compiler options should be added or changed. 
     180 
     181* compile sources 
     182{{{ 
     183#!div style="font-size: 90%" 
     184{{{#!sh 
     185cd qcg-broker-<VERSION> 
     186ant rebuildall 
     187}}} 
     188}}} 
     189 
     190== Setup == 
     191* setup deployment configuration - all configuration variables are placed in the `deploy.prop` file 
     192 * '''deploy.dir''' - directory where QCG-Broker will be deployed. This directory must not exist, so before deployment this directory must be eventually removed by hand. Later we assume that QCG-Broker was installed into `/opt/QCG/qcg-broker/service` directory.  
     193 * '''deploy.certs.dir''' - directory with QCG-Broker credentials (must contain `grmscert.pem` and `grmskey.pem`) 
     194 * '''deploy.cert.dn''' distinguish name of QCG-Broker credential 
     195 * '''deploy.db.user''' PostgreSQL user name 
     196 * '''deploy.db.pwd''' Password for PostgreSQL user 
     197 * '''deploy.db.host''' PostgreSQL database host name (`127.0.0.1` by default. If PostgreSQL service is on the same host as QCG-Broker, this property should not be changed. Otherwise some changes in PostgreSQL configuration (`pg_hba.conf` file) may be needed). 
     198 * '''deploy.db.name''' PostgreSQL database name 
     199 * '''deploy.https_port''' the port which QCG-Broker will be listening for https requests on 
     200 * '''deploy.rmi_port''' the port needed for internal communication between QCG-Broker components. 
     201 * '''deploy.shutdown_port''' the port which the tomcat will be listening for shutdown requests on 
     202 * '''deploy.port_range''' the range of opened ports 
     203 
     204* setup QCG-Broker database 
     205{{{ 
     206#!div style="font-size: 90%" 
     207{{{#!sh 
     208cd qcg-broker-<VERSION> 
     209ant -f build.deploy.xml setupdb 
     210}}} 
     211}}} 
     212 
     213== Deployment == 
     214Process of deployment is responsible for copping the QCG-Broker distribution to destination directory and configuring the service. 
     215 
     216* Deploy QCG-Broker service 
     217{{{ 
     218#!div style="font-size: 90%" 
     219{{{#!sh 
     220ant deploy 
     221}}} 
     222}}} 
     223 
     224= Configuration = 
     225* Edit the `QCG-BROKER-DEPLOY_DIR/broker/etc/providers.list` file specyfying list of resource providers (instances of QCG BES/AR services controling resources and creating together virtual pool of resources) 
     226 
     227 '''providers.count'''=<n> - number of providers 
     228 
     229 For x=0 to n-1 define locations of domain providers: 
     230 
     231 '''provider.x.domain'''=<DOMAIN> - name of the administrative domain, which resources controlled by the given provider belong to,\\ 
     232 '''provider.x.type'''=qcg - type of the provider, DO NOT CHANGE THIS VALUE,\\ 
     233 '''provider.x.id'''=<PROVIDER ID> - identifier of the provider (must be globally unique),\\ 
     234 '''provider.x.location'''=<LOCATION>  - address of provider service.\\ 
     235 
     236 For example: 
     237{{{ 
     238#!div style="font-size: 90%" 
     239{{{#!sh 
     240<pre> 
     241# how many providers should be used for testing 
     242providers.count=1 
     243 
     244provider.0.domain=PSNC 
     245provider.0.id=qcg_cluster 
     246provider.0.type=qcg 
     247provider.0.location=httpg://qcg.man.poznan.pl:19000 
     248</pre> 
     249}}} 
     250}}} 
     251 
     252* For cross-clusters job submission, edit `QCG-BROKER_DEPLOY_DIR/broker/etc/config.prop` file, and set following variables: 
     253 * '''broker.qoscos.proactive.pncURL''' - !ProActvie node coordinator address 
     254 * '''broker.qoscos.ompi.pncURL''' - OpenMPI node coordinator address 
     255 
     256 See [[installation_QCG_ProActive_Coordinator|QCG-ProActive Coordinator]], [[installation_QCG_OpenMPI_Coordinator|QCG-OpenMPI Coordinator]] for detailed information about installation of !ProActive and OpenMPI node coordinators. 
     257 
     258= Resource Providers setup = 
     259To allow QCG-Broker  to create and manage advance reservations on resources accessible via [[QCG_BES_AR|QCG BES/AR]] service some additional configuration steps are needed on Administrative Domain level:  
     260* the QCG-Broker credential must be mapped (in the `grid-mapfile` file) to the local user that is authorized to create and manage reservations. Usually the LRMS administrator user (like `sgeadmin` in SGE or `lsfadmin` in LSF) has sufficient rights, e.g.: 
     261{{{ 
     262#!div style="font-size: 90%" 
     263{{{#!default 
     264"/C=PL/O=GRID/O=PSNC/CN=qcg-broker/qcg.man.poznan.pl" sgeadmin 
     265}}} 
     266}}} 
     267 
     268= Starting the service = 
     269As the `qcg-broker` user type: 
     270{{{ 
     271#!div style="font-size: 90%" 
     272{{{#!sh 
     273cd /opt/QCG/qcg-broker/service 
     274./broker/bin/start-broker.sh 
     275./service/bin/startup.sh 
     276}}} 
     277}}} 
     278 
     279'''IMPORTANT:''' Do not forget to set `JAVA_HOME` or `JRE_HOME` environment variables. 
     280= Stopping the service = 
     281As the `qcg-broker` user type: 
     282{{{ 
     283#!div style="font-size: 90%" 
     284{{{#!sh 
     285cd /opt/QCG/qcg-broker/service 
     286./broker/bin/stop-broker.sh 
     287./service/bin/shutdown.sh 
     288}}} 
     289}}} 
     290= Veryfing the installation = 
     291To verify the installtion please use [[QCG_Broker_Client|QCG Broker Client]]. 
     292To verify the installtion please use [[installation_QCG_Broker_Client|QCG Broker Client]].