This article documents how to deploy Liferay Portal 6.2 or Liferay DXP (7.0 or 7.1) on WebSphere Application Server with Network Deployment (commonly abbreviated ND).
The Network Deployment Edition is a tool that offers an additional profile to manage multiple application server environments. In a "standard" WebSphere environment that does not have the Deployment Manager profile, administrators must individually, manually deploy the Liferay Portal or Liferay DXP .war file on every node in a clustered environment. The advantages of using the ND version is that administrators do not have to deploy the .war file multiple times. Instead, the ND edition includes a deployment manager (DMGR) and an administrative agent which manages the entire environment.
Table of Contents
- Create a Deployment Manager Profile
- Create an Administrative Agent Profile
- Create a Application Server profile
- Federate Nodes
- Configure WebSphere Admin Console
Resolution
Create a Deployment Manager Profile
- Start the IBM Profile Management Tool.
- Click Create profile.
- Click Management.
- Click Deployment Manager.
- Click Advanced profile creation.
- Use the default values except for the
hostfield. Use the IP address instead of localhost. Disable administrative security. - Once the Deployment Manager profile has been created, start the Deployment manager..
Create an Administrative Agent Profile
- Open the IBM Profile Management Tool.
- Click Create profile.
- Click Management.
- Click Administrative Agent.
- Click Next then Typical Profile Creation.
- Disable administrative security.
- Once the Administrative Agent profile has been created, start the Administrative Agent.
Create an Application Server Profile
At this point, administrators now create the traditional application server profiles where Liferay Portal 6.2 or Liferay DXP will be deployed. Create as many profiles as needed in a cluster environment. These will be the nodes - AppSrv01 becomes cluster node 1;, AppSrv02 becomes node 2, and so forth.
- Open the Profile Management Tool.
- Click Create profile.
- Click Application Server.
- Click >Next then "Typlical profile creation".
- Click >Next then disable administrative security.
- Click Create.
Repeat these steps for every node.
Federate Nodes
Execute the addNode command under bin folder to add the node to Primary Node. These extra steps are required for Network Deployment edition. This step adds (federates) all the nodes so they can communicate with each other at this level. Note that this does not replace other required settings such as the unicast cluster communications protocols (found in the tcp.xml). (The following commands are given in Unix/Linux style.)
- Navigate to
/app/IBM/WebSphere/AppServer/profiles/AppSrv01/bin. - Execute in the command line:
./addNode.sh IP address [SOAP port]
(for example:./addNode.sh 192.168.0.103 8880) - Verify the success message displays:
Node ${node1Name} has been successfully federated. - Repeat these steps for every node on the cluster.
Configure the nodes in the WebSphere Admin Console
Checkpoint checklist:- Deployment Manager (Dmgr01) has been created and started.
- Administrative Agent (AdminAgent01) has been created and started.
- For every node in the cluster, an Application Server profile has been created (Node1, Node2, Node3...).
- Every node in the cluster has been federated.
Once the four above things above had been completed, there are a few more steps before the .war can be deployed.
- Create a
homefolder for every node; increment them like home1, home2, home3. - Create a
portal-ext.propertiesfile. - For Liferay DXP 7.x, unzip the OSGi modules folder inside and then set the location inside the
portal-ext.properties. - Administrators can set their database settings in the
portal-ext.propertiesif they so choose or use WebSphere's JNDI native settings instead. - Enable clustering by setting
cluster.link.enabled=trueand set the cluster communications protocol depending on which version of Liferay (multicast or unicast). For more information on clustering and ehcache, see this KB article Liferay Clustering and How to Cluster with TCP Unicast. - Then place the
portal-ext.propertiesinside the Liferay Portal or Liferay DXP 7.x.warfile.
It is easier to deploy Liferay Portal or Liferay DXP 7.x with the desired settings on the first time in WebSphere than to shut down the server, make the changes, and then restart the server to apply the changes. In the WebSphere console, save to the master configuration AFTER every change, no matter how small.
- Navigate to the IBM Console at http://${IP Address}:9060/ibm/console
- On the Primary Node, Click > Manage Server > System Admin. There are the two nodes displayed. If they are not synced, try to submit Sync request manually.
- Click Servers > Server Types > Delete the existing two nodes. Save.
- Click Clusters > New Cluster >. Check Session Replication option. Add the nodes.
- Modify the JVM options for each node: Add
-Djava.net.preferIPv4Stack=true. - Deploy the
.waron the first node. At this point, the deployment process is more or less the same as a "standard" application server without the Network Deployment manager. The only difference is that the Deployment Manager will distribute the.waracross each nodes. - Start each node successively. Navigate to http://${IP Address}:9080 (increment 1 to for every node). Liferay Portal (or Liferay Digital Enterprise 7.0) will be ready to use. Deploy the cluster license for each node.
- Deploy the Ehcache plugin to each node.
Obviously there is more to a clustered environment than just the application server and database. There is of course a load balancer, a web server (for example, Apache Web Server), and a search/indexing server (for example, Solr, ElasticSearch). Configuring them with a WebSphere Application Server with Network Deployment edition is virtually the same as a "standard" version.