[Pacemaker] how to run a remote script

Dejan Muhamedagic dejanmm at fastmail.fm
Thu Oct 22 17:36:13 EDT 2009


Hi,

On Thu, Oct 22, 2009 at 06:54:29PM +0200, gilberto migliavacca wrote:
> Hi
> 
> I need a step behind now
> 
> I installed a java stand alone process with its onw start and stop scripts
> on the 2 nodes and my purpose is to start/stop these services using
> pacemaker
> 
> how can I create the "myapp resource agent" on the nodes, somthing
> like the ocf:heartbeat:tomcat?

You've got all needed information here
http://www.linux-ha.org/ResourceAgent and some shell scripting
skill. Try either LSB or OCF (preferably the latter if you want
to contribute the script).

Thanks,

Dejan

> thanks in advance
> 
> gilberto
> 
> 
> 
> Schmidt, Torsten wrote:
> >Hi Gilberto,
> >
> >take a look at the tomcat ocf-script:
> >
> >start 'crm'
> >to to 'ra' and do:
> >crm(live)ra# meta tomcat ocf
> >
> >here you see the parameters (required and optional)
> >
> >implement the tomcat as primitive resource dependend on a cluster-ip (IPaddr2)
> >
> >like this:
> >primitive res.ocf.tomct ocf:heartbeat:tomcat \
> >        params <name>="<value>" ...\
> >        op monitor interval="30s" timeout="10s"
> >
> >primitive res.ip.tomcat ocf:heartbeat:IPaddr2 \
> >        params ip="<ip-address>" nic="eth0" cidr_netmask="22" \
> >        op monitor interval="2s" timeout="1s"
> >
> >then bind this two together as a colocation and tell pacemaker the order, how to start + stop:
> >
> >colocation co.res.ocf.tomcat_on_res.ip.tomcat inf: res.ocf.tomcat res.ip.tomcat
> >order o.res.ip.tomcat_before_res.ocf.tomcat inf: res.ip.tomcat res.ocf.tomcat:start
> >
> >and look at the documentation on http://clusterlabs.org/wiki/Documentation
> >
> >
> >Mit freundlichen Grüßen / with kind regards
> >
> >Torsten Schmidt
> >
> >-----Ursprüngliche Nachricht-----
> >Von: gilberto migliavacca [mailto:gbmiglia at yahoo.it] Gesendet:
> >Donnerstag, 22. Oktober 2009 15:55
> >An: pacemaker at oss.clusterlabs.org
> >Betreff: [Pacemaker] how to run a remote script
> >
> >Hi
> >
> >I'm a newbie of Pacemaker and I'm working for Funambol company (www.funambol.com). I'm evaluating how to support a cluster solution for our product.
> >
> >I understood how to create a my own configuration with some monitoring commands.
> >I found it in the main documentation, for instance for apache service
> >
> >now, I installed a Apache-Tomcat web container on the 2 nodes and my purpose is to start/stop these services
> >
> >I don't understand if I can set this information in the configuration of Pacemaker.
> >
> >could anybody give me some hints?
> >
> >thanks in advance
> >
> >gilberto
> >
> >
> >
> >
> >
> >_______________________________________________
> >Pacemaker mailing list
> >Pacemaker at oss.clusterlabs.org
> >http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
> >_______________________________________________
> >Pacemaker mailing list
> >Pacemaker at oss.clusterlabs.org
> >http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> >
> 
> 
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker




More information about the Pacemaker mailing list