geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Geronimo v3.0 > Farming using Deployment
Date Tue, 25 Jan 2011 09:05:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/2036/9/4/_/styles/combined.css?spaceKey=GMOxDOC30&amp;forWysiwyg=true"
type="text/css">
    </head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
    <h2><a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Farming+using+Deployment">Farming
using Deployment</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~maojia508">maojia</a>
    </h4>
        <br/>
                         <h4>Changes (12)</h4>
                                 
    
<div id="page-diffs">
                    <table class="diff" cellpadding="0" cellspacing="0">
    
            <tr><td class="diff-unchanged" >{scrollbar} <br> <br></td></tr>
            <tr><td class="diff-deleted-lines" style="color:#999;background-color:#fdd;text-decoration:line-through;">{excerpt}A
configuration can be deployed to a cluster of Geronimo servers via a single logical deployment
step.{excerpt} Once deployed to a cluster, this configuration can then be transparently started,
stopped or undeployed across all the cluster members. <br></td></tr>
            <tr><td class="diff-added-lines" style="background-color: #dfd;">{excerpt}A
configuration can be deployed to a cluster of Geronimo servers by using a single logical deployment
step.{excerpt} After a configuration is deployed to a cluster, this configuration can be transparently
started, stopped, or undeployed across all the cluster members. <br></td></tr>
            <tr><td class="diff-changed-lines" >These two features greatly streamline
the maintenance of applications <span class="diff-added-words"style="background-color:
#dfd;">that are</span> running on a cluster <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">as</span>
<span class="diff-added-words"style="background-color: #dfd;">because</span> Geronimo
takes care of cluster-wide application distribution and management for you. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>h2. Configuration of Cluster
Members <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >RemoteDeployHostname={_}NODE1_IP{_}
<br>{panel} <br></td></tr>
            <tr><td class="diff-changed-lines" ># Cluster members are configured
on a Geronimo server, which <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">may</span>
<span class="diff-added-words"style="background-color: #dfd;">can,</span> but
is not required <span class="diff-changed-words">to<span class="diff-added-chars"style="background-color:
#dfd;">,</span></span> be a member of the cluster.  This is achieved by adding
a *org.apache.geronimo.farm.config.BasicNodeInfo* GBean for each cluster member to the *farming*
configuration of {{config.xml}}. This GBean looks like this: <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>&lt;gbean name=&quot;org.apache.geronimo.configs/farming/2.2/car?ServiceModule=org.apache.geronimo.configs/farming/2.2/car,
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >&lt;/gbean&gt; <br>{code}
<br></td></tr>
            <tr><td class="diff-changed-lines" >It defines <span class="diff-added-words"style="background-color:
#dfd;">the</span> network address (host, port, urlPath) and <span class="diff-added-words"style="background-color:
#dfd;">the</span> credentials  (username and password) to be used to connect to the
cluster member via JMX. Such declarations are to be included within the {{config.xml}} file,
*farming* module of your Geronimo server. <br></td></tr>
            <tr><td class="diff-unchanged" >By default, the farming configuration
defines the local server as a cluster member. To exclude it, you can prevent the GBean *NodeInfo*
to start. <br> <br>h2. Farm Deployment <br></td></tr>
            <tr><td class="diff-changed-lines" >To deploy a configuration to <span
class="diff-changed-words">configure<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">d</span></span>
members, you simply deploy it to the MasterConfigurationStore repository defined by the farming
configuration. This configuration being stopped out-of-the-box, you <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">may</span>
<span class="diff-added-words"style="background-color: #dfd;">might</span> have
to start it the first time <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">via</span>
<span class="diff-added-words"style="background-color: #dfd;">by using</span>
this GShell command: <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>deploy/start org.apache.geronimo.configs/farming//car
<br>{code} <br></td></tr>
            <tr><td class="diff-changed-lines" >*farming* adds two new repositories
to the server: *MasterConfigurationStore* and *ClusterStore*. *MasterConfigurationStore* is
the repository you should use most of the time if not always. *ClusterStore* is a repository
you <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">may</span>
<span class="diff-added-words"style="background-color: #dfd;">might</span> have
to use in specific and infrequent scenarios. <br></td></tr>
            <tr><td class="diff-changed-lines" >To deploy to MasterConfigurationStore,
<span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">you</span>
pass the --targets flag to the *distribute* or *deploy* commands like this: <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>deploy/distribute
 --targets XXX,name=MasterConfigurationStore &lt;your module&gt; <br>{code}
<br></td></tr>
            <tr><td class="diff-changed-lines" >Following this <span class="diff-changed-words">deployment<span
class="diff-added-chars"style="background-color: #dfd;">,</span></span> <br></td></tr>
            <tr><td class="diff-unchanged" >* _MasterConfigurationStore_ contains
a kind of virtual configuration under an altered name, a &#39;_G_MASTER&#39; is appended
to the configuration name, and  <br></td></tr>
            <tr><td class="diff-changed-lines" >* _ClusterStore_ contains the
actual configuration <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">which</span>
<span class="diff-added-words"style="background-color: #dfd;">that</span> has
the same name <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">than</span>
<span class="diff-added-words"style="background-color: #dfd;">as</span> your deployment
and defines GBeans controlling the remote start and stop of the actual configuration cluster-wide;
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h2. Cluster-wide Management
of Configurations <br></td></tr>
            <tr><td class="diff-changed-lines" >To undeploy across the farm, users
need to execute the undeploy command on the same node that they used to deploy/distribute
their application across the farm. Note that this node acts as a kind of Administration Server,
whereby it is the only node whose farming configuration needs to be maintained to reflect
farm members and any lifecycle operations against farmed modules (e.g. start/stop) are propagated
to the other nodes. To start, <span class="diff-changed-words">stop<span class="diff-added-chars"style="background-color:
#dfd;">,</span></span> or undeploy configurations across a cluster, <span
class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">you</span>
perform the relevant deployment task against the virtual configuration. <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>deploy/undeploy &lt;your
module&gt;_G_MASTER <br>{code}  <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >All the cluster members configured
at the time of the initial deployment must be <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">running
otherwise</span> <span class="diff-added-words"style="background-color: #dfd;">running.
Otherwise,</span> 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 <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">this
latter</span> will have to be manually undeployed on this server. <br></td></tr>
    
            </table>
    </div>                            <h4>Full Content</h4>
                    <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
class='ScrollbarPrevIcon'><a href="/confluence/display/GMOxDOC30/EJB+failover"><img
border='0' align='middle' src='/confluence/images/icons/back_16.gif' width='16' height='16'></a></td><td
width='33%' class='ScrollbarPrevName'><a href="/confluence/display/GMOxDOC30/EJB+failover">EJB
failover</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC30/Clustering+and+farming"><img border='0' align='middle'
src='/confluence/images/icons/up_16.gif' width='8' height='8'></a></sup><a
href="/confluence/display/GMOxDOC30/Clustering+and+farming">Clustering and farming</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/GMOxDOC30/JMS+clustering+in+Geronimo">JMS
clustering in Geronimo</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC30/JMS+clustering+in+Geronimo"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p>A configuration can be deployed to a cluster of Geronimo servers by using a single
logical deployment step. After a configuration is deployed to a cluster, this configuration
can be transparently started, stopped, or undeployed across all the cluster members.<br/>
These two features greatly streamline the maintenance of applications that are running on
a cluster because Geronimo takes care of cluster-wide application distribution and management
for you.</p>

<h2><a name="FarmingusingDeployment-ConfigurationofClusterMembers"></a>Configuration
of Cluster Members</h2>
<ol>
	<li>A specific name should be given to your Geronimo instance. This can be achieved
by updating the <tt>clusterNodeName</tt> property defined within <tt>&lt;geronimo_home&gt;/var/config/config-substitutions.properties</tt>:
<div class="panel" style="border-style: dashed;border-width: 1px;"><div class="panelContent">
<p>clusterNodeName=<em>NODE1</em><br/>
RemoteDeployHostname=<em>NODE1_IP</em></p>
</div></div></li>
	<li>Cluster members are configured on a Geronimo server, which can, but is not required
to, be a member of the cluster.  This is achieved by adding a <b>org.apache.geronimo.farm.config.BasicNodeInfo</b>
GBean for each cluster member to the <b>farming</b> configuration of <tt>config.xml</tt>.
This GBean looks like this:
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
&lt;gbean name="org.apache.geronimo.configs/farming/2.2/car?ServiceModule=org.apache.geronimo.configs/farming/2.2/car,
       j2eeType=NodeInfo,name=Node2_description"
    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 the network address (host, port, urlPath) and the credentials  (username
and password) to be used to connect to the cluster member via JMX. Such declarations are to
be included within the <tt>config.xml</tt> file, <b>farming</b> module
of your Geronimo server.<br/>
By default, the farming configuration defines the local server as a cluster member. To exclude
it, you can prevent the GBean <b>NodeInfo</b> to start.</p></li>
</ol>


<h2><a name="FarmingusingDeployment-FarmDeployment"></a>Farm Deployment</h2>
<p>To deploy a configuration to configure members, you simply deploy it to the MasterConfigurationStore
repository defined by the farming configuration. This configuration being stopped out-of-the-box,
you might have to start it the first time by using 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><b>farming</b> adds two new repositories to the server: <b>MasterConfigurationStore</b>
and <b>ClusterStore</b>. <b>MasterConfigurationStore</b> is the repository
you should use most of the time if not always. <b>ClusterStore</b> is a repository
you might have to use in specific and infrequent scenarios.<br/>
To deploy to MasterConfigurationStore, pass the --targets flag to the <b>distribute</b>
or <b>deploy</b> 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
under an altered name, a '_G_MASTER' is appended to the configuration name, and</li>
	<li><em>ClusterStore</em> contains the actual configuration that has the
same name as your deployment and defines GBeans controlling the remote start and stop of the
actual configuration cluster-wide;</li>
</ul>


<h2><a name="FarmingusingDeployment-ClusterwideManagementofConfigurations"></a>Cluster-wide
Management of Configurations</h2>
<p>To undeploy across the farm, users need to execute the undeploy command on the same
node that they used to deploy/distribute their application across the farm. Note that this
node acts as a kind of Administration Server, whereby it is the only node whose farming configuration
needs to be maintained to reflect farm members and any lifecycle operations against farmed
modules (e.g. start/stop) are propagated to the other nodes. To start, stop, or undeploy configurations
across a cluster, perform the relevant deployment task against the virtual configuration.</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
deploy/undeploy &lt;your module&gt;_G_MASTER
</pre>
</div></div> 

<p>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 will have to be manually undeployed
on this server.</p>
    </div>
        <div id="commentsSection" class="wiki-content pageSection">
        <div style="float: right;">
            <a href="https://cwiki.apache.org/confluence/users/viewnotifications.action"
class="grey">Change Notification Preferences</a>
        </div>
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Farming+using+Deployment">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=20645452&revisedVersion=2&originalVersion=1">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC30/Farming+using+Deployment?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message