geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v2.1 > Farming
Date Thu, 24 Dec 2009 14:03:00 GMT
<html>
<head>
    <base href="http://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1519/1/1/_/styles/combined.css?spaceKey=GMOxDOC21&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background-color: white" bgcolor="white">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
     <h2><a href="http://cwiki.apache.org/confluence/display/GMOxDOC21/Farming">Farming</a></h2>
     <h4>Page <b>edited</b> by             <a href="http://cwiki.apache.org/confluence/display/~ashjain2@gmail.com">Ashish
Jain</a>
    </h4>
     
          <br/>
     <div class="notificationGreySide">
         <style type='text/css'>/*<![CDATA[*/
table.ScrollbarTable  {border: none;padding: 3px;width: 100%;padding: 3px;margin: 0px;background-color:
#f0f0f0}
table.ScrollbarTable td.ScrollbarPrevIcon {text-align: center;width: 16px;border: none;}
table.ScrollbarTable td.ScrollbarPrevName {text-align: left;border: none;}
table.ScrollbarTable td.ScrollbarParent {text-align: center;border: none;}
table.ScrollbarTable td.ScrollbarNextName {text-align: right;border: none;}
table.ScrollbarTable td.ScrollbarNextIcon {text-align: center;width: 16px;border: none;}

/*]]>*/</style><div class="Scrollbar"><table class='ScrollbarTable'><tr><td
width='33%' class='ScrollbarPrevName'>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC21/Clustering"><img border='0' align='middle' src='/confluence/images/icons/up_16.gif'
width='8' height='8'></a></sup><a href="/confluence/display/GMOxDOC21/Clustering">Clustering</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/GMOxDOC21/WADI+Clustering+Support">WADI
Clustering Support</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC21/WADI+Clustering+Support"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>
<h1><a name="Farming-Farming"></a>Farming</h1>
<p>A configuration can be deployed to a cluster of Geronimo servers via a single logical
deployment step. Once deployed to a cluster, this configuration can then be transparently
started, stopped or undeployed across all the cluster members.<br/>
These two features greatly streamline the maintenance of applications running on a cluster
as Geronimo takes care of cluster-wide application distribution and management for you.</p>

<h2><a name="Farming-ConfigurationofClusterMembers"></a>Configuration of
Cluster Members</h2>
<ul>
	<li>A specific name should be given to your Geronimo instance for application deployment.
This can be achived by updating the following two properties defined within <tt>/var/config/config-substitutions.properties</tt>:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
clusterNodeName=NODE1
RemoteDeployHostname=NODE1_IP
</pre>
</div></div></li>
</ul>


<ul>
	<li>Cluster members are configured on each Geronimo server, which may but is not required
to be a member of the cluster.  This is achieved by adding a <em>org.apache.geronimo.farm.config.BasicNodeInfo</em>
GBean for each cluster member to the <em>farming</em> configuration of config.xml.
This GBean looks like this:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;gbean name=<span class="code-quote">"org.apache.geronimo.configs/farming/2.1/car?ServiceModule=org.apache.geronimo.configs/farming/2.1/car,j2eeType=NodeInfo,name=Node2_description"</span>
    gbeanInfo=<span class="code-quote">"org.apache.geronimo.farm.config.BasicNodeInfo"</span>&gt;
    &lt;attribute name=<span class="code-quote">"name"</span>&gt;NODE2&lt;/attribute&gt;

    &lt;attribute propertyEditor=<span class="code-quote">"org.apache.geronimo.farm.config.BasicExtendedJMXConnectorInfoEditor"</span>
name=<span class="code-quote">"extendedJMXConnectorInfo"</span>&gt;
        &lt;ns:javabean class=<span class="code-quote">"org.apache.geronimo.farm.config.BasicExtendedJMXConnectorInfo"</span>
            xmlns:ns4=<span class="code-quote">"http:<span class="code-comment">//geronimo.apache.org/xml/ns/attributes-1.2"</span>
</span>            xmlns:ns=<span class="code-quote">"http:<span class="code-comment">//geronimo.apache.org/xml/ns/deployment/javabean-1.0"</span>
</span>            xmlns=""&gt;
            &lt;ns:property name=<span class="code-quote">"username"</span>&gt;system&lt;/ns:property&gt;
            &lt;ns:property name=<span class="code-quote">"password"</span>&gt;manager&lt;/ns:property&gt;
                   
            &lt;ns:property name=<span class="code-quote">"protocol"</span>&gt;rmi&lt;/ns:property&gt;
            &lt;ns:property name=<span class="code-quote">"host"</span>&gt;NODE2_IP&lt;/ns:property&gt;
            &lt;ns:property name=<span class="code-quote">"port"</span>&gt;1100&lt;/ns:property&gt;
            &lt;ns:property name=<span class="code-quote">"urlPath"</span>&gt;JMXConnector&lt;/ns:property&gt;
            &lt;ns:property name=<span class="code-quote">"local"</span>&gt;<span
class="code-keyword">false</span>&lt;/ns:property&gt;
          &lt;/ns:javabean&gt;
    &lt;/attribute&gt;
&lt;/gbean&gt;
</pre>
</div></div>
<p>It defines network address (host, port, urlPath) and credentials  (username and password)
to be used to connect to the cluster member via JMX. Such declarations are to be included
within the <em>config.xml</em> file, <em>farming</em> module of your
Geronimo server.<br/>
By default, the <em>farming</em> configuration defines the local server as a cluster
member. To exclude it, you can prevent the GBean <em>NodeInfo</em> to start.</p></li>
</ul>


<h2><a name="Farming-FarmDeployment%2FUndeploymentforgeronimoversions2.1.4andlower"></a>Farm
Deployment/Undeployment for geronimo versions 2.1.4 and lower</h2>
<p>To deploy a configuration to configured members, you simply deploy it to the MasterConfigurationStore
repository defined by the <em>farming</em> configuration. This configuration being
stopped out-of-the-box, you may have to start it the first time via this GShell command:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
deploy/start org.apache.geronimo.configs/farming<span class="code-comment">//car</span>
</pre>
</div></div>
<p><em>farming</em> adds two new repositories to the server: <em>MasterConfigurationStore</em>
and <em>ClusterStore</em>. <em>MasterConfigurationStore</em> is the
repository you should use most of the time if not always. <em>ClusterStore</em>
is a repository you may have to use in specific and infrequent scenarios.<br/>
To deploy to <em>MasterConfigurationStore</em>, you pass the --targets flag to
the <em>distribute</em> or <em>deploy</em> commands like this:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
deploy/distribute  --targets XXX,name=MasterConfigurationStore &lt;your module&gt;
</pre>
</div></div>
<p>Following this deployment</p>
<ul>
	<li><em>MasterConfigurationStore</em> contains a kind of virtual configuration,
which has the same name than your deployment and defines GBeans controlling the remote start
and stop of the actual configuration cluster-wide; and</li>
	<li><em>ClusterStore</em> contains the actual configuration under an altered
configuration name, a '_G_SLAVE' is appended to the configuration name.</li>
</ul>


<p>To undeploy an application use the command<br/>
deploy --user system --password manager undeploy default/ClusterTestEAR/1.0/ear</p>

<h2><a name="Farming-FarmUndeploymentforgeronimoversionshigherthan2.1.4"></a>Farm
Undeployment for geronimo versions higher than 2.1.4</h2>
<p>With geronimo versions higher than 2.1.4 the _G_SLAVE is no longer being used. Instead
geronimo uses _G_MASTER for its master application. Do not worry there are no problems for
end user. The deployment steps still remains same however for undeployment the user has to
use following command.<br/>
deploy --user system --password manager undeploy default/ClusterTestEAR_G_MASTER/1.0/ear</p>

<h2><a name="Farming-ClusterwideManagementofConfigurations"></a>Cluster-wide
Management of Configurations</h2>
<p>To start, stop or undeploy configurations across a cluster, you perform the relevant
deployment task against the virtual configuration. All the cluster members configured at the
time of the initial deployment must be running otherwise these operations are partially executed.
For instance, if three members were configured and only two of them are running when the virtual
configuration is undeployed, then the configuration is removed from the ClusterStore of the
two running servers. The ClusterStore of the third server still contains the configuration
and this latter will have to be manually undeployed on this server.</p>
     </div>
     <div id="commentsSection" class="wiki-content pageSection">
       <div style="float: right;">
            <a href="http://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
       </div>

       <a href="http://cwiki.apache.org/confluence/display/GMOxDOC21/Farming">View Online</a>
       |
       <a href="http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=83379&revisedVersion=10&originalVersion=9">View
Change</a>
              |
       <a href="http://cwiki.apache.org/confluence/display/GMOxDOC21/Farming?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message