配置実行ユーティリティー (runDeployment.sh/.bat)
runDeployment コマンド・ライン・ツールを使用すると、コマンド・ラインから、deployment.properties ファイルで指定された設定を使用して特定のサーバー・グループに対話式チャネルを配置できます。deployment.properties ファイルは使用可能なすべてのパラメーターの概要を示しており、runDeployment ツール自体と同じ場所にあります。 対話式チャネルの配置をコマンド・ラインから実行できる点は、OffersBySQL 機能を使用する場合に特に有用です。例えば、Campaign バッチ・フローチャートを構成して、定期的に実行できます。フローチャートの実行が完了すると、このコマンド・ライン・ツールを使用して、OffersBySQL テーブル内のオファーの配置を初期化するためトリガーを呼び出すことができます。
説明
runDeployment コマンド・ライン・ツールは、Interact 設計時サーバーの次の場所に自動的にインストールされます。
Interact_home/interactDT/tools/deployment/runDeployment.sh (Windows Server の場合は runDeployment.bat)
コマンドに渡される唯一の引数は deployment.properties というファイルの場所であり、このファイルに、対話式チャネル/ランタイム・サーバー・グループの組み合わせの配置に必要な使用可能なすべてのパラメーターが記述されます。サンプル・ファイルが参照用に提供されています。
*
runDeployment ユーティリティーを使用するには、まず任意のテキスト・エディターを使用して、サーバー上の Java ランタイム環境の場所を指定するように編集する必要があります。例えば、このユーティリティーが使う Java ランタイムが含まれているディレクトリー Interact_home/jre あるいは Platform_home/jre などのパスを指定します。代わりに、IBM® 製品のこのリリースでの使用がサポートされている任意の Java ランタイム環境へのパスを指定することもできます。
runDeployment ユーティリティーのセキュア (SSL) 環境での使用
Interact サーバーでセキュリティーが有効になっているときに (したがって、SSL ポートで接続するときに) runDeployment ユーティリティーを使用するには、次のようにしてトラストストア Java プロパティーを追加する必要があります。
1.
使用する対話式チャネルの配置用の deployment.properties ファイルを編集する際に、deploymentURL プロパティーをセキュア SSL URL を使用するように変更します。このサンプルの場合、次のようになります。
deploymentURL=https://<HOST>.<DOMAIN>:<PORT>/Campaign/interact/InvokeDeploymentServlet
2.
任意のテキスト・エディターを使用して runDeployment.sh または runDeployment.bat スクリプトを編集して、${JAVA_HOME} で始まる行に次の引数を追加します。
-Djavax.net.ssl.trustStore=<TrustStorePath>
例えば、行にトラストストア引数を追加すると次のようになります。
${JAVA_HOME}/bin/java -Djavax.net.ssl.trustStore=<TrustStorePath> 
-cp ${CLASSPATH}com.unicacorp.Campaign.interact.deployment.tools.
InvokeDeploymentClient $1
<TrustStorePath> を実際の SSL トラストストアへのパスに置き換えます。
ユーティリティーの実行
Java ランタイム環境を指定するようユーティリティーを編集し、環境に合わせて deployment.properties ファイルのコピーをカスタマイズしたら、次のコマンドでユーティリティーを実行できます。
Interact_home/interactDT/tools/deployment/runDeployment.sh deployment.properties
Interact_homeInteract 設計時インストール済み環境の実際の値に置き換え、deployment.properties をこの配置用にカスタマイズしたプロパティー・ファイルの実際のパスと名前に置き換えます。
サンプル deployment.properties ファイル
サンプル deployment.properties ファイルには、使用する環境に合わせてカスタマイズする必要があるすべてのパラメーターのコメント付きリストが含まれています。また、サンプル・ファイルには各パラメーターの解説と、その特定の値をカスタマイズする必要がある理由を説明するコメントが含まれています。
###############################################################################
#
# The following properties feed into the InvokeDeploymentClient program.
# The program will look for a deploymentURL setting. The program will post a
# request against that url; all other settings are posted as parameters in
# that request. The program then checks the status of the deployment and
# returns back when the deployment is at a terminal state (or if the
# specified waitTime has been reached).
#
# the output of the program will be of this format:
# <STATE> : <Misc Detail>
#
# where state can be one of the following:
# ERROR
# RUNNING
# SUCCESS
#
# Misc Detail is data that would normally populate the status message area
# in the deployment gui of the IC summary page. NOTE: HTML tags may exist
# in the Misc Detail
#
###############################################################################

###############################################################################
# deploymentURL: url to the InvokeDeployment servlet that resides in Interact
# Design time. should be in the following format:
# http://dt_host:port/Campaign/interact/InvokeDeploymentServlet
###############################################################################
deploymentURL=http://localhost:7001/Campaign/interact/InvokeDeploymentServlet

###############################################################################
# dtLogin: this is the login that you would use to login to the Design Time if
# you had wanted to deploy the IC via the deployment gui inside the IC summary
# page.
###############################################################################
dtLogin=asm_admin

###############################################################################
# dtPW: this is the PW that goes along with the dtLogin
###############################################################################
dtPW=

###############################################################################
# icName: this is the name of the Interactive Channel that you want to deploy
###############################################################################
icName=ic1

###############################################################################
# partition: this is the name of the partition
###############################################################################
partition=partition1

###############################################################################
# request: this is the type of request that you want this tool to execute
# currently, there two behaviors. If the value is "deploy", then the deployment
# will be executed. All other values would cause the tool to simply return the
# status of the last deployment of the specified IC.
###############################################################################
request=deploy

###############################################################################
# serverGroup: this is the name of the server group that you would like to
# deploy the IC.
###############################################################################
serverGroup=defaultServerGroup

###############################################################################
# serverGroupType: this will indicate whether or not this deployment is going
# against production server group or a test server group. 1 denotes production
# 2 denotes test.
###############################################################################
serverGroupType=1

###############################################################################
# rtLogin: this is the account used to authenticate against the server group
# that you are deploying to.
###############################################################################
rtLogin=asm_admin

###############################################################################
# rtPW: this is the password associated to the rtLogin
###############################################################################
rtPW=

###############################################################################
# waitTime: Once the tool submits the deployment request, the tool will check
# the status of the deployment. If the deployment has not completed (or
# failed), then the tool will continue to poll the system for the status until
# a completed state has been reached, OR until the specified waitTime (in
# seconds) has been reached.
###############################################################################
waitTime=5

###############################################################################
# pollTime: If the status of a deployment is still in running state, then the
# tool will continue to check the status. It will sleep in between status
# checks a number of seconds based on the pollTime setting .
###############################################################################
pollTime=3

###############################################################################
# global: Setting to false will make the tool NOT deploy the global settings.
# Non-availability of the property will still deploy the global settings.
###############################################################################
global=true