Changes between Version 7 and Version 8 of MultipleInstanceServices


Ignore:
Timestamp:
05/22/11 17:39:36 (3 years ago)
Author:
digimer
Comment:

Fixed the last copy from the old wiki to work on the new Trac syntax.

Legend:

Unmodified
Added
Removed
Modified
  • MultipleInstanceServices

    v7 v8  
    1 [[RGManager]] does not handle multiple instances of the same service in any sort of easy way.  There are a number of ways to solve this if you want monitoring & restarting of the same service on multiple nodes.  The simplest way to do this is to create a restricted failover domain for each node in the cluster, in the following way: 
     1[wiki:RGManager] does not handle multiple instances of the same service in any sort of easy way.  There are a number of ways to solve this if you want monitoring & restarting of the same service on multiple nodes.  The simplest way to do this is to: 
     2 
     3 * Create a restricted [FailoverDomains failover domain] for each node in the cluster, 
     4 * Create a script resource for your application, 
     5 * Create a service for each node in the cluster,  
     6 * Add a reference to your script resource to each service, and 
     7 * Bind each service to a node-specific failover domain. 
     8  
    29{{{ 
    310<rm> 
    411  <failoverdomains> 
     12 
     13    <!-- One restricted failover domain per node in the cluster --> 
     14 
    515    <failoverdomain name="node1" restricted="1"> 
    616      <failoverdomainnode name="node1"/> 
     
    1020    </failoverdomain> 
    1121  </failoverdomains> 
     22 
     23  <!-- We define a shared script resource called myscript  
     24        which will run on each node in the cluster --> 
    1225  <resources> 
    1326    <script name="myscript" file="/etc/init.d/httpd" /> 
     27  </resources> 
     28 
     29  <!-- Our web service that only runs on node1 --> 
    1430  <service name="node1-web" domain="node1" > 
     31    <!-- Because we defined the script globally, we must reference it 
     32         instead of declare it here --> 
    1533    <script ref="myscript" /> 
    1634  </service> 
     35 
     36  <!-- Our web service that only runs on node2 --> 
    1737  <service name="node2-web" domain="node2" > 
    1838    <script ref="myscript" /> 
     
    2242 
    2343Note: See the FailoverDomains page for an explanation of why this works. 
    24