Changes between Initial Version and Version 1 of installation_guide_rpm

Show
Ignore:
Timestamp:
06/28/11 15:51:36 (13 years ago)
Author:
piontek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • installation_guide_rpm

    v1 v1  
     1[[PageOutline]] 
     2 
     3= QCG Broker Installation = 
     4 
     5The !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. 
     6 
     7= Requirements = 
     8* '''Java (>= 1.5)'''\\ 
     9{{{ 
     10#!div style="font-size: 90%" 
     11For SL5.x 
     12{{{#!sh 
     13yum install java-1.6.0-sun-compat.x86_64 
     14}}} 
     15}}} 
     16* '''PostgreSQL (>= 7.0)''' - configured to allow TCP/IP connections from localhost (default configuration) 
     17{{{ 
     18#!div style="font-size: 90%" 
     19For SL5.x 
     20{{{#!sh 
     21yum install postgresql-server.x86_64 
     22}}} 
     23}}} 
     24 
     25 Start the PostgreSQL service: 
     26{{{ 
     27#!div style="font-size: 90%" 
     28For SL5.x 
     29{{{#!sh 
     30service postgresql start 
     31}}} 
     32}}} 
     33* '''Apache Ant''' (>= 1.6) ("Optional tasks for ant" are required. For SL5.x the ''ant-nodeps.x86_64'' package must be installed) 
     34{{{ 
     35#!div style="font-size: 90%" 
     36For SL5.x 
     37{{{#!sh 
     38yum install ant.x86_64 ant-nodeps.x86_64 
     39}}} 
     40}}} 
     41* '''xml-commons-apis''' - installation of this package is not mandatory, but is recommended to avoid confusing information about not important errors. 
     42{{{ 
     43#!div style="font-size: 90%" 
     44For SL5.x 
     45{{{#!sh 
     46yum install xml-commons.x86_64 xml-commons-apis.x86_64 
     47}}} 
     48}}} 
     49* '''certificates''' 
     50 * QCG-Broker' certificate and private key signed by one of trusted Certificate Authorities [CA], 
     51 * set of trusted CA certificates (must be coppied either into `/etc/grid-security/certificates` or `QCG-BROKER_USER_HOME/.globus/certificates` directory) 
     52 
     53 For the PL-Grid Project install Polish Grid and PL-Grid Simpla-CA certificates: 
     54{{{ 
     55#!div style="font-size: 90%" 
     56{{{#!sh 
     57wget https://dist.eugridpma.info/distribution/igtf/current/accredited/RPMS/ca_PolishGrid-1.38-1.noarch.rpm 
     58wget http://software.plgrid.pl/packages/general/ca_PLGRID-SimpleCA-1.0-2.noarch.rpm 
     59wget https://dist.eugridpma.info/distribution/util/fetch-crl/fetch-crl-2.8.5-1.noarch.rpm 
     60 
     61su - 
     62rpm -i ca_PolishGrid-1.38-1.noarch.rpm  
     63rpm -i ca_PLGRID-SimpleCA-1.0-2.noarch.rpm  
     64 
     65#install certificate revocation list fetching utility 
     66rpm -i fetch-crl-2.8.5-1.noarch.rpm 
     67  
     68#get fresh CRLs now 
     69/usr/sbin/fetch-crl  
     70  
     71#install cron job for it 
     72echo '#!/bin/sh' > /etc/cron.daily/fetch-crl.cron 
     73echo '/usr/sbin/fetch-crl' >> /etc/cron.daily/fetch-crl.cron 
     74chmod a+x /etc/cron.daily/fetch-crl.cron 
     75}}} 
     76}}} 
     77* '''range of opened ports''' 
     78 
     79  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. 
     80{{{#!sh 
     81mkdir -p ~/.globus 
     82echo "tcp.port.range=5000,5100" >> ~/.globus/cog.properties 
     83}}} 
     84 
     85 
     86= Preparing the environment = 
     87 
     88'''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). 
     89 
     90We recommend to create a new user (e.g. `qcg-broker`) that will be used by the service to run in unprivileged mode 
     91{{{ 
     92#!div style="font-size: 90%" 
     93{{{#!sh   
     94mkdir -p /opt/QCG 
     95useradd -d /opt/QCG/qcg-broker -m -s /bin/bash qcg-broker  
     96}}} 
     97}}} 
     98'''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. 
     99 
     100= Database setup = 
     101* Create new database user (e.g. `qcg-broker`) authenticated via password (the same password must be later used to setup QCG-Broker deployment): 
     102{{{ 
     103#!div style="font-size: 90%" 
     104{{{#!sh 
     105su - postgres 
     106createuser -P qcg-broker 
     107 
     108Enter password for new role:  
     109Enter it again:  
     110Shall the new role be a superuser? (y/n) n 
     111Shall the new role be allowed to create databases? (y/n) y 
     112Shall the new role be allowed to create more new roles? (y/n) n 
     113CREATE ROLE 
     114 
     115exit 
     116}}} 
     117}}} 
     118 
     119* Create new database (e.g. qcg-broker) owned by the `qcg-broker` user: 
     120{{{ 
     121#!div style="font-size: 90%" 
     122{{{#!sh 
     123su - qcg-broker 
     124createdb -U qcg-broker qcg-broker 
     125exit 
     126}}} 
     127}}} 
     128 '''Note:''' The `qcg-broker` user must be allowed to create new databases. 
     129 
     130* 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. 
     131 
     132 For SL5.x: edit the `/var/lib/pgsql/data/pg_hba.conf` file. 
     133 
     134 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: 
     135{{{ 
     136#!div style="font-size: 90%" 
     137{{{#!default 
     138local   qcg-broker   qcg-broker                         md5 
     139host    qcg-broker   qcg-broker   127.0.0.1/32          md5 
     140}}} 
     141}}} 
     142 
     143 '''Note:''' You must reload the PostgreSQL server in order to make the changes visible e.g: 
     144{{{ 
     145#!div style="font-size: 90%" 
     146{{{#!sh 
     147service postgresql reload 
     148}}} 
     149}}} 
     150 
     151= Installation = 
     152 
     153'''IMPORTANT:''' Perform the installation as the `qcg-broker` user. 
     154{{{ 
     155#!div style="font-size: 90%" 
     156{{{#!sh 
     157su - qcg-broker 
     158}}} 
     159}}} 
     160 
     161* download the [[http://www.qoscosgrid.org/trac/qcg-broker/downloads/qcg-broker-2.0.0.tar.gz | QCG-Broker source installer]] from [[http://www.qoscosgrid.org/trac/qcg-broker/downloads| Downloads]]. 
     162{{{ 
     163#!div style="font-size: 90%" 
     164{{{#!sh 
     165wget http://www.qoscosgrid.org/trac/qcg-broker/downloads/qcg-broker-2.0.0.tar.gz 
     166}}} 
     167}}} 
     168 
     169* unpack the archive 
     170{{{ 
     171#!div style="font-size: 90%" 
     172{{{#!sh 
     173tar xzf qcg-broker.tgz 
     174}}} 
     175}}} 
     176 
     177== Compilation [Optional step] == 
     178The 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. 
     179 
     180* compile sources 
     181{{{ 
     182#!div style="font-size: 90%" 
     183{{{#!sh 
     184cd qcg-broker-<VERSION> 
     185ant rebuildall 
     186}}} 
     187}}} 
     188 
     189== Setup == 
     190* setup deployment configuration - all configuration variables are placed in the `deploy.prop` file 
     191 * '''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.  
     192 * '''deploy.certs.dir''' - directory with QCG-Broker credentials (must contain `qcg-brokercert.pem` and `qcg-brokerkey.pem`) 
     193 * '''deploy.cert.dn''' distinguish name of QCG-Broker credential 
     194 * '''deploy.db.user''' PostgreSQL user name 
     195 * '''deploy.db.pwd''' Password for PostgreSQL user 
     196 * '''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). 
     197 * '''deploy.db.name''' PostgreSQL database name 
     198 * '''deploy.https_port''' the port which QCG-Broker will be listening for https requests on 
     199 * '''deploy.rmi_port''' the port needed for internal communication between QCG-Broker components. 
     200 * '''deploy.shutdown_port''' the port which the tomcat will be listening for shutdown requests on 
     201 * '''deploy.port_range''' the range of opened ports 
     202 
     203* setup QCG-Broker database 
     204{{{ 
     205#!div style="font-size: 90%" 
     206{{{#!sh 
     207cd qcg-broker-<VERSION> 
     208ant -f build.deploy.xml setupdb 
     209}}} 
     210}}} 
     211 
     212== Deployment == 
     213Process of deployment is responsible for copping the QCG-Broker distribution to destination directory and configuring the service. 
     214 
     215* Deploy QCG-Broker service 
     216{{{ 
     217#!div style="font-size: 90%" 
     218{{{#!sh 
     219ant deploy 
     220}}} 
     221}}} 
     222 
     223= Configuration = 
     224* 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) 
     225 
     226 '''providers.count'''=<n> - number of providers 
     227 
     228 For x=0 to n-1 define locations of domain providers: 
     229 
     230 '''provider.x.domain'''=<DOMAIN> - name of the administrative domain, which resources controlled by the given provider belong to,\\ 
     231 '''provider.x.type'''=qcg - type of the provider, DO NOT CHANGE THIS VALUE,\\ 
     232 '''provider.x.id'''=<PROVIDER ID> - identifier of the provider (must be globally unique),\\ 
     233 '''provider.x.location'''=<LOCATION>  - address of provider service.\\ 
     234 
     235 For example: 
     236{{{ 
     237#!div style="font-size: 90%" 
     238{{{#!sh 
     239# how many providers should be used for testing 
     240providers.count=1 
     241 
     242provider.0.domain=PSNC 
     243provider.0.id=qcg_cluster 
     244provider.0.type=qcg 
     245provider.0.location=httpg://qcg.man.poznan.pl:19000 
     246}}} 
     247}}} 
     248 
     249* For cross-clusters job submission, edit `QCG-BROKER_DEPLOY_DIR/broker/etc/config.prop` file, and set following variables: 
     250 * '''broker.qoscos.proactive.pncURL''' - !ProActvie node coordinator address 
     251 * '''broker.qoscos.ompi.pncURL''' - OpenMPI node coordinator address 
     252 
     253 See [http://www.qoscosgrid.org/trac/qcg/wiki/installation_QCG_ProActive_Coordinator QCG-ProActive Coordinator], [http://www.qoscosgrid.org/trac/qcg/wiki/installation_QCG_OpenMPI_Coordinator QCG-OpenMPI Coordinator] for detailed information about installation of !ProActive and OpenMPI node coordinators. 
     254 
     255= Resource Providers setup = 
     256To allow QCG-Broker  to create and manage advance reservations on resources accessible via [http://apps.man.poznan.pl/trac/qcg-computing QCG BES/AR] service some additional configuration steps are needed on Administrative Domain level:  
     257* 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.: 
     258{{{ 
     259#!div style="font-size: 90%" 
     260{{{#!default 
     261"/C=PL/O=GRID/O=PSNC/CN=qcg-broker/qcg.man.poznan.pl" sgeadmin 
     262}}} 
     263}}} 
     264 
     265= Starting the service = 
     266As the `qcg-broker` user type: 
     267{{{ 
     268#!div style="font-size: 90%" 
     269{{{#!sh 
     270cd /opt/QCG/qcg-broker/service 
     271./broker/bin/start-broker.sh 
     272./service/bin/startup.sh 
     273}}} 
     274}}} 
     275 
     276'''IMPORTANT:''' Do not forget to set `JAVA_HOME` or `JRE_HOME` environment variables. 
     277= Stopping the service = 
     278As the `qcg-broker` user type: 
     279{{{ 
     280#!div style="font-size: 90%" 
     281{{{#!sh 
     282cd /opt/QCG/qcg-broker/service 
     283./broker/bin/stop-broker.sh 
     284./service/bin/shutdown.sh 
     285}}} 
     286}}} 
     287= Veryfing the installation = 
     288To verify the installtion please use [[client_user_guide|QCG-Broker Client User Guide]].