これらのスクリプトを使用して、アプリケーション・メタデータをファイルから手動でインポートします。
これらのスクリプトでは、次のアクティビティが実行されます:
Windowsのサンプル・スクリプト
次のスクリプトをコピーして、importMetadata.ps1を作成します。それをローカル・ディレクトリに保存します。
$inputproperties = ConvertFrom-StringData(Get-Content ./input.properties -raw)
$username="$($inputproperties.username)"
$passwordfile="$($inputproperties.passwordfile)"
$serviceURL="$($inputproperties.serviceURL)"
$file1="$($inputproperties.file1)"
$jobName="$($inputproperties.jobName)"
epmautomate login ${username} ${passwordfile} ${serviceURL}
epmautomate uploadfile ${file1}
epmautomate importmetadata ${jobName} ${file1}
epmautomate refreshcube
epmautomate logoutLinux/UNIXのサンプル・スクリプト
次のスクリプトをコピーして、importMetadata.shを作成します。それをローカル・ディレクトリに保存します。
#!/bin/bash
. ./input.properties
export JAVA_HOME=${javahome}
${epmautomatescript} login "${username}" "${passwordfile}" "${serviceURL}"
${epmautomatescript} uploadfile "${file1}"
${epmautomatescript} importmetadata "${jobName}" "${file1}"
${epmautomatescript} refreshcube
${epmautomatescript} logoutinput.propertiesファイルの作成
次のいずれかをコピーし、環境の情報で更新することにより、input.propertiesファイルを作成します。importMetadata.ps1またはimportMetadata.shが格納されているディレクトリにファイルを保存します。
username=exampleAdmin passwordfile=examplePassword.epw serviceURL=exampleURL File1=FILE_NAME.zip jobName=JOB_NAME
Linux/UNIX
javahome=JAVA_HOME epmautomatescript=EPM_AUTOMATE_LOCATION username=exampleAdmin passwordfile=examplePassword.epw serviceURL=exampleURL File1=FILE_NAME.zip jobName=JOB_NAME
表3-17 input.propertiesのパラメータ
| パラメータ | 説明 |
|---|---|
javahome |
JAVA_HOMEの場所。Linux/UNIXの場合のみ。 |
epmautomatescript |
EPM自動化の実行可能ファイル(epmautomate.sh)の絶対パス。Linux/UNIXの場合のみ。 |
username |
アイデンティティ・ドメイン管理者の役割も保持するサービス管理者のユーザー名。 |
password |
サービス管理者のパスワードまたは暗号化されたパスワード・ファイルの名前と場所。 |
serviceURL |
スナップショットを生成する環境のURL。 |
File1 |
インポートするメタデータが格納されたZIPファイルの名前。 |
JobName |
メタデータのインポートに使用するジョブ。 |
スクリプトの実行
importMetadata.ps1またはimportMetadata.shを作成します。input.propertiesファイルを作成し、importMetadataスクリプトが配置されているディレクトリに保存します。このファイルのコンテンツは、オペレーティング・システムによって異なります。input.propertiesファイルの作成を参照してください。
このディレクトリの書込み権限があることを確認してください。Windowsの場合、スクリプトを実行できるよう、「管理者として実行」オプションを使用してPowerShellを開始する必要があります。
importMetadata.ps1を実行します。./importMetadata.shを実行します。