Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Sv translation
languageen

Introduction


Info
  • Base line of BellaDati versions 2.10+ is developed (architecture) on java11 and Payara application server.

( Payara 5.2021.4 https://docs.payara.fish/community/docs/5.2021.4/documentation/payara-server/README.html,

java 11.0.2 https://openjdk.org/projects/jdk/11/ )


  • BellaDati 2.10+ is scalable both vertically and horizontally.

Vertical scaling is done adding more power to machine - more CPUs, Memory, storage, network speed.

Horizontal scaling is realized by adding additional nodes to the pool of resources.

  • BellaDati 2.10+ as mentioned above operate (is deployed) on application server Payara 5+.

The application server makes possible to increase  BellaDati complex power by horizontal scaling. BellaDati application is deployed to many nodes of multiple-node environment of Payara application server.

More details see web pages of Payara.


Info
titleHorizontal Scalability

Multiple-node (Cluster) environment for several computers  - horizontal scalability can be created to achieve  HA or other desired operation levels.

Payara server is derived from GlassFish Server Open Source Edition. To install multiple-node (cluster) solution on set of computers is similar (but not the same) as that, used for GlassFish application server clustering.

( detail description for BellaDati GlassFish is in https://support.belladati.com/techdoc/Running+BellaDati+in+Cluster+-+Linux


Note
titleWhat is node

A node, in the context of Payara Server, is a logical representation of a host where Payara Server is installed, which the Domain Administration Server (DAS) can use to locate and identify remote instances. A node must be configured for any host where an instance of Payara Server is to be created.


Note
titlemultiple-node environment

There is not limitation to two nodes in BellaDati installation for horizontal scalability based on Payara application server. Tests with deploying BellaDati application have been done to  4+ nodes.


Next manual illustrates and step by step describes  how  to realize multiple-node ( cluster) installation with two computers up to to operational status; 

Private network for nodes communication is used.


  



Summary of installation instructions


  • arranging ssh connectivity for selected user on all "multiple-node (cluster)" computers in a given computer private network

  • installing java11 environment

  • creating multiple-node (cluster) environment (nodes, instances)

  • deploying BellaDati application to multiple-node (cluster)

  • setting up parameters in Payara application server  needed to run BellaDati

  • licensing Belladati


server Environment

SSH connectivity


User "cluster" is added to server, group admin,

password authentication allowed in private network, ssh allowed in firewall


/etc/hosts table(s):

server 172.31.40.20

127.0.0.1 localhost

127.0.0.1 ip-172-31-40-20

172.31.40.20 ip-172-31-40-20.eu-central-1.compute.internal belladati-main

172.31.38.252 ip-172-31-38-252.eu-central-1.compute.internal node1


server 172.31.38.252

127.0.0.1 localhost

127.0.0.1 ip-172-31-38-252

172.31.40.20 ip-172-31-40-20.eu-central-1.compute.internal belladati-main

172.31.38.252 ip-172-31-38-252.eu-central-1.compute.internal node1


i.e. two servers are included to multiple-node (cluster) environment ; the static (private) FQDN IP are   ip-172-31-40-20.eu-central-1.compute.internal and p-172-31-38-252.eu-central-1.compute.internal

FQDN stands for Fully Qualified Domain Name          

    e.g    hostnamectl set-hostname ip-172-31-40-20.eu-central-1.compute.internal      ( FQDM for server belladati-main in private network)

Testing ssh across servers communication and java commands availability for account     cluster  (login name)   ssh -l cluster node1, ( belladati-main  or IPs or FQDNs)


Installing java11 environment


As mentioned above, BellaDati version 2.10 comes with java11 and Payara application server.

The fact is utilized in the following installation instructions:

  •     PostgreSQL database engine is installed(in this example on belladati-main server but using separate sever is recommended  );
  •     IP, port, database_name, database_user/password are known and database is visible from both servers  
  •     install BellaDati version with installer on computer with alias name belladati-main (example used  BellaDati_linux-x64_2_10_0_beweinPRjava11_80-SNAPSHOT.sh)
  •     jre environment is after installation  available  on belladati-main server, directory /usr/local/BellaDati
  •     copy jre from belladati-main to node1 server  (second server of multiple-node (cluster) environment) : scp -r jre cluster@node1:/home/cluster/
  •     modify  /etc/environment adding path to jre/bin

Run java testing commands on belladati-main server (for each of the servers)       ssh -l login name server identification 'java command'

(tick)      ssh -l cluster node1 'java -version' ;  ssh l cluster node1 'jar -help ' etc.

 (lightbulb)SSH account cluster is going to spread Payara application server environment from belladati-main server to every multiple-node server.



Info
titleEnvironment setting final notice
  • Now, there are at least two computers operating linux OS
  • BellaDati application is running on Payara application server on "belladati-main" computer as common non-cluster installation
  • Defined ssh user "cluster" can  communicate across private network and start java commands from belladati-main on every server
  • PostgreSQL dbs engine database is visible from both servers


Multiple-node (Cluster) environment Installation



(lightbulb)The processes described here are carried out by root on belladati-main machine.

   Payara asadmin utility subcommands are preferred ( GUI of Payara console is available too).


  • Setting account(user) cluster password

The role of the user cluster is to spread up Payara environment from belladat-main machine  to all cluster machines. To utilize the account in next commands, its password alias is created:


run command : asadmin create-password-alias clusterpassword    

insert cluster account password

run vim /home/cluster/clusterpassword     

add line:    AS_ADMIN_SSHPASSWORD=${ALIAS=clusterpassword}


(info)  asadmin list-password-aliases   shows the name, asadmin delete-password-alias  XXXXX  delete the password alias


  • Node(s) creation

             Machine belladati-main directory /usr/local/BellaDati/payara5 will be copied to the multiple-node (cluster) machine node1 to directory /home/cluster/payara5 directory of the user cluster.

             The user cluster has ssh connection to the machines. Its password information is in /home/password/clusterpassword file.


Warning
titlenadmin file

/home/cluster/payara5 directory exists on node1 computer

Before next step check/modify nadmin file permissions   on belladati-main server, directory ...payara5/glassfish/lib   ; ( chmod +x nadmin)


                

                asadmin create-node-ssh  --nodehost node1 --installdir /home/cluster/payara5 --install=true --sshuser cluster --passwordfile  /home/cluster/clusterpassword  node1 


 Node verification - testing connection to node (s)


      run command  asadmin ping-node-ssh node1

                            asadmin list-nodes-ssh    (info) ssh nodes created are listed

                            asadmin list-nodes          (info)  this command list all nodes, including original node localhost-domain1 on localhost i.e. on belladati-main

example:

root@ip-172-31-40-20:/usr/local/BellaDati/payara5/glassfish/lib# asadmin list-nodes
localhost-domain1 CONFIG localhost
node1 SSH node1
Command list-nodes executed successfully.

Modifying Path to Payara java variable:

change variable AS_JAVA in /home/cluster/payara5/glassfish/config/asenf.conf  AS_JAVA=/home/cluster/jre/

(lightbulb) reason: PATH for JAVA environment; on ssh nodes is not equal to PATH copying from belladati-main in asenv.conf file



  • Multiple-node (Cluster) formation

         The base environment/configuration for multiple-node (cluster)  itself is establishing now. The multiple-node (cluster) name will be  "belladati-cluster". 


     run command  asadmin create-cluster belladati-cluster

     (lightbulb)  New configuration is added to Payara configuration. Its name is belladati-cluster-config. Its  configuration is the same as default-config.

     (info)  helpful additional commands:   asadmin list-clusters     ;     asadmin delete-cluster belladati-cluster 


  • Creating belladati-cluster instances

       

       Cluster instance on belladati-main; its name is  "instance-local"


       run command     asadmin create-local-instance  --cluster belladati-cluster instance-local

(tick)  output example:

Rendezvoused with DAS on localhost:4848.

Port Assignments for server instance instance-local:

OSGI_SHELL_TELNET_PORT=26666

JAVA_DEBUGGER_PORT=29009

HTTP_LISTENER_PORT=28080

IIOP_SSL_LISTENER_PORT=23820

ASADMIN_LISTENER_PORT=24848

IIOP_SSL_MUTUALAUTH_PORT=23920

JMX_SYSTEM_CONNECTOR_PORT=28686

HTTP_SSL_LISTENER_PORT=28181

IIOP_LISTENER_PORT=23700

Command create-local-instance executed successfully


(info)  see /usr/local/BellaDati/payara5/glassfish    additional files hierarchy appears  nodes/localhost-domain1/...


Cluster instance on ssh node

       


run commands for node1; names for the created instances will be instance-node1

asadmin create-instance --node node1   --cluster belladati-cluster instance-node1

(tick) output example

Command _create-instance-filesystem executed successfully.

Port Assignments for server instance instance-node1:

OSGI_SHELL_TELNET_PORT=26666

JAVA_DEBUGGER_PORT=29009

HTTP_LISTENER_PORT=28080

IIOP_SSL_LISTENER_PORT=23820

ASADMIN_LISTENER_PORT=24848

IIOP_SSL_MUTUALAUTH_PORT=23920

JMX_SYSTEM_CONNECTOR_PORT=28686

HTTP_SSL_LISTENER_PORT=28181

IIOP_LISTENER_PORT=23700

The instance, instance-node1, was created on host node1

Command create-instance executed successfully.



(info) helpful commands;  for visibility:  asadmin list-instances, for deleting: asadmin delete-instance  NAME of the instance to delete


          

Setting up multiple-node (cluster)  Configuration


Info
titlebelladati-cluster configuration

Configuration file for belladati-cluster is named belladati-cluster-config. Until now, there is no information in its contents regarding resources for BellaDati in the cluster, no information about application to run in cluster. Parameters defining now (overtaking from default-config)  e.g. thread-pools, heap space for jvm etc. are not valid for running application BellaDati in cluster environment.

Next steps describe how to modify the configuration file belladati-cluster-config

  


  • Setting up application reference


       run commands:     asadmin create-application-ref   --target belladati-cluster  belladati

                                   asadmin delete-application-ref  --target server  belladati

(lightbulb) BellaDati was installed on Payaraapplication serverand its target was server; for cluster arrangement  target change  to "belladati-cluster" is needed


       (info)  to see the application references    asadmin list-application-refs  belladati-cluster   ;

           to delete belladati reference from cluster                  asadmin delete-application-ref  --target belladati-cluster belladati    

           to delete belladati reference from default server        asadmin delete-application-ref  --target server  belladati

    

  • Setting up thread pools

        Taking into account recommendation for belladati installation max-thread-pool-size will be changed.


        run command     asadmin list-threadpools belladati-cluster  to see list of threadpools;

        modifications will be done threadpools: http-thread-pool   and   thread-pool-1

       http-thread-pool:

       run command  asadmin get belladati-cluster-config.thread-pools.thread-pool.http-thread-pool.*        (info) parameters values  before setting up

            and run      asadmin set belladati-cluster-config.thread-pools.thread-pool.http-thread-pool.max-thread-pool-size=512


      thread-pool-1:

       run command  asadmin get belladati-cluster-config.thread-pools.thread-pool.thread-pool-1*        (info) parameters values  before setting up

            and run      asadmin set belladati-cluster-config.thread-pools.thread-pool.thread-pool-1.max-thread-pool-size=512



  • JVM options setting


Info
titleJVM

New BellaDati 2.10+ architecture transfered  some parameters from application server (see https://support.belladati.com/techdoc/Running+BellaDati+in+Cluster+-+Linux) to jvm options. The parameters must be defined in belladati-cluster-config.



 to see all JVM options as defined before modification for belladati-cluster:

                           asadmin list-jvm-options    --target  belladati-cluster


        Dependently on machine HW specifications there are recommendation to modify so called "heap-space" for running jvm. The parameter  -Xmxnnnnnm. nnnnn is value of RAM size for jvm.

 Heap space modification

      run command to delete -Xmx value not valid for cluster:

      asadmin delete-jvm-options  --target belladati-cluster -Xmx512m               (info)  the "-Xmx512m" is default value, i.e. just 512 MB for running jvm - not enough for BellaDati operation

      run command to setup new, valid value for -Xmx:

      asadmin create-jvm-options  --target belladati-cluster  -Xmx4096m           (tick)  the "-Xmx2048m" i.e. 4096 MB for jvm  is valid for this cluster. (The value is based on given machines HW specification and usually is higher;)


Parameters for jdbc resources


asadmin create-jvm-options --target belladati-cluster -Djdbc.driverClassName=org.postgresql.Driver

asadmin create-jvm-options --target belladati-cluster -Dfile.encoding=UTF-8

asadmin create-jvm-options --target belladati-cluster -Dlogs.location=../../../../../logs

asadmin create-jvm-options --target belladati-cluster "-Djdbc.url=jdbc\:postgresql\://IPaddress where  dbs engine runs\:port/dbs_name"

asadmin create-jvm-options --target belladati-cluster -Djdbc.username=dbs_user_name

asadmin create-jvm-options --target belladati-cluster -Djdbc.password=password

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.maxActive=200

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.minIdle=8

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.maxIdle=200

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.minIdleEvictionTime=300000

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.maxWaitTime=60000


Parameters specifying cluster environment:


asadmin create-jvm-options --target belladati-cluster -Dtapestry.clustered.session=true

asadmin create-jvm-options --target belladati-cluster -Dapplication.actor.server.port=2335

asadmin create-jvm-options --target belladati-cluster -Dapplication.servers=belladati-main\:2335,node1\:2335



Info
titleCluster setup final notice

New, modified configuration for cluster is available now. Many changes occurred during the process. Payara application server needs restarting.



Run command:                                                      asadmin  restart-domain




Starting Cluster



(info)  helpful commands to check the cluster environment before starting cluster:

     asadmin list-domains ;   asadmin list-nodes ;   asadmin list-instances ;  asadmin list-application-refs belladati-cluster

     (lightbulb)  asadmin list-instances  belladati-cluster command lists all instances available for cluster belladati-cluster, namely: instance-local, instance-node1


(warning) The process of the cluster starting can take minutes. 


 run command          asadmin start-cluster  --verbose belladati-cluster      (info) one command to start all cluster nodes (instances)


or alternatively


 run commands          asadmin start-instance   NAME   (instance-local, instance-node1 etc)  

(info) command for the first instance start cluster environment with one instance; the next commands will add instances to the cluster.

This command is very illustrative with BellaDati application Monitoring cluster screen.


(lightbulb) Visibility:           asadmin list-clusters       ;         asadmin list-instances beladati-cluster


Modifying BellaDati License

  • log in to BellaDati application

Application BellaDati is operating in the cluster environment.


To log into BellaDati application

for machine   "belladati-main"  public IP and port 28080, for  "node1" public IP and port 28080

(warning)    BellaDati license screens indicate :  license is not valid 


(lightbulb)Reason:  BellaDati application cluster settings require a dedicated licence key.

   Instead of starting position with BellaDati running on machine belladati-main, there are two machines where BellaDati is deployed now. 



  • new license

     

Contact BellaDati support for obtaining a new license.

To modify license, copy all cluster Server IDs of the machines (belladati-main, node1) and send both to BellaDati support .

The new license must be implemented on the every BellaDati installation in cluster machine environment.




Updating BellaDati running in cluster environment


Who: root, Location: belladati-main server


  •  download BellaDati-xxxxx.war.zip
  •  unzip the war file and change to directory where belladati.war is located
  •  belladati.war is now available

 (lightbulb)user root will now operate with the belladati.war. This is new version of BellaDati application and is going to be redeployed as "belladati" (name of application) to Payara application server target "domain"


run   asadmin redeploy --name belladati --target domain belladati.war

run   asadmin stop-cluster belladati-cluster

run   asadmin restart-domain


run asadmin start-cluster belladati-cluster   

















Sv translation
languageja

Introduction


Info

BellaDatiは、クラスタ化された環境でHAやその他の希望の操作レベルを達成するための拡張サポートを備えたエンタープライズ規模のアプリケーションです。

BellaDatiは、選択したクラスタ環境に依存していないのでGlassFish、WebSphereまたはJBoss上でそれを実行することができますが、クラスタ内でBellaDatiを実行するために変更される必要があるapplication.properties(BellaDati WAR Configurationを参照してください)に含まれるいくつかのパラメータがあります。

 

Code Block
titleExample for 2 servers cluster
tapestry.clustered-sessions=true
application.servers=192.168.1.10:2335,192.168.1.11:2335

 

上記の例では、192.168.1.10と192.168.1.11上で実行して、クラスタ内の2のサーバのパラメータを定義します。

 

クラスタの概要ページ

管理者は、クラスタ内のサーバーに関する有用な情報が表示されているクラスタの概要ページにアクセスできます。

Image Removed 

Image Removed

  • BellaDatiバージョン2.10以上のベースラインは、java11とPayaraアプリケーションサーバーで開発(アーキテクチャ)されています。

( Payara 5.2021.4 https://docs.payara.fish/community/docs/5.2021.4/documentation/payara-server/README.html,

java 11.0.2 https://openjdk.org/projects/jdk/11/ )


  • BellaDati 2.10+は、縦方向にも横方向にも拡張可能です。

垂直スケーリングは、CPU、メモリ、ストレージ、ネットワーク速度など、マシンのパワーを増強することです。

水平スケーリングは、リソースのプールにノードを追加することで実現されます。

  • 上記のBellaDati 2.10+は、アプリケーションサーバーPayara 5+上で動作(デプロイ)しています。

アプリケーションサーバーは、水平スケーリングによりBellaDatiの複合パワーを増大させることが可能です。BellaDatiアプリケーションは、Payaraアプリケーションサーバーのマルチノード環境の多数のノードにデプロイされます。

詳しくはPayaraのホームページをご覧ください。


Info
titleHorizontal Scalability

複数台のコンピュータを対象としたマルチノード(クラスタ)環境 - 水平方向のスケーラビリティを確保し、HAなど希望する運用レベルを実現することが可能です。

PayaraサーバーはGlassFishサーバー・オープンソース版から派生したものです。複数のコンピュータに複数ノード(クラスタ)ソリューションをインストールする方法は、GlassFishアプリケーションサーバーのクラスタリングに使用されている方法と似ています(同じではありません)。

( BellaDati GlassFishの詳細については、以下のとおりです: https://support.belladati.com/techdoc/Running+BellaDati+in+Cluster+-+Linux


Note
titleWhat is node

Payara Serverにおけるノードとは、Payara Serverがインストールされているホストの論理的な表現であり、ドメイン管理サーバー(DAS)がリモートインスタンスを検索および識別するために使用できます。Payara Serverのインスタンスを作成するホストには、ノードを設定する必要があります。


Note
titlemultiple-node environment

Payaraアプリケーションサーバーをベースにした水平スケーラビリティのため、BellaDatiのインストールは2ノードに制限されません。BellaDatiアプリケーションを4ノード以上に展開するテストも行っています。


本マニュアルでは、2台のコンピュータで複数ノード(クラスタ)を構築し、運用可能な状態にする方法を順を追って説明します; 

ノード間の通信にはプライベートネットワークを使用します。


  



インストール方法の概要


  • 特定のコンピュータ・プライベート・ネットワーク内のすべての「複数ノード(クラスタ)」コンピュータで、選択したユーザがssh接続できるようにする。

  • java11環境のインストール

  • 複数ノード(クラスタ)の作成  環境(ノード、インスタンス)

  • BellaDatiアプリケーションの複数ノード(クラスタ)への展開

  • BellaDatiの実行に必要なPayaraアプリケーションサーバーのパラメータ設定

  • ライセンス・ベラダティ


サーバー環境

SSH接続


ユーザー「cluster」がサーバー、グループ管理者に追加され、
プライベート ネットワークではパスワード認証が許可され、ファイアウォールでは ssh が許可されます


/etc/hosts table(s):

server 172.31.40.20

127.0.0.1 localhost

127.0.0.1 ip-172-31-40-20

172.31.40.20 ip-172-31-40-20.eu-central-1.compute.internal belladati-main

172.31.38.252 ip-172-31-38-252.eu-central-1.compute.internal node1


server 172.31.38.252

127.0.0.1 localhost

127.0.0.1 ip-172-31-38-252

172.31.40.20 ip-172-31-40-20.eu-central-1.compute.internal belladati-main

172.31.38.252 ip-172-31-38-252.eu-central-1.compute.internal node1


例:2台のサーバが複数ノード(クラスタ)環境に含まれ、静的(プライベート)FQDN IPは ip-172-31-40-20.eu-central-1.compute.internal と p-172-31-38-252.eu-central-1.compute.internal です。

FQDNとは、Fully Qualified Domain Name(完全修飾ドメイン名)の略です。          

    例:hostnamectl set-hostname ip-172-31-40-20.eu-central-1.compute.internal ( プライベートネットワーク内のサーバ belladati-main の FQDM )

サーバー間の ssh 通信と java コマンドの可用性をテストする アカウント cluster (ログイン名) ssh -l cluster node1, ( belladati-main or IPs or FQDNs)


java11環境のインストール


前述の通り、BellaDatiバージョン2.10には、java11とPayaraアプリケーションサーバーが搭載されています。

その事実は、以下のインストール手順に利用されています。

  •     PostgreSQLデータベースエンジンがインストールされていること(この例ではbelladatiメインサーバーにインストールしていますが、別のサーバーを使用することをお勧めします)。
  •     IP、ポート、データベース名、データベースユーザ/パスワードが既知であり、両方のサーバからデータベースが見えること。 
  •     BellaDatiのバージョンをbelladati-mainのエイリアス名でコンピュータにインストーラでインストールします(例:BellaDati_linux_x64_2_10_0_beweinPRjava11_80-SNAPSHOT.shを使用)。
  •     jre環境はインストール後、ベラダティメインサーバの/usr/local/BellaDatiディレクトリで利用可能です。
  •     belladati-mainからnode1サーバ(複数ノード(クラスタ)環境の2番目のサーバ)にjreをコピーする : scp -r jre cluster@node1:/home/cluster/.
  •     etc/environmentを変更し、jre/binへのパスを追加。

belladati-mainサーバーでjavaのテスト用コマンドを実行(各サーバーで) ssh -l ログイン名 サーバー識別名 'java command'

(tick)      ssh -l cluster node1 'java -version' ;  ssh l cluster node1 'jar -help ' etc.

 (lightbulb)SSHアカウントクラスタは、Payaraアプリケーションサーバーの環境をbelladatiメインサーバーから各複数ノードサーバーに展開する予定です。



Info
titleEnvironment setting final notice
  • 現在、リナックスOSが動作するコンピュータは少なくとも2台あります。
  • BellaDatiアプリケーションは、Payaraアプリケーションサーバー上の "belladati-main "コンピュータに非クラスターインストールで動作しています。
  • 定義されたsshユーザ「cluster」がプライベートネットワーク経由で通信し、各サーバでbelladati-mainからjavaコマンドを起動できます。
  • postgreSQLのdbsエンジンのデータベースが両方のサーバーから見えます。


複数ノード(クラスタ)環境でのインストール



(lightbulb)ここで説明する処理は、belladati-mainマシンのrootで実行されます。

   Payara asadmin ユーティリティのサブコマンドがお勧めです(Payara コンソールの GUI も利用可能です)。


  • アカウント(ユーザー)クラスタのパスワード設定

クラスタユーザーの役割は、Payara環境をbelladatメインマシンから全クラスタマシンに展開することです。このアカウントを次のコマンドで利用するために、パスワードのエイリアスを作成します。


実行コマンド : asadmin create-password-alias clusterpassword    

クラスタアカウントパスワードを挿入します

実行 vim /home/cluster/clusterpassword     

add line:    AS_ADMIN_SSHPASSWORD=${ALIAS=clusterpassword}


(info)  asadmin list-password-aliases は名前を表示し、asadmin delete-password-alias XXXXX はパスワードエイリアスを削除します。


  • ノード作成

             マシンbelladati-mainのディレクトリ/usr/local/BellaDati/payara5が複数ノード(クラスタ)マシンnode1のユーザークラスタのディレクトリ/home/cluster/payara5へコピーされます。

             ユーザclusterは、各マシンにssh接続することができます。そのパスワード情報は、/home/password/clusterpassword ファイルにあります。


Warning
titlenadmin file

node1コンピュータに/home/cluster/payara5ディレクトリが存在します。

次のステップの前に、belladati-mainサーバのディレクトリ ...payara5/glassfish/lib ; ( chmod +x nadmin ) でnadminファイルのパーミッションを確認/変更します。


                

                asadmin create-node-ssh  --nodehost node1 --installdir /home/cluster/payara5 --install=true --sshuser cluster --passwordfile  /home/cluster/clusterpassword  node1 


 Node verification - testing connection to node (s)


      実行コマンド  asadmin ping-node-ssh node1

                            asadmin list-nodes-ssh    (info) 作成されたsshノードが表示されます

                            asadmin list-nodes          (info)  このコマンドは、belladati-mainにあるlocalhost上のオリジナルノードlocalhost-domain1を含むすべてのノードをリストアップします。

例:

root@ip-172-31-40-20:/usr/local/BellaDati/payara5/glassfish/lib# asadmin list-nodes
localhost-domain1 CONFIG localhost
node1 SSH node1
Command list-nodes executed successfully.

Payara java変数へのPathを変更

/home/cluster/payara5/glassfish/config/asenf.conf の変数 AS_JAVA を変更 AS_JAVA=/home/cluster/jre/.

(lightbulb) 理由:JAVA環境のPATH。 JAVA環境(sshノード)のPATHが、asenv.confファイルでbelladati-mainからコピーしたPATHと一致しません。



  • 複数ノード(クラスター)形成

         現在、マルチノード(クラスタ)自体の基本環境/設定が確立しています。マルチノード(クラスタ)の名称は「belladati-cluster」とする予定です。 


     実行コマンド  asadmin create-cluster belladati-cluster

     (lightbulb)  Payaraのコンフィギュレーションに新しいコンフィギュレーションが追加されました。名前はbelladati-cluster-configです。構成はdefault-configと同じです。

     (info)  helpful additional commands:   asadmin list-clusters     ;     asadmin delete-cluster belladati-cluster 


  • belladati-clusterインスタンスの作成

       

       belladati-main上のクラスタインスタンス、名前は "instance-local"


       実行コマンド     asadmin create-local-instance  --cluster belladati-cluster instance-local

(tick)  出力例

Rendezvoused with DAS on localhost:4848.

Port Assignments for server instance instance-local:

OSGI_SHELL_TELNET_PORT=26666

JAVA_DEBUGGER_PORT=29009

HTTP_LISTENER_PORT=28080

IIOP_SSL_LISTENER_PORT=23820

ASADMIN_LISTENER_PORT=24848

IIOP_SSL_MUTUALAUTH_PORT=23920

JMX_SYSTEM_CONNECTOR_PORT=28686

HTTP_SSL_LISTENER_PORT=28181

IIOP_LISTENER_PORT=23700

Command create-local-instance executed successfully


(info)  see /usr/local/BellaDati/payara5/glassfish    additional files hierarchy appears  nodes/localhost-domain1/...


Cluster instance on ssh node

       


ノード1に対してコマンドを実行し、作成されたインスタンスの名前はinstance-node1となります。

asadmin create-instance --node node1   --cluster belladati-cluster instance-node1

(tick) 出力例

Command _create-instance-filesystem executed successfully.

Port Assignments for server instance instance-node1:

OSGI_SHELL_TELNET_PORT=26666

JAVA_DEBUGGER_PORT=29009

HTTP_LISTENER_PORT=28080

IIOP_SSL_LISTENER_PORT=23820

ASADMIN_LISTENER_PORT=24848

IIOP_SSL_MUTUALAUTH_PORT=23920

JMX_SYSTEM_CONNECTOR_PORT=28686

HTTP_SSL_LISTENER_PORT=28181

IIOP_LISTENER_PORT=23700

The instance, instance-node1, was created on host node1

Command create-instance executed successfully.



(info) 表示用:asadmin list-instances、削除用:asadmin delete-instance 削除するインスタンスの名前。


          

複数ノード(クラスタ)構成


Info
titlebelladati-cluster configuration

belladati-clusterの設定ファイル名はbelladati-cluster-configです。これまで、このファイルの内容には、クラスタ内のBellaDatiのリソースに関する情報はなく、クラスタで動作させるアプリケーションに関する情報もありません。現在定義されているパラメータ(default-configから引き継いだもの)、例えばスレッドプール、jvmのヒープスペースなどは、クラスタ環境でアプリケーションBellaDatiを実行するためには有効ではありません。

次のステップでは、設定ファイル belladati-cluster-config を変更する方法を説明します。

  


  • アプリケーションリファレンスの設定


       実行コマンド:     asadmin create-application-ref   --target belladati-cluster  belladati

                                   asadmin delete-application-ref  --target server  belladati

(lightbulb) BellaDatiはPayaraアプリケーションサーバーにインストールされ、そのターゲットはサーバーです。


       (info)  アプリケーションリファレンスを見るには    asadmin list-application-refs  belladati-cluster   ;

           クラスタからbelladatiのリファレンスを削除するには                  asadmin delete-application-ref  --target belladati-cluster belladati    

           デフォルトサーバからbelladatiのリファレンスを削除するには        asadmin delete-application-ref  --target server  belladati

    

  • スレッドプールの設定

        ベラダティのインストールに関する推奨事項を考慮し、max-thread-pool-sizeを変更する予定です。


        実行コマンド     asadmin list-threadpools belladati-cluster  to see list of threadpools;

        modifications will be done threadpools: http-thread-pool   and   thread-pool-1

       http-thread-pool:

       実行コマンド  asadmin get belladati-cluster-config.thread-pools.thread-pool.http-thread-pool.*        (info) 設定前のパラメータ値

            そして      asadmin set belladati-cluster-config.thread-pools.thread-pool.http-thread-pool.max-thread-pool-size=512 を実行します


      thread-pool-1:

       実行コマンド  asadmin get belladati-cluster-config.thread-pools.thread-pool.thread-pool-1*        (info) 設定前のパラメータ値

            そして      asadmin set belladati-cluster-config.thread-pools.thread-pool.thread-pool-1.max-thread-pool-size=512 を実行します



  • JVMオプションの設定


Info
titleJVM

BellaDati 2.10+では、アプリケーションサーバ(https://support.belladati.com/techdoc/Running+BellaDati+in+Cluster+-+Linux参照)からjvmオプションにパラメータが変更されました。パラメータはbelladati-cluster-configで定義する必要があります。


 belladati-clusterの修正前に定義されたすべてのJVMオプションを見るには:

                           asadmin list-jvm-options    --target  belladati-cluster


        マシンの仕様によっては、jvm を動作させるためにヒープスペースを変更することが推奨されます。Xmxnnnnnm は jvm の RAM サイズを指定します。

 ヒープスペースの変更

      コマンドを実行して削除する -Xmx 値はクラスタで有効ではありません。

      asadmin delete-jvm-options  --target belladati-cluster -Xmx512m               (info)  Xmx512m "はデフォルト値で、jvmを実行するのに512MBしかなく、BellaDatiの動作には十分ではありません。

      コマンドを実行して、-Xmxに新しい有効な値を設定します。

      asadmin create-jvm-options  --target belladati-cluster  -Xmx4096m           (tick)  Xmx2048m" すなわち 4096 MB の jvm がこのクラスタでは有効です。(この値はマシンのハードウェア仕様に基づくもので、通常はそれ以上です。)


jdbcリソースのパラメータ:


asadmin create-jvm-options --target belladati-cluster -Djdbc.driverClassName=org.postgresql.Driver

asadmin create-jvm-options --target belladati-cluster -Dfile.encoding=UTF-8

asadmin create-jvm-options --target belladati-cluster -Dlogs.location=../../../../../logs

asadmin create-jvm-options --target belladati-cluster "-Djdbc.url=jdbc\:postgresql\://IPaddress where  dbs engine runs\:port/dbs_name"

asadmin create-jvm-options --target belladati-cluster -Djdbc.username=dbs_user_name

asadmin create-jvm-options --target belladati-cluster -Djdbc.password=password

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.maxActive=200

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.minIdle=8

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.maxIdle=200

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.minIdleEvictionTime=300000

asadmin create-jvm-options --target belladati-cluster -Djdbc.pool.maxWaitTime=60000


クラスタ環境を指定するパラメータ:


asadmin create-jvm-options --target belladati-cluster -Dtapestry.clustered.session=true

asadmin create-jvm-options --target belladati-cluster -Dapplication.actor.server.port=2335

asadmin create-jvm-options --target belladati-cluster -Dapplication.servers=belladati-main\:2335,node1\:2335



Info
titleCluster setup final notice

クラスタ用の新しい修正された構成が利用可能になりました。このプロセスで多くの変更が行われました。Payaraアプリケーションサーバーの再起動が必要です。



実行コマンド:                                                      asadmin  restart-domain




起動クラスタ



(info)  クラスタを起動する前に、クラスタ環境を確認するのに役立つコマンド:

     asadmin list-domains ;   asadmin list-nodes ;   asadmin list-instances ;  asadmin list-application-refs belladati-cluster

     (lightbulb)  asadmin list-instances belladati-cluster コマンドは、クラスタ belladati-cluster で利用可能なすべてのインスタンス、すなわち instance-local、instance-node1 を一覧表示します。


(warning) クラスタの起動には数分かかることがあります


 実行コマンド          asadmin start-cluster  --verbose belladati-cluster      (info) すべてのクラスタノード(インスタンス)を起動するための1つのコマンド


または


 実行コマンド          asadmin start-instance   NAME   (instance-local, instance-node1 etc)  

(info) コマンドを実行すると、1つのインスタンスでクラスタ環境が開始されます。

このコマンドは、BellaDatiアプリケーションの監視クラスタ画面と非常によく似ています。


(lightbulb) 可視性:           asadmin list-clusters       ;         asadmin list-instances beladati-cluster


BellaDatiライセンスの変更

  • BellaDatiアプリケーションにログイン

アプリケーションBellaDatiは、クラスタ環境で動作しています。


BellaDatiアプリケーションにログインする方法

マシン「belladati-main」のパブリックIPとポート28080、「node1」のパブリックIPとポート28080用

(warning)     BellaDatiのライセンス画面に「ライセンスが有効ではありません」と表示さ れます。 


(lightbulb)原因:BellaDatiのアプリケーションクラスタの設定には、専用のライセンスキーが必要です。

  BellaDatiがマシンbelladati-mainで動作している状態から、BellaDatiがデプロイされているマシンが2台になっています。  


  • ニューライセンス

     

新しいライセンスの取得については、BellaDatiのサポートにお問い合わせください。

ライセンスを変更するには、マシンのクラスターサーバーID(belladati-main、node1)をすべてコピーし、両方をBellaDatiサポートに送信してください。

新しいライセンスは、クラスターマシン環境にインストールされた全てのBellaDatiに導入する必要があります。




クラスタ環境で動作しているBellaDatiのアップデート


誰:root、場所:belladati-main server


  •  BellaDati-xxxxx.war.zipをダウンロード
  •  warファイルを解凍し、belladati.warがあるディレクトリに移動します。
  •  belladati.warが公開されました

 (lightbulb)ユーザrootはbelladati.warで操作することになります。これはBellaDatiアプリケーションの新しいバージョンで、"belladati"(アプリケーション名)としてPayaraアプリケーションサーバーのターゲット "ドメイン" に再デプロイされます。


run   asadmin redeploy --name belladati --target domain belladati.war

run   asadmin stop-cluster belladati-cluster

run   asadmin restart-domain


run asadmin start-cluster belladati-cluster