[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Linux-cluster] Resource agents for Apache & MySQL


I have written a resource agents (RA) for apache & mysql (in attachement).


When starting Apache you have to give RA path to ServerRoot (default value /etc/httpd) and configuration file (default conf/httpd.conf). If the path to the conf file doesn't start with / then it is relative to the ServerRoot. Last value which is passed to the RA is the name of the service. Apache's configuration file can contain <IfDefine %name%> sections, so you can have multiple web services defined in the one configuration file. RA parse this main configuration file and generates new one for each resource (-D%name%). If in the config file are options like Listen/Port then they are removed and we will add Listen for every combination of Port & IP address of the service (Apache is then binded to multiple IP addresses). If you change this generated file (there is sha1-checksum) then it won't be regenerated again.

example of simple /etc/cluster/cluster.conf
<service autostart="1" domain="" name="test22">
   <ip address="" monitor_link="0"/>
   <ip address="" monitor_link="0"/>
   <apache name="web"/>


RA for MySQL needs path to configuration file (default value /etc/my.cnf) and IP address (default value is the first IP address in the service). Unfortunately MySQL can be binded to one IP address or to the all of the local IP address (not supported in RA because then you can't run multiple MySQL resources). You should not run more MySQL demons on same data (directory).

Metadata information are stored in separate files (*.metadata) where you can see all of the options in XML format which is quite readable.

If you would like to test these RA then you have to extract archive and copy to the /usr/share/cluster. You can't use system-config-cluster yet, so you have to modify /etc/cluster/cluster.conf manually (add resources, raise version number); run ccs_tool update /etc/cluster/cluster.conf; run cman_tool version -r <raised_version>. Feedback welcomed :)


Attachment: cluster-resource-agents-0.5.tgz
Description: application/compressed-tar

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]