This chapter contains procedures for configuring application servers to support non-clustered and clustered deployments of the Community-Gadgets application.
This chapter contains the following sections:
Section 14.2, "Configuring Application Servers for Non-Clustered Deployments"
Section 14.3, "Configuring Application Servers for Clustered Deployments"
The Community-Gadgets application can be deployed in many ways. For illustration purposes, we use a dual-server configuration, as follows:
Non-clustered deployments
In this guide, we deploy Community-Gadgets on two servers. Management Community-Gadgets is deployed on <ServerA>
and production Community-Gadgets is deployed on <ServerB>
.
Clustered deployments
Community-Gadgets can be deployed as either a vertically or horizontally clustered application. In this guide, we vertically cluster Community-Gadgets as follows: management Community-Gadgets is deployed as a cluster on <ServerA>
, and production Community-Gadgets is deployed as a cluster on <ServerB>
. Horizontal clustering can be achieved by replicating the above configuration on as many additional servers as needed.
This section provides steps for configuring selected application servers to support the deployment of a non-clustered Community-Gadgets application.
This section covers the following configurations:
Section 14.2.2, "Configuring Oracle WebLogic Application Server"
Section 14.2.3, "Configuring IBM WebSphere Application Server"
Note:
In this section, you will configure an application server to support a non-clustered Community-Gadgets. As discussed in Chapter 12, "Overview of Community-Gadgets," you have multiple ways to configure such a non-clustered system. For illustration purposes, the steps in this section describe the deployment of the Community-Gadgets application on two servers, as explained in Section 14.1, "Overview of Community-Gadgets Deployment."This section contains the following topics:
Section 14.2.2, "Configuring Oracle WebLogic Application Server"
Section 14.2.3, "Configuring IBM WebSphere Application Server"
In this section, you will configure Apache Tomcat to support deployment of a non-clustered Community-Gadgets application, as follows:
On <ServerA>
:
Create a Tomcat instance (<cgA_M1>
) on which to deploy the management Community-Gadgets application.
Edit catalina.sh
in <cgA_M1>
/bin
by adding the following line after the first comment block:
CATALINA_HOME=<cgA_M1>
On <ServerB>
:
Create a Tomcat instance (<cgB_P1>
) on which to deploy the production Community-Gadgets application.
Edit catalina.sh
in <cgB_P1>
/bin
by adding the following line after the first comment block:
CATALINA_HOME=<cgB_P1>
Continue to Chapter 15, "Generating Community-Gadgets Deployment Files."
In this section, you will configure WebLogic Application Server to support deployment of non-clustered Community-Gadgets.
Note:
Machines and managed servers can be created as a part of the WebLogic domain configuration utility, or they can be created separately from the WebLogic Administration Console of the corresponding domain. If you need detailed steps on configuring WebLogic domains, refer to the Oracle WebLogic Application Server documentation.To support the deployment of a non-clustered, management Community-Gadgets application, complete the following steps:
On <ServerA>
, use the domain configuration utility to create a domain, a new machine, and a new managed server.
For example, if you are using Linux:
cd <WL_HOME>/wlserver_10.3/common/bin ./config.sh
For reference, this guide uses the configurations described in Table 14-1, Table 14-2, and Table 14-3.
Table 14-1 WebLogic Domain Configuration Example for Management Community-Gadgets
Property | Value |
---|---|
Domain Name |
< |
Admin Server |
|
Admin Server Port |
For example: Or use your own value as appropriate for your configuration. |
Similarly, configure WebLogic Application Server as follows to support deployment of a non-clustered, production Community-Gadgets application:
On <ServerB>
, use the domain configuration utility to create a domain, a new machine, and a new managed server.
For reference, this guide uses the configurations described in Table 14-4, Table 14-5, and Table 14-6.
Table 14-4 WebLogic Domain Configuration Example for Production Community-Gadgets
Property | Value |
---|---|
Domain Name |
< |
Admin Server |
|
Admin Server Port |
For example: Or use your own value as appropriate for your configuration. |
For each server in steps 1 and 2:
Select Enable Tunneling.
Select None for Hostname Verification.
For each domain, create a directory for staging the Community-Gadget application. In this guide, we created a directory named applications
in the following paths:
<WL_HOME>/user_projects/domains/cgMgmt/applications <WL_HOME>/user_projects/domains/cgProd/applications
Continue to Chapter 15, "Generating Community-Gadgets Deployment Files."
In this section, you will configure IBM WebSphere Application Server to support deployment of a non-clustered Community-Gadgets application.
Note:
If you need detailed steps on configuring IBM WebSphere Application Server, refer to the vendor's documentation.Create a node on which to deploy the management Community-Gadgets application, and federate that node to your Deployment Manager.
If you do not have a Deployment Manager configured, then create a Deployment Manager and Application Server profile and federate the node to the Deployment Manager profile you just created.
For reference, this guide uses the configurations described in Table 14-7 and Table 14-8.
Similarly, create a node on which to deploy the production Community-Gadgets application, and federate that node to your Deployment Manager.
For reference, this guide uses the configurations described in Table 14-9 and Table 14-10.
Table 14-9 WebSphere Profile Configuration Example for Production Community-Gadgets
Property | Value |
---|---|
Deployment Manager Profile |
|
Host Server |
|
Deployment Manager Admin Server Port |
For example: Or use your own value as appropriate for your configuration. |
Table 14-10 WebApplication Server Profile Configuration Example for Production Community-Gadgets
Property | Value |
---|---|
Application Server Name |
|
Profile |
|
Node |
|
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Continue to Chapter 15, "Generating Community-Gadgets Deployment Files."
This section describes the configuration of supported application servers to support clustered deployments of the Community-Gadgets application.
This section covers these clustered deployment configurations:
Section 14.3.2, "Configuring Oracle WebLogic Application Server (Clustered)"
Section 14.3.3, "Configuring IBM WebSphere Application Server (Clustered)"
Note:
In this section, you will configure an application server to support a clustered Community-Gadgets installation. As discussed in Chapter 12, "Overview of Community-Gadgets," you have multiple ways to configure a clustered system. For illustration purposes, the steps in this section describe vertical clustering of the Community-Gadgets application, as explained in Section 14.1, "Overview of Community-Gadgets Deployment."In this section, you will configure Apache Tomcat to support deployment of a clustered Community-Gadgets application.
On <ServerA>
:
Create a Tomcat instance (<cgA_M1>
) on which to deploy the management Community-Gadgets application. Edit catalina.sh
in <cgA_M1>
/bin
by adding the following line after the first comment block:
CATALINA_HOME=<cgA_M1>
Create a Tomcat instance (<cgA_M2>
) on which to deploy the management Community-Gadgets application. Edit catalina.sh
in <cgA_M2>
/bin
by adding the following line after the first comment block:
CATALINA_HOME=<cgA_M2>
Edit the server.xml
file ensure there are no port conflicts.
On <ServerB>
:
Create a Tomcat instance (<cgB_P1>
) on which to deploy the production Community-Gadgets application. Edit catalina.sh
in <cgB_P1>
/bin
by adding the following line after the first comment block:
CATALINA_HOME=<cgB_P1>
Create a Tomcat instance (<cgB_P2>
) on which to deploy the production Community-Gadgets application. Edit catalina.sh
in <cgB_P2>
/bin
by adding the following line after the first comment block:
CATALINA_HOME=<cgB_P2>
Edit the server.xml
file to ensure there are no port conflicts.
After you complete the above steps, your Tomcat configurations should look something like the example in Table 14-11.
Configure the application server cluster by editing the server.xml
file. Follow the steps below for <ServerA>
and <ServerB>
.
For each cluster member, add clustering ability by adding the following code to the server.xml
file (refer to Apache Tomcat documentation for information about the code):
<Cluster className= "org.apache.catalina.ha.tcp.SimpleTcpCluster" channelSendOptions="8"> <Manager className= "org.apache.catalina.ha.session.DeltaManager" expireSessionsOnShutdown="false" notifyListenersOnReplication="true"/> <Channel className= "org.apache.catalina.tribes.group.GroupChannel"> <Membership className= "org.apache.catalina.tribes.membership.McastService" address="228.0.0.4" port="45564" frequency="500" dropTime="3000"/> <Receiver className= "org.apache.catalina.tribes.transport.nio.NioReceiver" address="auto" port="4000" autoBind="100" selectorTimeout="5000" maxThreads="6"/> <Sender className= "org.apache.catalina.tribes.transport. ReplicationTransmitter"> <Transport className= "org.apache.catalina.tribes.transport.nio. PooledParallelSender"/> </Sender> <Interceptor className= "org.apache.catalina.tribes.group.interceptors. TcpFailureDetector"/> <Interceptor className= "org.apache.catalina.tribes.group.interceptors. MessageDispatch15Interceptor"/> </Channel> <Valve className= "org.apache.catalina.ha.tcp.ReplicationValve" filter=""/> <Valve className= "org.apache.catalina.ha.session. JvmRouteBinderValve"/> <Deployer className= "org.apache.catalina.ha.deploy.FarmWarDeployer" tempDir="/tmp/war-temp/" deployDir="/tmp/war-deploy/" watchDir="/tmp/war-listen/" watchEnabled="false"/> <ClusterListener className= "org.apache.catalina.ha.session. JvmRouteSessionIDBinderListener"/> <ClusterListener className= "org.apache.catalina.ha.session. ClusterSessionListener"/> </Cluster>
To enable load balancing using AJP, locate the Engine line in the server.xml
file, then add a jvmRoute
for the server instance. For example, to include a jvmroute
in the line <Engine name="Catalina" defaultHost="localhost"> and name the server jvm1
, add jvmRoute="jvm1"
as follows: <Engine name="Catalina" defaultHost="localhost"
jvmRoute="jvm1"
>
.
Note that the each server must have a unique jvmRoute
name.
Verify that all Tomcat instances belonging to the same cluster have the same values for multicast address
and port
in the Membership
tag. For example, <cgB_P1>
and <cgB_P2>
must have the same values for multicast address and port.
Verify that all Tomcat instances belonging to the different cluster have a multicast address or port number (in the Membership
tag) that is unique across clusters. For example, all Tomcat instances in the <cgA_M1>/<cgA_M2>
cluster must have a multicast address or port number that differs from the multicast address or port number of Tomcat instances in the <cgB_P1>/<cgB_P2>
cluster.
For a vertical cluster, verify that all Tomcat instances located on the same server have different values for the port
parameter in the Receiver
tag.
If you are using a multi-homed server, enter the exact IP address or host name (instead of auto) as the value for the address
parameter in the Receiver
tag.
On all Tomcat instances, add the <distributable/>
tag in the <web-app>
tag to the <TC_HOME>
/conf/web.xml
file.
Continue to Chapter 15, "Generating Community-Gadgets Deployment Files."
In this section, you will configure WebLogic Application Server to support deployment of a clustered Community-Gadgets application.
Note:
Machines and managed servers can be created as a part of the WebLogic domain configuration utility, or they can be created separately from the WebLogic Administration Console of the corresponding domain. If you need detailed steps on configuring WebLogic domains, refer to the Oracle WebLogic Application Server documentation.To support the deployment of a clustered, management Community-Gadgets application, do the following:
On <ServerA>
, use the domain configuration utility to create a domain, a new machine, new managed servers, and the cluster.
For example, if you are using Linux:
cd <WL_HOME>/wlserver_10.3/common/bin ./config.sh
For reference, this guide uses the configurations described in Table 14-12, Table 14-13, Table 14-14, and Table 14-15.
Table 14-12 WebLogic Domain Configuration Example for Management Community-Gadgets (Clustered)
Property | Value |
---|---|
Domain Name |
|
Admin Server |
|
Admin Server Port |
For example: Or use your own value as appropriate for your configuration. |
Table 14-13 WebLogic Machine Configuration Example for Management Community-Gadgets (Clustered)
Property | Value |
---|---|
Machine Name |
|
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Table 14-14 WebLogic Managed Server Configuration Example for Management Community-Gadgets (Clustered)
Property | Value |
---|---|
Managed Server 1 |
|
Domain |
|
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Machine |
< |
Managed Server 2 |
|
Domain |
< |
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Machine |
< |
Similarly, configure WebLogic Application Server to support the deployment of a clustered production Community-Gadgets application.
On <ServerB>
, use the domain configuration utility to create a domain, a new machine, new managed servers, and the cluster.
For reference, this guide uses the configurations described in Table 14-16, Table 14-17, Table 14-18, and Table 14-19.
Table 14-16 WebLogic Domain Configuration Example for Production Community-Gadgets (Clustered)
Property | Value |
---|---|
Domain Name |
|
Admin Server |
|
Admin Server Port |
For example: Or use your own value as appropriate for your configuration. |
Table 14-17 WebLogic Machine Configuration Example for Production Community-Gadgets (Clustered)
Property | Value |
---|---|
Machine Name |
|
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Table 14-18 WebLogic Managed Server Configuration Example for Production Community-Gadgets (Clustered)
Property | Value |
---|---|
Managed Server 1 |
|
Domain |
< |
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Machine |
< |
Managed Server 2 |
|
Domain |
< |
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Machine |
< |
For each managed server created on <ServerA>
and <ServerB>
:
Select Enable Tunneling.
Select None for Hostname Verification.
For each domain, create a directory for staging the Community application. In this guide, we created a directory named applications
in the following paths:
<WL_HOME>/user_projects/domains/cgMgmt/applications <WL_HOME>/user_projects/domains/cgProd/applications
For each cluster, go to its Advanced Cluster Configuration section and select the WebLogic Plug-In Enabled parameter.
Continue to Chapter 15, "Generating Community-Gadgets Deployment Files."
In this section, you will configure WebSphere Application Server to support deployment of a clustered Community-Gadgets application.
Note:
If you need detailed steps on configuring IBM WebSphere Application Server, or details on creating profiles or federating nodes, refer to the vendor's documentation.Create a node on which to deploy the management Community-Gadgets application, and federate that node to your Deployment Manager.
If you do not have a Deployment Manager configured, then create a Deployment Manager and Application Server profile and federate the node to the Deployment Manager profile you just created.
For reference, this guide uses the configurations described in Table 14-20 and Table 14-21.
Table 14-20 WebSphere Profile Configuration Example for Management Community-Gadgets (Clustered)
Property | Value |
---|---|
Deployment Manager Profile |
|
Host Server |
|
Deployment Manager Admin Server Port |
For example: Or use your own value as appropriate for your configuration. |
Table 14-21 WebSphere Application Server Configuration Example for Management Community-Gadgets (Clustered)
Property | Value |
---|---|
Application Server Name |
|
Profile |
< |
Node |
|
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Application Server Name |
|
Profile |
< |
Node |
|
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Similarly, create a node on which to deploy the production Community-Gadgets application, and federate that node to your Deployment Manager.
For reference, this guide uses the configurations described in Table 14-22 andTable 14-23.
Table 14-22 WebSphere Profile Configuration Example for Production Community-Gadgets (Clustered)
Property | Value |
---|---|
Deployment Manager Profile |
|
Host Server |
|
Deployment Manager Admin Server Port |
For example: Or use your own value as appropriate for your configuration. |
Table 14-23 WebSphere Application Server Configuration Example for Production Community-Gadgets (Clustered)
Property | Value |
---|---|
Application Server 1 Name |
|
Profile |
< |
Node |
|
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Application Server 2 Name |
|
Profile |
< |
Node |
|
Listen Address |
|
Listen Port |
For example: Or use your own value as appropriate for your configuration. |
Create two new clusters (see Table 14-24), using the WebSphere Administration Console.
For example:
http://<ServerA>:9060/ibm/console
Table 14-24 WebSphere Cluster Configuration Examples for Community-Gadgets
Configuration | Property | Value |
---|---|---|
Cluster 1 |
Cluster Name |
|
Cluster 1 |
Configure HTTP memory-to-memory replication |
|
Cluster 1 |
Cluster Members |
|
Cluster 2 |
Cluster Name |
|
Cluster 2 |
Configure HTTP memory-to-memory replication |
|
Cluster 2 |
Cluster Members |
|
For each managed server created on <ServerA>
and <ServerB>
, complete the following steps in the WebSphere Administration Console:
Set memory-to-memory replication.
Under Web Container Settings, add the following custom property:
Name: HttpSessionCloneId Value: 11111111 (8-9 characters, unique for each managed server)
If you wish to customize replication domains, use the administrative console (select Environment, then select Replication domains in the left frame).
Add ports for all cluster members (go to Environment, then select Virtual hosts, then select default_host, then select Host Aliases and add the ports).
Continue to Chapter 15, "Generating Community-Gadgets Deployment Files."