Info |
---|
BellaDati is an enterprise scale application with extended support to run in a clustered environment to achieve HA or other desired operation levels. |
BellaDati is not depending on the selected cluster environment, you can run it on GlassFish, Websphere or JBoss, but there are several parameters contained in application.properties (see BellaDati WAR Configuration) which need to be changed in order to run BellaDati in the cluster): Code Block |
---|
title | Example for 2 4 servers cluster |
---|
| application.actor.server.port=2335
tapestry.clustered-sessions=true
application.servers=192.168.1.10172.31.38.23:2335,172.31.13.180:2335,172.31.45.195:2335,192172.16831.12.1141:2335 |
The example above defines parameters for 2 servers 4 machines in a cluster, running on 192.168.1.10 and 192.168.1.11. The server's IPs are 172.31.38.23, 172.31.13.180, 172.31.45.195 and 172.31.2.41. Cluster overview pageAdministrators have access BellaDati administrators have access to cluster overview pagespage , which shows provides useful information about the servers in the clusterregarding each of clustered servers. Image Removed Image Removed Image Added Glassfish cluster on Linux example Warning |
---|
Installing cluster node prerequisites: - BellaDati must be installed on one server - main server (next called "belladati-main server" )
- both servers (main server with BellaDati installation and Node server servers for installing instance node) must have a valid hostname and must be visible to each other
- on Linux, the resolvable hostname must be contained in /etc/hostname and /etc/hosts must contain both all server names on both all servers.
- JAVA and JAR (part of Java distribution) must be installed on the server to be used as instance node
- SSH user with password or certificate authentication
- Port 2335 must be opened to both servers
- Edit application.properties as defined above - the file is located in .../domain/domain1/applications/belladati/WEB-INF/classes/conf/application.properties on belladati-main server
|
Info |
---|
This example shows a configuration of Glassfish SSH node (complete description can be found in Glassfish reference manual) For this example we assume, we have BellaDati installed on belladati-main server and node server (without BellaDati installation) running on node1 host, then an SSH user glassfish with password authentication stored in password file: Code Block |
---|
AS_ADMIN_SSHPASSWORD=glassfish |
|
Add cluster configuration to glassfish5/glassfish/domains/domain1/applications/belladati/WEB-INF/classes/conf/application.properties Code Block |
---|
title | Example for 2 servers cluster |
---|
| application.actor.server.port=2335
tapestry.clustered-sessions=true
application.servers=belladati-main:2335,node1:2335 |
- Have two linux servers with SSH access (user and password or certificate).
Create SSH node over console or asadmin command Code Block |
---|
./asadmin create-node-ssh --nodehost node1 --installdir /home/glassfish --install=true --sshuser glassfish --passwordfile password node1 |
This command creates /home/glassfish/glassfish directory on the node server. Comment out AS_JAVA in /home/glassfish/glassfish/glassfish5/glassfish/config/asenv.conf on the node server. Verify SSH node by pinging the server Code Block |
---|
./asadmin ping-node-ssh node1 |
Using console:
Create cluster Code Block |
---|
./asadmin create-cluster belladati-cluster |
Using console:
Create node instance and assign it to newly create a cluster Code Block |
---|
./asadmin create-instance --node node1 --cluster belladati-cluster instance-node1 |
Start instance Code Block |
---|
./asadmin start-instance instance-node1 |
Configure JDBC resources targets Code Block |
---|
./asadmin create-resource-ref --target belladati-cluster jdbc/belladati_db |
Using console:
- Configure Application targets
- Start cluster
Updating BellaDati in ClusterWe recommend updating only the WAR file. It is necessary to keep the currently existing application.properties file. Troubleshooting |