Changes between Initial Version and Version 1 of InstallingUsingDeb

Show
Ignore:
Timestamp:
06/11/12 13:15:58 (12 years ago)
Author:
bartek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallingUsingDeb

    v1 v1  
     1[[PageOutline]]  
     2 
     3= QCG-Notification installation using RPMS = 
     4This document describes procedures needed to install QCG-Notification in Debian using apt-get and debian packages uploaded to the Debian QosQosGrid repository. 
     5 
     6= Installation = 
     7The one who need to install QCG-Notification in Debian should follow these steps: 
     8 
     9* ensure that the qcg-ntf user is present in a system, otherwise create it: 
     10{{{ 
     11#!div style="font-size: 90%" 
     12{{{#!sh 
     13useradd qcg-ntf 
     14}}} 
     15}}} 
     16 
     17* ensure that the qcg-dev group is present in a system, otherwise create it: 
     18{{{ 
     19#!div style="font-size: 90%" 
     20{{{#!sh 
     21groupadd -r qcg-dev 
     22}}} 
     23}}} 
     24 
     25* install the Debian QCG repository: 
     26{{{ 
     27#!div style="font-size: 90%" 
     28{{{#!sh 
     29cat > /etc/apt/sources.list.d/qcg.unstable.list << EOF 
     30> deb http://localhost/debian unstable main 
     31> EOF 
     32}}} 
     33}}} 
     34 
     35* install QCG-Notification using YUM Package Manager: 
     36{{{ 
     37#!div style="font-size: 90%" 
     38{{{#!sh 
     39yum install qcg-ntf 
     40}}} 
     41}}} 
     42 
     43* setup QCG-Notification database using provided script: 
     44{{{ 
     45#!div style="font-size: 90%" 
     46{{{#!sh 
     47/opt/plgrid/qcg/share/qcg-ntf/tools/qcg-ntf-install.sh 
     48Welcome to qcg-ntf installation script! 
     49 
     50This script will guide you through process of configuring proper environment 
     51for running the QCG-Notification service. You have to answer few questions regarding 
     52parameters of your database. If you are not sure just press Enter and use the 
     53default values. 
     54   
     55Use local PostgreSQL server? (y/n) [y]: y 
     56Database [qcg-ntf]:  
     57User [qcg-ntf]:  
     58Password [qcg-ntf]: MojeTajneHaslo 
     59Create database? (y/n) [y]: y 
     60Create user? (y/n) [y]: y 
     61   
     62Checking for system user qcg_ntf...OK 
     63Checking whether PostgreSQL server is installed...OK 
     64Checking whether PostgreSQL server is running...OK 
     65   
     66Performing installation 
     67* Creating user qcg-ntf...OK 
     68* Creating database qcg-ntf...OK 
     69* Creating database schema...OK 
     70* Checking for ODBC data source qcg-ntf... 
     71* Installing ODBC data source...OK 
     72     
     73Remember to add appropriate entry to /var/lib/pgsql/data/pg_hba.conf (as the first rule!) to allow user qcg-ntf to 
     74access database qcg-ntf. For instance: 
     75   
     76host    qcg-ntf       qcg-ntf       127.0.0.1/32    md5 
     77   
     78and reload Postgres server. 
     79}}} 
     80}}} 
     81  
     82 
     83* Add a new rule to the pg_hba.conf as requested: 
     84{{{ 
     85#!div style="font-size: 90%" 
     86{{{#!sh 
     87vim /var/lib/pgsql/data/pg_hba.conf  
     88/etc/init.d/postgresql reload 
     89}}} 
     90}}} 
     91 
     92= Configuration = 
     93 
     94== Service configuration == 
     95The service should be ready to use "out-of-the-box", however basic configuration may be needed to setup ''Host'' and ''Port'' on which QCG-Notification should listen as well as parameters of database connection: ''DSN'', ''User'' and ''Password''. It can be done by editing the main QCG-Notification configuration file located in: `/opt/plgrid/qcg/etc/qcg-ntf/qcg-ntfd.xml`. A part of the configuration file with marked key parameters is presented below: 
     96{{{ 
     97#!div style="font-size: 90%" 
     98{{{#!xml 
     99<sm:QCGCore  
     100   <Configuration> 
     101   .... 
     102              <sm:Module xsi:type="sm:ecm_gsoap.service"> 
     103                  <sm:Host>127.0.0.1</sm:Host> 
     104                  <sm:Port>19001</sm:Port> 
     105                  <sm:UseWsa>true</sm:UseWsa> 
     106              </sm:Module> 
     107   .... 
     108              <smn:Database> 
     109                  <smn:DatabaseEnabled>true</smn:DatabaseEnabled> 
     110                  <smn:DSN>qcg-ntf</smn:DSN> 
     111                  <smn:User>qcg-ntf</smn:User> 
     112                  <smn:Password>qcg-ntf</smn:Password> 
     113                  <smn:CleanAtStart>false</smn:CleanAtStart> 
     114              </smn:Database> 
     115   .... 
     116   </Configuration> 
     117</sm:QCGCore> 
     118}}} 
     119}}} 
     120 
     121For more information about configuration of the service please take a look at the QCG-Notification guide installed in the `/opt/plgrid/qcg/share/qcg-ntf/doc/` directory.  
     122 
     123After finishing the QCG-Notification configuration you must edit the QCG-Computing service configuration file and update the content of the `<ServiceURL>` elements (in `<Module xsi:type="smc:notification_wsa">` section). For e.g. if in the  `/opt/plgrid/qcg/etc/qcg-ntfd.xml` one can find  `<Host>example.com<Host>` and `<Port>19001<Port>` the `<ServiceURL>` must be set to `http://example.com:19001/`.  
     124 
     125'''Note:''' You must restart the QCG-Computing service after updating the `qcg-compd.xml` configuration file. 
     126 
     127= Running the service = 
     128The QCG-Notification initialization script is automatically added to `init.d` directory and may be run as a standard system service: 
     129{{{ 
     130#!div style="font-size: 90%" 
     131{{{#!sh  
     132/etc/init.d/qcg-ntfd start 
     133}}} 
     134}}} 
     135 
     136The service logs can be found in: 
     137{{{ 
     138#!div style="font-size: 90%" 
     139{{{#!sh 
     140/opt/plgrid/var/log/qcg-ntf/qcg-ntfd.log 
     141}}} 
     142}}} 
     143 
     144It could be then stopped with the following command: 
     145{{{ 
     146#!div style="font-size: 90%" 
     147{{{#!sh 
     148/etc/init.d/qcg-ntfd stop 
     149}}} 
     150}}} 
     151'''Note:''' `qcg-ntfd` will be started with the `qcg_ntf` user permissions. 
     152 
     153= Verifying the installation = 
     154After starting the QCG-Notification service and updating the QCG-Computing configuration try to submit a simple job and check the QCG-Computing log file to see if there are now any error messages on sending notifications, e.g.: 
     155{{{ 
     156#!div style="font-size: 90%" 
     157{{{#!sh 
     158tail -f /opt/plgrid/var/log/qcg-comp/qcg-compd.log 
     159INF 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) 
     160}}} 
     161}}} 
     162 
     163 
     164= Maintenance = 
     165 
     166== Log management == 
     167You may also wish to install logrotate configuration for QCG-Notification: 
     168{{{ 
     169#!div style="font-size: 90%" 
     170{{{#!sh 
     171yum install qcg-ntf-logrotate 
     172}}} 
     173}}} 
     174 
     175== Data analysys and management == 
     176The administrators may need to view or manage data used by QCG-Notification (e.g. verify subscriptions, remove old pullpoints). The easiest way to view the data is to connect to the QCG-Notification database and select values from the particullar relations. This operation is read-only so it may be proceeded also when the QCG-Notification service is running. The more difficult thing is to modify the content of the stored data. When the service is running the operations of this type should be invoked using the provided QCG-Notification client applications. When the service is switched off the persistent data stored by QCG-Notification still can be accessed (if needed also cleaned) using the direct connection to the database.  
     177 
     178{{{ 
     179#!div style="font-size: 90%" 
     180{{{#!sh 
     181psql -h localhost qcg-ntf qcg-ntf  
     182Password for user qcg-ntf:  
     183Welcome to psql 8.1.23, the PostgreSQL interactive terminal. 
     184   
     185Type:  \copyright for distribution terms 
     186     \h for help with SQL commands 
     187     \? for help with psql commands 
     188     \g or terminate with semicolon to execute query 
     189     \q to quit 
     190 
     191qcg-ntf=> 
     192}}} 
     193}}} 
     194 
     195 
     196= Configuring firewall= 
     197Please have a look at [[https://apps.man.poznan.pl/trac/qcg-computing/wiki/InstallingUsingRPMS#Firewallconfiguration| this section]].