.mfdeployファイルには 2 つの目的があります。
IDE、imtkmake ユーティリティ、web-deploy.html Web フォームなど、ディプロイ クライアントを使用してディプロイする際は、.mfdeploy の構成設定の一部をクライアントから送信される情報でオーバーライドまたは補完することができます。
従来の .mfdeploy ファイルの内容は、環境変数の設定に似た一連の name=value のペアです。実際、1.8 より前のバージョンの mfdepinst では、それらの設定がそのまま mfdepinst プロセス環境に追加され、必要に応じて照会されます。
たとえば、MFES_SERVER=ESDEMO 設定は、インストールする新しいサービスを所有する Enterprise Server インスタンスの情報がディプロイ クライアントから提供されていない場合に、その情報を mfdepinst に提供します。
mfdepinst で認識される設定は次のとおりです。
Enterprise Server 5.0 以降では、.mfdeploy ファイルで追加機能を含む高度な構成の構文もサポートされます。従来のエントリを先に記述すれば、従来のスタイルと高度なスタイルを同じファイルで使用できます。
高度な構文では「ini」の形式を使用し、name=value の各行を名前付きのセクションでグループ化します。セクション名は角かっこで囲みます。空白行は無視されます。先頭にシャープ記号 (#) を付けてコメントを記述できます。次に例を示します。
# Location of MFDS and credentials for binding # These will usually be overridden by the deployment request, # but apply when mfdepinst is run manually.[MFDS] MFDS=localhost User=admin Password=Secret password for admin
新しい構文で使用可能なセクションとその設定は次のとおりです。
[MFDS] MFDS=hostname[:port] User=username Password=password [ES] Server=ES-name Listener=listener-name Default server=ES-name Default listener=listener-name [Operation] Update_mode=add [Environment] name=value [Passwords] username=password
[ES] セクションの Default server および Default listener の値は、対象のサーバーおよびリスナーがディプロイ クライアントで指定されていない場合にのみ使用されます。Server および Listener の値が設定されている場合は、ディプロイ クライアントから要求されたサーバーまたはリスナーをオーバーライドします。
[Operation] セクションの Update_mode 設定は、従来の構文を使用して UPDATE_MODE を設定した場合と同じ効果になります。名前のアンダースコアに注意してください。値 add は、歴史的な理由から大文字と小文字が区別されます。
[Environment] セクションは、mfdepinst プロセスの任意の環境変数の設定に使用できます。通常、このセクションを使用する必要はありません。
[Passwords] セクションは、ディプロイ要求を行うユーザーの資格情報を使用して mfdepinst を MFDS にバインドする場合に使用できます。この動作を有効にするには次の条件があります。
これらの条件を満たしていない場合、mfdepinst は、MFDS にバインドする際に使用するユーザー名とパスワードを要求から探します。見つからない場合は、[MFDS] セクションで指定されたデフォルトのユーザー名とパスワードを使用します。それらが設定されていない場合は、ハードコーディングされたデフォルトを使用します。
MFDS=localhost MFES_SERVER=ESDEMO MFES_LISTENER=Web Services and J2EE
新しい構文を使用した .mfdeploy ファイルの例を次に示します。
# New configuration syntax with mfdepinst 1.8.The old syntax is still # supported for backward compatibility, but the new format provides more # options.# The optional [Environment] section sets values in the mfdepinst environment.# Any name=value items before the first section header are also put in the # environment.# [Environment] # Name=value [MFDS] MFDS=localhost # User=username for MFDS, if not supplied with request # Password=password for MFDS, if not supplied with request [ES] # Default server is used if no server is specified in the request, and # mfdepinst is not running under MFCS.If mfdepinst is running under MFCS, # it uses the MFCS server name.# # The MFCS server name can be overridden with: # Server=name # or with the old syntax (MFES_SERVER set in the environment, or in this ES # section).Default server=ESDEMO Default listener=Web Services and J2EE # The [Passwords] section can be used to set the MFDS password based on the # remote user ID supplied using HTTP Basic Authentication.# [Passwords] # Username=password