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.2 > Plugin based Farming
Date Fri, 26 Nov 2010 08:54:00 GMT
<html>
<head>
    <base href="https://cwiki.apache.org/confluence">
            <link rel="stylesheet" href="/confluence/s/1810/9/1/_/styles/combined.css?spaceKey=GMOxDOC22&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/GMOxDOC22/Plugin+based+Farming">Plugin
based Farming</a></h2>
    <h4>Page <b>edited</b> by             <a href="https://cwiki.apache.org/confluence/display/~maojia508">maojia</a>
    </h4>
        <br/>
                         <h4>Changes (5)</h4>
                                 
    
<div id="page-diffs">
            <table class="diff" cellpadding="0" cellspacing="0">
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >* Remove a plugin from a plugin list
 <br> <br></td></tr>
            <tr><td class="diff-changed-lines" >These operations are available
through the GShell <span class="diff-changed-words">[cluster/deploy<span class="diff-added-chars"style="background-color:
#dfd;">|Geronimo GShell Commands#Administering cluster|(cluster/deploy)</span>]</span>
command and are discussed in details in the [#Add and remove plugins and plugin lists] section.
<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h3. Architectural Considerations
<br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >* {{org.apache.geronimo.configs/plugin-farm-member//car}}
(plugins/clustering/plugin-farm-member) plugin turns a server into a plugin farm node. You
can configure the multicast address and port, cluster name, and node name in {{&lt;WASCE_HOME&gt;/var/config/config-substitutions.properties}}.
 <br>*  {{org.apache.geronimo.assemblies/geronimo-plugin-farm-node//car}} (plugins/clustering/geronimo-plugin-farm-node)
extends the framework assembly with the plugin-farm-member plugin. This is all you need to
start up a farm node. <br></td></tr>
            <tr><td class="diff-changed-lines" >* {{org.apache.geronimo.configs/plugin-farm//car}}
(plugins/clustering/plugin-farm) is the administration plugin for plugin-based farms. Currently
it&#39;s only accessible through the Gshell <span class="diff-changed-words">[cluster/deploy<span
class="diff-added-chars"style="background-color: #dfd;">|Geronimo GShell Commands#Administering
cluster|(cluster/deploy)</span>]</span> command. <br></td></tr>
            <tr><td class="diff-unchanged" >* {{org.apache.geronimo.configs/plugin-farm-datasource//car}}
(plugins/clustering/plugin-farm-datasource) is a derby datasource used by the plugin farm.
It is intended to be replaced in production with a remote datasource. As always, the replacement
plugin should use an &lt;artifact-alias&gt; element to redirect dependencies on plugin-farm-datasource
to itself. <br> <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" >{panel} <br>where <br></td></tr>
            <tr><td class="diff-changed-lines" >* the password {{manger}} in this
example is in plain text. However, it is recommended to encrypt your password with the [deploy
encrypt <span class="diff-changed-words">command|deploy#Encrypt<span class="diff-deleted-chars"style="color:#999;background-color:#fdd;text-decoration:line-through;">
command and options</span>|deploy</span> encrypt command]. <br></td></tr>
            <tr><td class="diff-unchanged" > <br>4. Restart the server.
<br> <br>h4. Deploy a sample plugin to the farm <br></td></tr>
            <tr><td class="diff-changed-lines" >Install a plugin to the farm controller
with command. For example, use the [Gshell <span class="diff-changed-words">command<span
class="diff-added-chars"style="background-color: #dfd;">|Geronimo GShell Commands</span>]</span>
as follows to install a HelloWorld.car plugin: <br></td></tr>
            <tr><td class="diff-unchanged" >{code} <br>deploy/install-plugin
D:/HelloWorld.car -s 9.186.10.157 <br></td></tr>
            <tr><td class="diff-snipped" >...<br></td></tr>
            <tr><td class="diff-unchanged" > <br>h4. Add and remove plugins
and plugin lists <br></td></tr>
            <tr><td class="diff-changed-lines" >Use the <span class="diff-deleted-words"style="color:#999;background-color:#fdd;text-decoration:line-through;">{{deploy/cluster}}
[Gshell command]</span> <span class="diff-added-words"style="background-color: #dfd;">[cluster/deploy|Geronimo
GShell Commands#Administering cluster|(cluster/deploy)] Gshell command</span> to verify
the farm you set up. For example, add and remove plugins and plugin lists with the following
commands: <br></td></tr>
            <tr><td class="diff-unchanged" >Use this command to add a plugin list
p1 to farm cluster1: <br>{code}cluster/deploy add -c cluster1 -l p1 -s 9.186.10.157
{code} <br></td></tr>
            <tr><td class="diff-snipped" >...<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/GMOxDOC22/JMS+clustering+in+Geronimo"><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/GMOxDOC22/JMS+clustering+in+Geronimo">JMS
clustering in Geronimo</a>&nbsp;</td><td width='33%' class='ScrollbarParent'><sup><a
href="/confluence/display/GMOxDOC22/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/GMOxDOC22/Clustering+and+farming">Clustering and farming</a></td><td
width='33%' class='ScrollbarNextName'>&nbsp;<a href="/confluence/display/GMOxDOC22/Tomcat+Native+Clustering">Tomcat
Native Clustering</a></td><td class='ScrollbarNextIcon'><a href="/confluence/display/GMOxDOC22/Tomcat+Native+Clustering"><img
border='0' align='middle' src='/confluence/images/icons/forwd_16.gif' width='16' height='16'></a></td></tr></table></div>

<p>This farming system uses plugins directly and is thus decoupled from the deployment
system. It enables the plugin based farming administration across different servers or machines.
Farming information is stored in a database using jps. The data model allows a single administration
server to manage:</p>

<ul>
	<li>multiple farms, also termed clusters</li>
	<li>multiple lists of plugins per farm in an M X N relationship</li>
	<li>multiple plugins per plugin list</li>
</ul>


<p>When a node starts up it broadcasts a service advertisement including an optional
node name and a farm name. When the administration server detects this as new, it instructs
the new node to install all the plugin lists associated with that farm. If the plugins are
already installed, the system provides no further operation; otherwise the plugins are downloaded
and installed from the plugin repository specified in the plugin list.</p>

<p>Farming administrative operations include:</p>

<ul>
	<li>Add a plugin list to a farm</li>
	<li>Add a plugin to a plugin list</li>
	<li>Add a plugin to a plugin list and the list to a farm</li>
	<li>Remove a plugin list from a farm</li>
	<li>Remove a plugin from a plugin list</li>
</ul>


<p>These operations are available through the GShell <a href="/confluence/display/GMOxDOC22/Geronimo+GShell+Commands#GeronimoGShellCommands-Administeringcluster"
title="(cluster/deploy)">cluster/deploy</a> command and are discussed in details
in the <a href="#PluginbasedFarming-Addandremovepluginsandpluginlists">Add and remove
plugins and plugin lists</a> section.</p>

<h3><a name="PluginbasedFarming-ArchitecturalConsiderations"></a>Architectural
Considerations</h3>
<p>Plugin based farming requires two separate sets of functionality:</p>

<ul>
	<li>A plugin farm controller that tracks the farms node, plugin lists, and plugins
and issues instructions to the nodes.</li>
	<li>A geronimo plugin repository accessible to all farm nodes. This can be a geronimo
server running the geronimo-as-maven servlet, the local file system maven repository, a file
based repository served by httpd, or a maven repository manager such as nexus. If a geronimo
server is used it can be the same server as the plugin farm controller or a separate server.</li>
</ul>


<p>The farming information is stored in the PluginFarmDatatabase database on the farm
controller.</p>


<h3><a name="PluginbasedFarming-Supportingpluginsandassemblies"></a>Supporting
plugins and assemblies</h3>
<ul>
	<li><tt>org.apache.geronimo.configs/plugin-farm-member//car</tt> (plugins/clustering/plugin-farm-member)
plugin turns a server into a plugin farm node. You can configure the multicast address and
port, cluster name, and node name in <tt>&lt;WASCE_HOME&gt;/var/config/config-substitutions.properties</tt>.</li>
	<li><tt>org.apache.geronimo.assemblies/geronimo-plugin-farm-node//car</tt>
(plugins/clustering/geronimo-plugin-farm-node) extends the framework assembly with the plugin-farm-member
plugin. This is all you need to start up a farm node.</li>
	<li><tt>org.apache.geronimo.configs/plugin-farm//car</tt> (plugins/clustering/plugin-farm)
is the administration plugin for plugin-based farms. Currently it's only accessible through
the Gshell <a href="/confluence/display/GMOxDOC22/Geronimo+GShell+Commands#GeronimoGShellCommands-Administeringcluster"
title="(cluster/deploy)">cluster/deploy</a> command.</li>
	<li><tt>org.apache.geronimo.configs/plugin-farm-datasource//car</tt> (plugins/clustering/plugin-farm-datasource)
is a derby datasource used by the plugin farm. It is intended to be replaced in production
with a remote datasource. As always, the replacement plugin should use an &lt;artifact-alias&gt;
element to redirect dependencies on plugin-farm-datasource to itself.</li>
</ul>


<p>Make sure the version of the plugins comply with your server. </p>

<h3><a name="PluginbasedFarming-Setupsteps"></a>Setup steps</h3>
<p>The following steps demonstrates the plugin based farming using nodes that all share
the same geronimo installation. The admin server acts as the farm controller, application
deployment server, and plugin repository. The setup steps for plugin based farming includes:</p>
<ol>
	<li><a href="#PluginbasedFarming-Setupfarmcontroller">Set up farm controller</a></li>
	<li><a href="#PluginbasedFarming-Setupfarmnode">Set up farm node</a></li>
	<li><a href="#PluginbasedFarming-Deployasampleplugintothefarm">Deploy a sample
plugin to the farm</a></li>
	<li><a href="#PluginbasedFarming-Addandremovepluginsandpluginlists">Add and remove
plugins and plugin lists</a></li>
</ol>


<h4><a name="PluginbasedFarming-Setupfarmcontroller"></a>Set up farm controller</h4>
<p>1. Start the controller server and install the following plugins in the server repository.
For example, for a version 2.2 server, the plugins are stored in the <a href="http://geronimo/apache/org/plugins/geronimo-2.2"
class="external-link" rel="nofollow">http://geronimo/apache/org/plugins/geronimo-2.2</a>
repository:</p>
<ul>
	<li><tt>org.apache.geronimo.configs/plugin-farm//car</tt></li>
	<li><tt>org.apache.geronimo.configs/plugin-farm-datasource//car</tt></li>
	<li><tt>org.apache.geronimo.configs/plugin-farm-member//car</tt></li>
</ul>


<p>2. Open the <tt>config-substitutions.properties</tt> file and set the
following attributes:</p>
<div class="panel" style="border-style: solid;border-width: 1px;"><div class="panelHeader"
style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Excerpt from config-substitutions.properties</b></div><div
class="panelContent">
<p>ClusterName=<em>farm name</em><br/>
NodeName=<em>name</em> <br/>
ServerHostname=<em>Node&#95;IP</em><br/>
DefaultPluginRepository=<em>share install plugin repository</em></p>
</div></div>
<p>where</p>
<ul>
	<li><tt>ClusterName</tt>: defines the name of the farm the server works
in.</li>
	<li><tt>NodeName</tt>: is optional and defaults to <tt>host:jndi-port</tt>.
For example, if the host IP for this server is 9.186.10.157 and the jndi-port is 1099, the
default <tt>Nodename=9.186.10.157:1099</tt>.</li>
	<li><tt>ServerHostname</tt>:sets the node IP of this server.</li>
	<li><tt>DefaultPluginRepository</tt>: defines the plugin repository accessible
to all farm nodes.  For example, you can use the maven repository as the share install plugin
repository by defining <tt>DefaultPluginRepository=http\://9.186.10.157\:8080/plugin/maven-repo</tt>.</li>
</ul>


<p>3. Restart the server.</p>

<h4><a name="PluginbasedFarming-Setupfarmnode"></a>Set up farm node </h4>
<p>Use the following steps to set up every node server in the farm:<br/>
1. Start the node server and install the <tt>org.apache.geronimo.configs/plugin-farm-member//car</tt>
plugin in the server repository. For example, for a version 2.2 server, the plugin is stored
in the <a href="http://geronimo/apache/org/plugins/geronimo-2.2" class="external-link"
rel="nofollow">http://geronimo/apache/org/plugins/geronimo-2.2</a> repository.<br/>
2. Open the <tt>config-substitutions.properties</tt> file and set the following
attributes:</p>
<div class="panel" style="border-style: solid;border-width: 1px;"><div class="panelHeader"
style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Excerpt from config-substitutions.properties</b></div><div
class="panelContent">
<p>ClusterName=<em>farm name</em><br/>
ServerHostname=<em>Node&#95;IP</em></p>
</div></div>

<p>3. Add the share install plugin repository to the <tt>plugin-repositories.properties</tt>
file under <tt>&lt;WASCE_HOME&gt;/var/config/</tt> for each farm node,
including access username and password. For example:</p>
<div class="panel" style="border-style: solid;border-width: 1px;"><div class="panelHeader"
style="border-bottom-width: 1px;border-bottom-style: solid;"><b>Excerpt from plugin-repositories.properties</b></div><div
class="panelContent">
<p>http\://9.186.10.157\:8080/plugin/maven-repo/=system\=manager</p>
</div></div>
<p>where</p>
<ul>
	<li>the password <tt>manger</tt> in this example is in plain text. However,
it is recommended to encrypt your password with the <a href="/confluence/display/GMOxDOC22/deploy#deploy-Encrypt"
title="deploy encrypt command">deploy encrypt command</a>.</li>
</ul>


<p>4. Restart the server.</p>

<h4><a name="PluginbasedFarming-Deployasampleplugintothefarm"></a>Deploy
a sample plugin to the farm</h4>
<p>Install a plugin to the farm controller with command. For example, use the <a
href="/confluence/display/GMOxDOC22/Geronimo+GShell+Commands" title="Geronimo GShell Commands">Gshell
command</a> as follows to install a HelloWorld.car plugin:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">
deploy/install-plugin D:/HelloWorld.car -s 9.186.10.157
</pre>
</div></div>

<ul>
	<li><tt>-s</tt>: is a command option that indicates the hostname of the
server. For this example, the hostname is 9.186.10.157.</li>
</ul>


<h4><a name="PluginbasedFarming-Addandremovepluginsandpluginlists"></a>Add
and remove plugins and plugin lists</h4>
<p>Use the <a href="/confluence/display/GMOxDOC22/Geronimo+GShell+Commands#GeronimoGShellCommands-Administeringcluster"
title="(cluster/deploy)">cluster/deploy</a> Gshell command to verify the farm you
set up. For example, add and remove plugins and plugin lists with the following commands:<br/>
Use this command to add a plugin list p1 to farm cluster1:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">cluster/deploy add -c cluster1 -l p1 -s 9.186.10.157 </pre>
</div></div>

<p>Use this command to add the <tt>org.apache.geronimo.samples/HelloWorld/1.0/car</tt>
plugin to plugin list p1:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">cluster/deploy add -l p1 -a org.apache.geronimo.samples/HelloWorld/1.0/car
-s 9.186.10.157</pre>
</div></div>

<p>Use this command to add the <tt>org.apache.geronimo.samples/HelloWorld/1.0/car</tt>
plugin to plugin list p1 and add p1 to farm cluster1:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">cluster/deploy add -c cluster1 -l p1 -a org.apache.geronimo.samples/HelloWorld/1.0/car
-s 9.186.10.157</pre>
</div></div>

<p>Use this command to remove a plugin list p1 from farm cluster1:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">cluster/deploy remove -c cluster1 -l p1</pre>
</div></div>

<p>Use this command to remove the <tt>org.apache.geronimo.samples/HelloWorld/1.0/car</tt>
plugin from plugin list p1:</p>
<div class="code panel" style="border-width: 1px;"><div class="codeContent panelContent">
<pre class="code-java">cluster/deploy remove -l p1 -a org.apache.geronimo.samples/HelloWorld/1.0/car
-s 9.186.10.157</pre>
</div></div>

<p>Access the <b>Plugin</b> portlet form the <b>Administration console</b>
to verify the installation result for all farm members.</p>


<h3><a name="PluginbasedFarming-Futurework"></a>Future work</h3>
<p>The following features could be added in the future:</p>
<ul>
	<li>Provide <b>Administration console</b> support for the administrative
operations.</li>
	<li>Enhance the monitoring console to find nodes using multicast discovery.</li>
	<li>Provide better support for setting up and starting multiple servers on one geronimo
installation.</li>
	<li>Enhance the car-maven-plugin to assemble servers with multiple instance support
in the assembly.</li>
</ul>




    </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/GMOxDOC22/Plugin+based+Farming">View
Online</a>
        |
        <a href="https://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=97495&revisedVersion=13&originalVersion=12">View
Changes</a>
                |
        <a href="https://cwiki.apache.org/confluence/display/GMOxDOC22/Plugin+based+Farming?showComments=true&amp;showCommentArea=true#addcomment">Add
Comment</a>
            </div>
</div>
</div>
</div>
</div>
</body>
</html>

Mime
View raw message