Sun GlassFish Communications Server 1.5 高可用性 (HA) 管理ガイド

Procedureasadmin コマンドを使用して融合負荷分散を設定する

1 つの asadmin コマンド、create-converged-lb を使用すると、次のステップを実行できます。

  1. ロードバランサ設定を作成します。

    asadmin create-converged-lb-config コマンドを使用します。

  2. ロードバランサが管理するクラスタまたはスタンドアロンサーバーインスタンスへの参照を追加します。

    asadmin create-converged-lb-ref コマンドを使用します。


    注 –

    クラスタ配備の設定および定義の繰り返し処理を実行するときは、--autocommit を false に設定することをお勧めします。デフォルトで、このオプションは false に設定されています。これは主に中間融合ロードバランサファイルの生成を防止することが目的です。この設定がないと、domain.xml の変更のたびに中間ファイルが生成され、融合ロードバランサ自体の設定の表示に影響を及ぼします。クラスタ配備定義が展開の安定段階に達した時点で、--autocommit を true に設定します。



例 2–1 融合ロードバランサの作成

次の一連の asadmin コマンドでは、クラスタ、ノードエージェント、および自己負荷分散融合ロードバランサを設定します。


asadmin> create-cluster cluster1
    Command create-cluster executed successfully.
asadmin>create-node-agent --user admin --passwordfile pass.txt 
--host host1 nodeagent1
    Command create-node-agent executed successfully.
asadmin>create-node-agent --user admin --passwordfile pass.txt 
--host host1 nodeagent2
    Command create-node-agent executed successfully.
asadmin>create-instance --user admin --passwordfile pass.txt --nodeagent nodeagent1 
--cluster cluster1 cluster1_instance1
   Command create-instance executed successfully.
asadmin> create-instance --user admin --passwordfile pass.txt 
--nodeagent nodeagent2 --cluster cluster1 cluster1_instance2
   Command create-instance executed successfully.
asadmin> create-converged-lb --user admin --passwordfile pass.txt 
--configfile clb.xml --autocommit=true --lbenableallinstances=true 
--target cluster1 clb-1
   Command create-converged-lb executed successfully.
asadmin> start-node-agent nodeagent1
   Command start-node-agent started successfully.
asadmin> start-node-agent nodeagent2
   Command start-node-agent started successfully.
asadmin> start-cluster cluster1
 cluster1_instance1 is running, does not require restart
 cluster1_instance2 is running, does not require restart
 Command start-cluster executed successfully.

ロードバランサを作成したときにクラスタがすでに起動している場合、ロードバランサを起動するには、クラスタを再起動する必要があります。


参照

これらの asadmin コマンドの詳細については、『Sun GlassFish Communications Server 1.5 Reference Manual 』 を参照してください。