Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen
Info
BellaDati is enterprise scale application with extended support to run in 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 needs to be change in order to run BellaDati in cluster):

 

Code Block
titleExample 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

 

Example above defines parameters for 2 servers in cluster, running on 192.168.1.10 and 192.168.1.11.

 Cluster overview page

Administrators 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
  1. Add cluster configuration to glassfish5/glassfish/domains/domain1/applications/belladati/WEB-INF/classes/conf/application.properties

    Code Block
    titleExample for 2 servers cluster
    tapestry.clustered-sessions=true
    application.servers=belladati-main:2335,node1:2335
  2. Have two linux servers with SSH access (user and password or certificate).
  3. 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.

  4. Comment out AS_JAVA in /home/glassfish/glassfish/glassfish5/glassfish/config/asenv.conf on the node server.

  5. Verify SSH node by pinging the server

    Code Block
    ./asadmin ping-node-ssh node1

    Using console:

  6. Create cluster

    Code Block
    ./asadmin create-cluster belladati-cluster

    Using console:

  7. Create node instance and assign it to newly create cluster

    Code Block
    ./asadmin create-instance --node node1 --cluster belladati-cluster instance-node1
  8. Start instance

    Code Block
    ./asadmin start-instance instance-node1
  9. Configure JDBC resources targets 

    Code Block
    ./asadmin create-resource-ref --target belladati-cluster jdbc/belladati_db

    Using console:

  10. Configure Application targets
  11. Start cluster

Troubleshooting

 

 

 

 

...