WebLogic Serverターゲットへのパッチ適用

次の手順では、パッチ計画を作成してその値を更新し、送信して、選択したターゲットにパッチをデプロイする方法を説明します。このワークフローは、WLSターゲットへのパッチ適用でエンドツーエンドのステップを取得します。パッチ適用のプロセスは、選択したターゲットにかかわらず同じです。

WebLogicサーバー・ターゲットにパッチを適用するには、次のステップを実行します。

  1. 次のコマンドを実行して、Oracle WebLogic Release 10.3.5のリリースIDを検索します。
    emcli list_aru_releases -name="10.3.5"
    Output:
    Release ID     Release Name    Long Release Name
    8191035020     10.3.5.0.2      WLS 10.3.5.0.2
    8191035010     10.3.5.0.1      WLS 10.3.5.0.1
    8191035000     10.3.5          WLS 10.3.5
    95103500       10.3.5          WLS 10.3.5
    
  2. 次のコマンドを実行して、Oracle WebLogicの製品IDを検索します。
    emcli list_aru_products -name="Oracle WebLogic Server"
    Output:
    Product ID    Product Name
    15991         Oracle WebLogic Server
    16725         Oracle WebLogic Server Virtual Edition
    
  3. 次のコマンドを実行して、汎用プラットフォームのプラットフォームIDを検索します。
    emcli list_aru_platform -name="Generic Platform"
    Output:
    Platform ID    Platform Name
    2000            Generic Platform
    1204            NLS Generic Platform
    
  4. 前のステップで取得した製品、リリース、プラットフォームの詳細を使用して、次のようにパッチIDを検索します。
    emcli search_patches -product=15991 -release=8191035000   -platform=2000
    
    Output:
    9561331    Generic PLATFORM  -  10.3.5 Oracle WebLogic Server 10.3.5    Generic    American English        Recommended     Generic Platform
    
  5. viエディタを使用してパッチとターゲットのマップ(プロパティ)ファイルを作成し、パッチID、リリースID、プラットフォームID、言語IDなどの情報を指定します。次にサンプルのプロパティ・ファイルを示します。
    vi create.props
    
    patch.0.patch_id=9561331
    patch.0.release_id=8191035000
    patch.0.platform_id=2000
    patch.0.language_id=0
    patch.0.target_name=/Farm01_soa_domain/soa_domain
    patch.0.target_type=weblogic_domain
    
  6. 次のコマンドを実行して計画を作成し、新規作成したプロパティ・ファイル(create.props)を入力として指定します。
    emcli create_patch_plan -name=demo1 -input_file=data:create.props
    
    Output:
    The Patch Plan "demo1" is successfuly created.
    
  7. 既存の計画のユーザー編集可能なフィールドを表示し、出力をプロパティ・ファイルに保存するには、次のコマンドを実行します。
    emcli get_patch_plan_data -name=demo1 >set.props
    
    vi set.props
    Output:
    name=demo1
    description=
    deployment_date=	
    planPrivilegeList=VIEWER:ADMIN:VIEW;OPER:ADMIN:VIEW;DESIGNER:ADMIN:VIEW
    
    patch.0.patch_id=9561331
    patch.0.release_id=8191035000
    patch.0.platform_id=2000
    patch.0.language_id=0
    patch.0.target_name=/Farm01_soa_domain/soa_domain
    patch.0.target_type=weblogic_domain
    
    deploymentOptions.StageLocation=%emd_emstagedir%
    deploymentOptions.AdvancedOPatchOptions=AllNodes
    deploymentOptions.StagePatches=true
    deploymentOptions.rollbackMode=false
    
  8. 任意のエディタを使用してプロパティ・ファイル(set.props)を編集し、ロールバック・モードをtrueに変更します。
    name=demo1
    description=
    deployment_date=	
    planPrivilegeList=VIEWER:ADMIN:VIEW;OPER:ADMIN:VIEW;DESIGNER:ADMIN:VIEW
    
    patch.0.patch_id=9561331
    patch.0.release_id=8191035000
    patch.0.platform_id=2000
    patch.0.language_id=0
    patch.0.target_name=/Farm01_soa_domain/soa_domain
    patch.0.target_type=weblogic_domain
    
    deploymentOptions.StageLocation=%emd_emstagedir%
    deploymentOptions.AdvancedOPatchOptions=AllNodes
    deploymentOptions.StagePatches=true
    deploymentOptions.rollbackMode=true
    
  9. 編集後の新規データでパッチ計画を保存するには、次のコマンドを実行します。
    emcli set_patch_plan_data -name=demo1 -input_file=data:set.props
    
    Output:
    It is successfully updating deployment options from the patch plan.
    
  10. パッチ計画のステータスを検証するには、次のEM CLIコマンドを実行します。
    emcli show_patch_plan -name=demo1 -info
    
    Output:
    <plan>
      <planDetails>
    <plan_id>EDD74FFF006DD0EE6D28394B8AAE</plan_id>
    <name>demo1</name>
    <type>PATCH</type>
    <description/>
    <conflict_check_date>Tue Feb 21 18:04:04 PST 2012</conflict_check_date>
    <conflict_check_date_ms>1329876244000</conflict_check_date_ms>
    <is_deployable>1</is_deployable>
    <plan_status>CONFLICTS</plan_status>
    <review_status>CONFLICT_FREE</review_status>
    <created_date>Tue Feb 21 17:40:47 PST 2012</created_date>
    <created_date_ms>1329874847000</created_date_ms>
    <created_by>SYSMAN</created_by>
    <last_updated_date>Tue Feb 21 17:58:29 PST 2012</last_updated_date>
    <last_updated_date_ms>1329875909000</last_updated_date_ms>
    <last_updated_by><USERNAME></last_updated_by>
    <grant_priv>yes</grant_priv>
    <user_plan_privilege>FULL</user_plan_privilege>
    <see_all_targets>N</see_all_targets>
    <homogeneousGroupLabel>Oracle WebLogic Domain 10.3.5.0 (Linux x86-64)</homogeneousGroupLabel>
    <executeGuid/>
    <executeUrl/>
    <planDetails/>
    
  11. 関連するすべてのデータを使用してパッチ計画の作成と更新が終了すると、次の一連のモードでパッチ計画を送信できます。パッチ計画を送信するEM CLIコマンドは、次のとおりです。
    emcli submit_patch_plan -name=demo1 -action=analyze
    
    Output:
    The action "analyze" is successfully submitted on the Patch Plan "demo1", now "analyze" is in progress.
    
  12. 送信されたパッチ計画のステータスを検証するには、次のEM CLIコマンドを実行します。
    emcli show_patch_plan -name=demo1 -info
    
    Output:
    <plan>
      <planDetails>
    <plan_id>EDD74FFF006DD0EE6D28394B8AAE</plan_id>
    <name>demo1</name>
    <type>PATCH</type>
    <description/>
    <conflict_check_date>Tue Feb 21 18:04:04 PST 2012</conflict_check_date>
    <conflict_check_date_ms>1329876244000</conflict_check_date_ms>
    <is_deployable>1</is_deployable>
    <plan_status>CONFLICTS</plan_status>
    <review_status>CONFLICT_FREE</review_status>
    <created_date>Tue Feb 21 17:40:47 PST 2012</created_date>
    <created_date_ms>1329874847000</created_date_ms>
    <created_by>USERNAME</created_by>
    <last_updated_date>Tue Feb 21 17:58:29 PST 2012</last_updated_date>
    <last_updated_date_ms>1329875909000</last_updated_date_ms>
    <last_updated_by>USERNAME</last_updated_by>
    <grant_priv>yes</grant_priv>
    <user_plan_privilege>FULL</user_plan_privilege>
    <see_all_targets>N</see_all_targets>
    <homogeneousGroupLabel>Oracle WebLogic Domain 10.3.5.0 (Linux x86-64)</homogeneousGroupLabel>
    <executeGuid/>
    <executeUrl/>
    <planDetails/>
    
  13. 競合があるかどうかを確認するには、次のコマンドを実行します。
    emcli show_patch_plan -name=planName -analysisResults
    
    Output:
    <plan_status>CONFLICTS</plan_status>
    

    作成した計画を検証するには、「エンタープライズ」メニューから「プロビジョニングとパッチ適用」「パッチと更新版」の順に選択してEnterprise Manager Cloud Controlにログインします。ホームページに、コマンドラインで作成したパッチ計画demo1が次のように表示されます。


    パッチ計画

    UIを使用して競合を解決し、パッチ計画を送信します。

  14. 競合を解決したら、次のようにコマンドshow_patch_planを実行して計画のステータスを検証します。
    Output:
    <plan>
      <planDetails>
    <plan_id>EDD74FFF006DD0EE6D28394B8AAE</plan_id>
    <name>demo</name>
    <type>PATCH</type>
    <description/>
    <conflict_check_date>Tue Feb 21 18:04:04 PST 2012</conflict_check_date>
    <conflict_check_date_ms>1329876244000</conflict_check_date_ms>
    <is_deployable>1</is_deployable>
    <plan_status>INPROGRESS</plan_status>
    <review_status>CONFLICT_FREE</review_status>
    <created_date>Tue Feb 21 17:40:47 PST 2012</created_date>
    <created_date_ms>1329874847000</created_date_ms>
    <created_by>USERNAME</created_by>
    <last_updated_date>Tue Feb 21 17:58:29 PST 2012</last_updated_date>
    <last_updated_date_ms>1329875909000</last_updated_date_ms>
    <last_updated_by>USERNAME</last_updated_by>
    <grant_priv>yes</grant_priv>
    <user_plan_privilege>FULL</user_plan_privilege>
    <see_all_targets>N</see_all_targets>
    <homogeneousGroupLabel>Oracle WebLogic Domain 10.3.5.0 (Linux x86-64)</homogeneousGroupLabel>
    <executeGuid>BA8E3904DDB36CFFE040F00A5E644D13</executGuid>
    <executeUrl>/em/console/paf/procedureStatus?executionGUID=BA8E3904DDB36CFFE040F00A5E644D13</executeUrl>
    <planDetails/>
    
  15. 次のコマンドを実行して、パッチ計画の実行ステータスを確認します。
    emcli get_instance_status -instance=BA8E3904DDB36CFFE040F00A5E644D13
    
    Output:
    BA8E3904DDB36CFFE040F00A5E644D13, PatchOracleSoftware, demo1_Analysis_Tue Mar 06 02:08:02 PST 012, EXECUTING
    
  16. 分析が成功すると、パッチ計画をデプロイ/準備できるようになります。これを行うには、actionにdeployを指定して次のコマンドを実行します。
    emcli submit_patch_plan -name=demo1 -action=deploy
    
    Output:
    The action "deploy" is successfully submitted on the Patch Plan "demo1", now "deploy" is in progress

  17. Cloud Control UIを使用して、送信した計画が正常にデプロイされたかどうかを確認します。あるいは、EM CLIコマンドでも同じ検証を実行できます。
    emcli get_job_execution_detail -execution=79CAF6A6DAFCFEE6654C425632F19411 -xml