これらのスクリプトを使用して、アプリケーション・メタデータをファイルから手動でインポートします。
これらのスクリプトでは、次のアクティビティが実行されます:
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 logout
Linux/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} logout
input.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-16 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
を実行します。