Changes between Initial Version and Version 1 of installation_QCG_Notification_in_PLGrid

Show
Ignore:
Timestamp:
05/19/11 17:46:43 (13 years ago)
Author:
bartek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • installation_QCG_Notification_in_PLGrid

    v1 v1  
     1[[PageOutline]]  
     2 
     3= QCG Notification Installation in PL-Grid= 
     4Within !QosCosGrid the QCG Notification service is used for brokering notification messages about the job state changes. All instances of the QCG BES/AR services acts as the information ''Producers'' while the QCG Broker as the ''Consumer''. In most cases it is enough that only one instance of the QCG Notification is deployed per Administrative Domain (i.e.: not necessary one per Cluster). You can install the Smoa Notification service on the same machine where the [[QCG_BES_AR_in_PLGrid|QCG BES/AR service is installed]] 
     5 
     6 IMPORTANT: :: 
     7   The implementation name of the QCG Notification service is '''Smoa Notification''' and this name is used as a common in this guide. 
     8 
     9= Installation = 
     10Similarly to Smoa Computing (QCG BES/AR), the Smoa Notification service may be installed from the provided RPMs. Assuming that the Smoa Computing service has been installed and initially configured (thus the basic dependencies are satisfied), the procedure is as follows: 
     11 
     12* ensure that the smoa_ntf user is present in a system, otherwise create it: 
     13{{{ 
     14#!div style="font-size: 90%" 
     15{{{#!sh 
     16  # useradd -d /opt/plgrid/var/log/smoa-ntf/ smoa_ntf 
     17}}} 
     18}}} 
     19 
     20* install PL-Grid (official) and QCG (testing) repositories, if you have not done this yet.: 
     21{{{ 
     22#!div style="font-size: 90%" 
     23{{{#!sh 
     24  #QosCosGrid testing repository 
     25  # cat > /etc/yum.repos.d/qcg.repo << EOF 
     26  [qcg] 
     27  name=QosCosGrid YUM repository 
     28  baseurl=http://fury.man.poznan.pl/qcg-packages/sl/x86_64/ 
     29  enabled=1 
     30  gpgcheck=0 
     31  EOF 
     32   
     33  #Official PL-Grid repository 
     34  # rpm -Uvh http://software.plgrid.pl/packages/repos/plgrid-repos-2010-2.noarch.rpm 
     35}}} 
     36}}} 
     37 
     38* install Smoa Computing using YUM Package Manager: 
     39{{{ 
     40#!div style="font-size: 90%" 
     41{{{#!sh 
     42  # yum install smoa-ntf 
     43}}} 
     44}}} 
     45 
     46* setup Smoa Notification database using provided script: 
     47{{{ 
     48#!div style="font-size: 90%" 
     49{{{#!sh 
     50  # /opt/plgrid/qcg/smoa/share/smoa-ntf/tools/smoa-ntf-install.sh 
     51  Welcome to smoa-ntf installation script! 
     52   
     53  This script will guide you through process of configuring proper environment 
     54  for running the Smoa Notification service. You have to answer few questions regarding 
     55  parameters of your database. If you are not sure just press Enter and use the 
     56  default values. 
     57   
     58  Use local PostgreSQL server? (y/n) [y]: y 
     59  Database [smoa_ntf]:  
     60  User [smoa_ntf]:  
     61  Password [smoa_ntf]: MojeTajneHaslo 
     62  Create database? (y/n) [y]: y 
     63  Create user? (y/n) [y]: y 
     64   
     65  Checking for system user smoa_comp...OK 
     66  Checking whether PostgreSQL server is installed...OK 
     67  Checking whether PostgreSQL server is running...OK 
     68   
     69  Performing installation 
     70  * Creating user smoa_ntf...OK 
     71  * Creating database smoa_ntf...OK 
     72  * Creating database schema...OK 
     73  * Checking for ODBC data source smoa_ntf... 
     74  * Installing ODBC data source...OK 
     75     
     76  Remember to add appropriate entry to /var/lib/pgsql/data/pg_hba.conf (as the first rule!) to allow user smoa_ntf to 
     77  access database smoa_ntf. For instance: 
     78   
     79  host    smoa_ntf       smoa_ntf       127.0.0.1/32    md5 
     80   
     81  and reload Postgres server. 
     82}}} 
     83}}} 
     84  
     85 
     86Add a new rule to the pg_hba.conf as requested: 
     87  vim /var/lib/pgsql/data/pg_hba.conf  
     88  /etc/init.d/postgresql reload 
     89 
     90=Configuration= 
     91 
     92==Service configuration== 
     93The service should be ready to use "out-of-the-box", however basic configuration may be needed to setup ''Host'' and ''Port'' on which Smoa Notification should listen as well as parameters of database connection: ''DSN'', ''User'' and ''Password''. It can be done by editing the main Smoa Notification configuration file located in: <tt>/opt/plgrid/qcg/smoa/etc/smoa-ntfd.xml</tt>. A part of the configuration file with marked key parameters is presented below: 
     94 
     95 <sm:SMOACore  
     96    <Configuration> 
     97    .... 
     98                <sm:Module xsi:type="sm:ecm_gsoap.service"> 
     99                    <sm:Host>'''127.0.0.1'''</sm:Host> 
     100                    <sm:Port>'''19001'''</sm:Port> 
     101                    <sm:UseWsa>true</sm:UseWsa> 
     102                </sm:Module> 
     103    .... 
     104                <smn:Database> 
     105                    <smn:DatabaseEnabled>true</smn:DatabaseEnabled> 
     106                    <smn:DSN>'''smoa_ntf'''</smn:DSN> 
     107                    <smn:User>'''smoa_ntf'''</smn:User> 
     108                    <smn:Password>'''smoa_ntf'''</smn:Password> 
     109                    <smn:CleanAtStart>false</smn:CleanAtStart> 
     110                </smn:Database> 
     111    .... 
     112    </Configuration> 
     113 </sm:SMOACore> 
     114 
     115 
     116For more information about configuration of the service please take a look at the Smoa Notification guide installed in the <tt>/opt/plgrid/qcg/smoa/share/smoa-ntf/doc/</tt> directory.  
     117 
     118After finishing the SMOA Notification configuration you must edit the [[SMOA_Computing_in_PL-Grid#Service%20configuration|Smoa Computing service configuration file]] again and update the content of the <code><ServiceURL></code> elements (in ''<Module xsi:type="smc:notification_wsa">'' section). For e.g. if in the  <tt>/opt/plgrid/qcg/smoa/etc/smoa-ntfd.xml</tt> one can find  <tt><Host>example.com<Host></tt> and <tt><Port>19001<Port></tt> the <code><ServiceURL></code> must be set to http://example.com:19001/ .  
     119 
     120{{Note}} You must restart the Smoa Computing service after updating the <code>smoa-compd.xml</code> configuration file. 
     121 
     122=Running the service= 
     123The Smoa Notification initialization script is automatically added to init.d directory and may be run as a standard system service:  
     124  /etc/init.d/smoa-ntfd start 
     125 
     126The service logs can be found in: 
     127  /opt/smoa/var/log/smoa-ntf/smoa-ntfd.log 
     128 
     129It could be then stopped with the following command: 
     130  /etc/init.d/smoa-ntfd stop 
     131 
     132{{Note}} smoa-ntfd will be started with the smoa_ntf user permissions. 
     133 
     134=Verifying the installation= 
     135After starting the Smoa Notification service and updating the Smoa Computing configuration try to submit a simple job and check the Smoa Computing log file to see if there are now any error messages on sending notifications, e.g.: 
     136 $ tail -f /opt/plgrid/var/log/smoa-comp/smoa-comp.log 
     137 INF Sep 17 16:15:01 24201 0x44b22940 [notification_ws] Sending notify message (topic = ActivityState/TerminalState/Finished, activity_id = 0544b24a-e960-400e-4910-f1a893632610, status = Finished) 
     138= Configuring firewall= 
     139Please have a look at [[SMOA_Computing_in_PL-Grid#Configuring_firewall| this section]].