17.2.7 アップグレードの実行

アップグレードを実行するには、アップグレード・ポッドを作成し、いくつかのアップグレード・コマンドを実行する必要があります。

ノート:

アップグレードに失敗した場合は、「アップグレード失敗後のリストア」を参照してください。
  1. 次のコマンドを実行して、domain-upgrade-podを作成します:
    kubectl apply -f <workdir>/upgradescripts/domain-upgrade-pod.yaml
    例:
    kubectl apply -f /OAM12CUPG//upgradescripts/domain-upgrade-pod.yaml
    出力は次のようになります。
    pod/accessdomain-domain-upgrade created
  2. 次のkubectlコマンドを実行して、ポッドを表示します:
    kubectl get pods -n %NAMESPACE%
    例:
    kubectl get pods -n oamns
    出力は次のようになります:
    NAME                                                      READY   STATUS    RESTARTS   AGE
    accessdomain-domain-upgrade                               1/1     Running   0          2m3s
    

    ポッドのステータスがREADY 1/1になるまで数分かかる場合があります。

  3. 次のコマンドを実行して、domain-upgradeポッドでBashシェルを起動します:
    kubectl exec -it %DOMAIN_UID%-domain-upgrade -n %NAMESPACE% -- /bin/bash
    例:
    kubectl exec -it accessdomain-domain-upgrade -n oamns -- /bin/bash
    これにより、domain-upgradeポッド内のBashシェルに移動します:
    [oracle@accessdomain-domain-upgrade oracle]$
  4. アップグレード・ポッド内で、/u01/scriptsディレクトリに移動します:
    cd /u01/scripts
  5. 次のコマンドを実行して、アップグレード・アシスタントを実行します:
    $ORACLE_HOME/oracle_common/upgrade/bin/ua -response /u01/scripts/domainUpgradeResponse.txt -logLevel TRACE -logDir /tmp
    出力は次のようになります。
    Oracle Fusion Middleware Upgrade Assistant 14.1.2.0.0
    Log file is located at: /tmp/ua<DATE>.log
    Reading installer inventory, this will take a few moments...
    ...completed reading installer inventory.
    UPGAST-00238: Warning: A dependency by component OIM on component SOA is unresolved. Upgrades of component OIM will be disabled.
    A dependent component was not found while discovering upgrade components and their dependencies.
    Make sure the required component has been installed.
    Using response file /u01/scripts/domainUpgradeResponse.txt for input
     Oracle Platform Security Services schema examine is in progress
     Oracle Access Management Suite (Schema Upgrade) schema examine is in progress
     Oracle Audit Services schema examine is in progress
     Oracle Metadata Services schema examine is in progress
     Oracle Platform Security Services schema examine finished with status: ready for upgrade
     Oracle Access Management Suite (Schema Upgrade) schema examine finished with status: ready for upgrade
     Oracle WebLogicServer schema examine is in progress
     Common Infrastructure Services schema examine is in progress
     Oracle Metadata Services schema examine finished with status: ready for upgrade
     Common Infrastructure Services schema examine finished with status: ready for upgrade
     Oracle WebLogicServer schema examine finished with status: ready for upgrade
     Oracle Audit Services schema examine finished with status: ready for upgrade
    Schema Version Registry saved to: /tmp/ua<DATE>.xml
     Oracle Audit Services schema upgrade is in progress
     Oracle Platform Security Services schema upgrade is in progress
     Oracle Access Management Suite (Schema Upgrade) schema upgrade is in progress
     Oracle Metadata Services schema upgrade is in progress
     Oracle Access Management Suite (Schema Upgrade) schema upgrade finished with status: succeeded
     Common Infrastructure Services schema upgrade is in progress
     Common Infrastructure Services schema upgrade finished with status: succeeded
     Oracle WebLogicServer schema upgrade is in progress
     Oracle Audit Services schema upgrade finished with status: succeeded
     Oracle Metadata Services schema upgrade finished with status: succeeded
     Oracle WebLogicServer schema upgrade finished with status: succeeded
     Oracle Platform Security Services schema upgrade finished with status: succeeded

    ノート:

    前述の次のメッセージは無視できます:
    UPGAST-00238: Warning: A dependency by component OIM on component SOA is unresolved. Upgrades of component OIM will be disabled.
    A dependent component was not found while discovering upgrade components and their dependencies.
    Make sure the required component has been installed.
  6. domain-upgradeポッド内で、wlstプロンプトを起動します:
    $ORACLE_HOME/oracle_common/common/bin/wlst.sh
    出力は次のようになります:
    Initializing WebLogic Scripting Tool (WLST) ...
    
    Jython scans all the jar files it can find at first startup. Depending on the system, this process may take a few minutes to complete, and WLST may not return a prompt right away.
    
    Welcome to WebLogic Server Administration Scripting Shell
    
    Type help() for help on available commands
    
    wls:/offline>
    
  7. wls:/offline>プロンプトで次のコマンドを実行して、ドメインの再構成を実行します:
    1. domainHomeを設定します:
      domainHome='/u01/oracle/user_projects/domains/%DOMAIN_UID%'
      例:
      domainHome='/u01/oracle/user_projects/domains/accessdomain'
    2. domanHomeを読み取ります:
      readDomainForUpgrade(domainHome)
      出力は次のようになります:
      wls:/offline/accessdomain>
    3. ドメインを更新します:
      updateDomain()

      ノート:

      このコマンドは、完了までに25分ほどかかる場合があります。
      出力は次のようになります:
      <DATE> 9:28:33 AM oracle.security.jps.internal.config.xml.XmlConfigurationFactory validateFileLocation
      INFO: JPS Config: /u01/oracle/user_projects/domains/accessdomain/config/fmwconfig/jps-config-jse.xml
      <DATE> 9:28:34 AM oracle.security.jps.internal.config.xml.XmlConfigurationFactory validateFileLocation
      INFO: JPS Config: /u01/oracle/user_projects/domains/accessdomain/config/fmwconfig/jps-config.xml
      <DATE> 9:28:34 AM oracle.security.opss.internal.runtime.ServiceContextManagerImpl getContext
      WARNING: Bootstrap services are used by OPSS internally and clients should never need to directly read/write bootstrap credentials. If required, use Wlst or configuration management interfaces.
      <DATE> 9:28:35 AM oracle.security.jps.internal.config.xml.XmlConfigurationFactory validateFileLocation
      INFO: JPS Config: /u01/oracle/user_projects/domains/accessdomain/config/fmwconfig/jps-config-jse.xml
      <DATE> 9:28:35 AM oracle.security.jps.internal.config.xml.XmlConfigurationFactory validateFileLocation
      INFO: JPS Config: /u01/oracle/user_projects/domains/accessdomain/config/fmwconfig/jps-config.xml
      <DATE> 9:54:05 AM oracle.security.jps.az.internal.runtime.policy.AbstractPolicyImpl initializeReadStore
      INFO: Property for read store in parallel: oracle.security.jps.az.runtime.readstore.threads = null
      wls:/offline/accessdomain>
      
    4. ドメインを閉じます:
      closeDomain()
  8. wls:/offline>プロンプトで、次のアップグレード後のステップを実行します:
    1. domainHomeを設定します:
      domainHome='/u01/oracle/user_projects/domains/%DOMAIN_UID%'
      例:
      domainHome='/u01/oracle/user_projects/domains/accessdomain'
    2. RCUPREFIXおよびRCU_SCHEMA_PWDパスワードを設定します:
      wlsRuntimeUser='%RCUPREFIX%_WLS_RUNTIME'
      schemaPassword='%RCU_SCHEMA_PWD%'
      例:
      wlsRuntimeUser='OAMK8S_WLS_RUNTIME'
      schemaPassword='<password>'
    3. ドメインを読み取ります:
      readDomain(domainHome)
    4. 次のディレクトリを変更します。
      cd('/JdbcSystemResource/WLSRuntimeSchemaDataSource/JdbcResource/WLSRuntimeSchemaDataSource/JdbcDriverParams/NO_NAME_0')
    5. CONNECTION_STRINGを設定します:
      dbUrl="jdbc:oracle:thin:@%CONNECTION_STRING%"
      例:
      dbUrl="jdbc:oracle:thin:@mydatabasehost.example.com:1521/orcl.example.com"
    6. 次を実行して、ドメインを更新します:
      cmo.setUrl(dbUrl)
      cmo.setDriverName('oracle.jdbc.OracleDriver')
      set('PasswordEncrypted', schemaPassword)
      cd('Properties/NO_NAME_0/Property/user')
      cmo.setValue(wlsRuntimeUser)
      cd('/')
      updateDomain()
      出力は画面に返されず、そのままプロンプトに戻ります。
    7. ドメインを閉じて終了します:
      closeDomain()
      exit()
  9. domain-upgradeポッドを終了します:
    exit