Info |
---|
BellaDati is enterprise scale application with extended support to run in a clustered environment to achieve HA or another desired operation levels. |
BellaDati is not depending on 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 servers cluster |
---|
| application.actor.server.port=2335
tapestry.clustered-sessions=true
application.servers=192.168.1.10:2335,192.168.1.11:2335 |
The example above defines parameters for 2 servers in cluster, running on 192.168.1.10 and 192.168.1.11. Cluster overview pageAdministrators have access to cluster overview pages, which shows useful information about the servers in the cluster. Glassfish cluster on Linux example Warning |
---|
Installing cluster node prerequisites: - BellaDati must be installed on one server (main server)
- both servers (main server with BellaDati installation and Node server for installing instance node) must have valid hostname and must be visible to each other
- on Linux, resolvable hostname must be contained in /etc/hostname and /etc/hosts must contain both server names on both servers.
- JAVA and JAR (part of Java distribution) must be installed on 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 in
|
Info |
---|
This example shows 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 |
---|
| 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 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 |