Page History
Sv translation | ||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||
Introduction
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
server EnvironmentSSH connectivityUser "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 environmentAs mentioned above, BellaDati version 2.10 comes with java11 and Payara application server. The fact is utilized in the following installation instructions:
Run java testing commands on belladati-main server (for each of the servers) ssh -l login name server identification 'java command' ssh -l cluster node1 'java -version' ; ssh l cluster node1 'jar -help ' etc. SSH account cluster is going to spread Payara application server environment from belladati-main server to every multiple-node server.
Multiple-node (Cluster) environment InstallationThe 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).
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} asadmin list-password-aliases shows the name, asadmin delete-password-alias XXXXX delete the password alias
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.
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 ssh nodes created are listed asadmin list-nodes 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 Modifying Path to Payara java variable: change variable AS_JAVA in /home/cluster/payara5/glassfish/config/asenf.conf AS_JAVA=/home/cluster/jre/ reason: PATH for JAVA environment; on ssh nodes is not equal to PATH copying from belladati-main in asenv.conf file
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 New configuration is added to Payara configuration. Its name is belladati-cluster-config. Its configuration is the same as default-config. helpful additional commands: asadmin list-clusters ; asadmin delete-cluster belladati-cluster
Cluster instance on belladati-main; its name is "instance-local" run command asadmin create-local-instance --cluster belladati-cluster instance-local 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 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 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. helpful commands; for visibility: asadmin list-instances, for deleting: asadmin delete-instance NAME of the instance to delete
Setting up multiple-node (cluster) Configuration
run commands: asadmin create-application-ref --target belladati-cluster belladati asadmin delete-application-ref --target server belladati BellaDati was installed on Payaraapplication serverand its target was server; for cluster arrangement target change to "belladati-cluster" is needed 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
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.* 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* parameters values before setting up and run asadmin set belladati-cluster-config.thread-pools.thread-pool.thread-pool-1.max-thread-pool-size=512
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 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 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
Run command: asadmin restart-domain Starting Cluster 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 asadmin list-instances belladati-cluster command lists all instances available for cluster belladati-cluster, namely: instance-local, instance-node1 The process of the cluster starting can take minutes. run command asadmin start-cluster --verbose belladati-cluster one command to start all cluster nodes (instances) or alternatively run commands asadmin start-instance NAME (instance-local, instance-node1 etc) 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. Visibility: asadmin list-clusters ; asadmin list-instances beladati-cluster Modifying BellaDati License
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 BellaDati license screens indicate : license is not valid 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.
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 environmentWho: root, Location: belladati-main server
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 | ||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||
Introduction
BellaDatiは、選択したクラスタ環境に依存していないのでGlassFish、WebSphereまたはJBoss上でそれを実行することができますが、クラスタ内でBellaDatiを実行するために変更される必要があるapplication.properties(BellaDati WAR Configurationを参照してください)に含まれるいくつかのパラメータがあります。
上記の例では、192.168.1.10と192.168.1.11上で実行して、クラスタ内の2のサーバのパラメータを定義します。 クラスタの概要ページ管理者は、クラスタ内のサーバーに関する有用な情報が表示されているクラスタの概要ページにアクセスできます。
本マニュアルでは、2台のコンピュータで複数ノード(クラスタ)を構築し、運用可能な状態にする方法を順を追って説明します; ノード間の通信にはプライベートネットワークを使用します。
インストール方法の概要
サーバー環境SSH接続ユーザー「cluster」がサーバー、グループ管理者に追加され、 /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アプリケーションサーバーが搭載されています。 その事実は、以下のインストール手順に利用されています。
belladati-mainサーバーでjavaのテスト用コマンドを実行(各サーバーで) ssh -l ログイン名 サーバー識別名 'java command' ssh -l cluster node1 'java -version' ; ssh l cluster node1 'jar -help ' etc. SSHアカウントクラスタは、Payaraアプリケーションサーバーの環境をbelladatiメインサーバーから各複数ノードサーバーに展開する予定です。
複数ノード(クラスタ)環境でのインストールここで説明する処理は、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} asadmin list-password-aliases は名前を表示し、asadmin delete-password-alias XXXXX はパスワードエイリアスを削除します。
マシンbelladati-mainのディレクトリ/usr/local/BellaDati/payara5が複数ノード(クラスタ)マシンnode1のユーザークラスタのディレクトリ/home/cluster/payara5へコピーされます。 ユーザclusterは、各マシンにssh接続することができます。そのパスワード情報は、/home/password/clusterpassword ファイルにあります。
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 作成されたsshノードが表示されます asadmin list-nodes このコマンドは、belladati-mainにあるlocalhost上のオリジナルノードlocalhost-domain1を含むすべてのノードをリストアップします。 例: root@ip-172-31-40-20:/usr/local/BellaDati/payara5/glassfish/lib# asadmin list-nodes Payara java変数へのPathを変更 /home/cluster/payara5/glassfish/config/asenf.conf の変数 AS_JAVA を変更 AS_JAVA=/home/cluster/jre/. 理由:JAVA環境のPATH。 JAVA環境(sshノード)のPATHが、asenv.confファイルでbelladati-mainからコピーしたPATHと一致しません。
現在、マルチノード(クラスタ)自体の基本環境/設定が確立しています。マルチノード(クラスタ)の名称は「belladati-cluster」とする予定です。 実行コマンド asadmin create-cluster belladati-cluster Payaraのコンフィギュレーションに新しいコンフィギュレーションが追加されました。名前はbelladati-cluster-configです。構成はdefault-configと同じです。 helpful additional commands: asadmin list-clusters ; asadmin delete-cluster belladati-cluster
belladati-main上のクラスタインスタンス、名前は "instance-local" 実行コマンド asadmin create-local-instance --cluster belladati-cluster instance-local 出力例 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 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 出力例 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. 表示用:asadmin list-instances、削除用:asadmin delete-instance 削除するインスタンスの名前。
複数ノード(クラスタ)構成
実行コマンド: asadmin create-application-ref --target belladati-cluster belladati asadmin delete-application-ref --target server belladati BellaDatiはPayaraアプリケーションサーバーにインストールされ、そのターゲットはサーバーです。 アプリケーションリファレンスを見るには 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.* 設定前のパラメータ値 そして 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* 設定前のパラメータ値 そして asadmin set belladati-cluster-config.thread-pools.thread-pool.thread-pool-1.max-thread-pool-size=512 を実行します
belladati-clusterの修正前に定義されたすべてのJVMオプションを見るには: asadmin list-jvm-options --target belladati-cluster マシンの仕様によっては、jvm を動作させるためにヒープスペースを変更することが推奨されます。Xmxnnnnnm は jvm の RAM サイズを指定します。 ヒープスペースの変更 コマンドを実行して削除する -Xmx 値はクラスタで有効ではありません。 asadmin delete-jvm-options --target belladati-cluster -Xmx512m Xmx512m "はデフォルト値で、jvmを実行するのに512MBしかなく、BellaDatiの動作には十分ではありません。 コマンドを実行して、-Xmxに新しい有効な値を設定します。 asadmin create-jvm-options --target belladati-cluster -Xmx4096m 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
実行コマンド: asadmin restart-domain 起動クラスタクラスタを起動する前に、クラスタ環境を確認するのに役立つコマンド: asadmin list-domains ; asadmin list-nodes ; asadmin list-instances ; asadmin list-application-refs belladati-cluster asadmin list-instances belladati-cluster コマンドは、クラスタ belladati-cluster で利用可能なすべてのインスタンス、すなわち instance-local、instance-node1 を一覧表示します。 クラスタの起動には数分かかることがあります 実行コマンド asadmin start-cluster --verbose belladati-cluster すべてのクラスタノード(インスタンス)を起動するための1つのコマンド または 実行コマンド asadmin start-instance NAME (instance-local, instance-node1 etc) コマンドを実行すると、1つのインスタンスでクラスタ環境が開始されます。 このコマンドは、BellaDatiアプリケーションの監視クラスタ画面と非常によく似ています。 可視性: asadmin list-clusters ; asadmin list-instances beladati-cluster BellaDatiライセンスの変更
アプリケーションBellaDatiは、クラスタ環境で動作しています。 BellaDatiアプリケーションにログインする方法 マシン「belladati-main」のパブリックIPとポート28080、「node1」のパブリックIPとポート28080用 BellaDatiのライセンス画面に「ライセンスが有効ではありません」と表示さ れます。 原因:BellaDatiのアプリケーションクラスタの設定には、専用のライセンスキーが必要です。 BellaDatiがマシンbelladati-mainで動作している状態から、BellaDatiがデプロイされているマシンが2台になっています。
新しいライセンスの取得については、BellaDatiのサポートにお問い合わせください。 ライセンスを変更するには、マシンのクラスターサーバーID(belladati-main、node1)をすべてコピーし、両方をBellaDatiサポートに送信してください。 新しいライセンスは、クラスターマシン環境にインストールされた全てのBellaDatiに導入する必要があります。 クラスタ環境で動作しているBellaDatiのアップデート誰:root、場所:belladati-main server
ユーザ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 |