Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar}

Farming

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.
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.

Configuration of Cluster Members

Cluster members are configured on a Geronimo server, which may but is not required to 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:

...

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 config.xml file, farming module of your Geronimo server.
By default, the farming configuration defines the local server as a cluster member. To exclude it, you can prevent the GBean NodeInfo to start.

Farm Deployment

To deploy a configuration to configured members, you simply deploy it to the MasterConfigurationStore repository defined by the farming configuration. This configuration being stopped out-of-the-box, you may have to start it the first time via this GShell command:

...

  • MasterConfigurationStore 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
  • ClusterStore contains the actual configuration under an altered configuration name, a '_G_SLAVE' is appended to the configuration name.

Cluster-wide Management of Configurations

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.