17.2.7 アップグレードの実行
アップグレードを実行するには、アップグレード・ポッドを作成し、いくつかのアップグレード・コマンドを実行する必要があります。
ノート:
アップグレードに失敗した場合は、「アップグレード失敗後のリストア」を参照してください。- 次のコマンドを実行して、
domain-upgrade-podを作成します:
例:kubectl apply -f <workdir>/upgradescripts/domain-upgrade-pod.yaml
出力は次のようになります。kubectl apply -f /OAM12CUPG//upgradescripts/domain-upgrade-pod.yamlpod/accessdomain-domain-upgrade created - 次のkubectlコマンドを実行して、ポッドを表示します:
例:kubectl get pods -n %NAMESPACE%
出力は次のようになります:kubectl get pods -n oamnsNAME READY STATUS RESTARTS AGE accessdomain-domain-upgrade 1/1 Running 0 2m3sポッドのステータスが
READY 1/1になるまで数分かかる場合があります。 - Kubernetes 1.30以上を実行している場合は、次の環境変数を設定します:
export KUBECTL_REMOTE_COMMAND_WEBSOCKETS=false - 次のコマンドを実行して、
domain-upgradeポッドでBashシェルを起動します:
例:kubectl exec -it %DOMAIN_UID%-domain-upgrade -n %NAMESPACE% -- /bin/bash
これにより、kubectl exec -it accessdomain-domain-upgrade -n oamns -- /bin/bashdomain-upgradeポッド内のBashシェルに移動します:[oracle@accessdomain-domain-upgrade oracle]$ - アップグレード・ポッド内で、
/u01/scriptsディレクトリに移動します:cd /u01/scripts - 次のコマンドを実行して、アップグレード・アシスタントを実行します:
出力は次のようになります。$ORACLE_HOME/oracle_common/upgrade/bin/ua -response /u01/scripts/domainUpgradeResponse.txt -logLevel TRACE -logDir /tmpOracle 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. domain-upgradeポッド内で、wlstプロンプトを起動します:
出力は次のようになります:$ORACLE_HOME/oracle_common/common/bin/wlst.shInitializing 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>wls:/offline>プロンプトで次のコマンドを実行して、ドメインの再構成を実行します:domainHomeを設定します:
例:domainHome='/u01/oracle/user_projects/domains/%DOMAIN_UID%'domainHome='/u01/oracle/user_projects/domains/accessdomain'domanHomeを読み取ります:
出力は次のようになります:readDomainForUpgrade(domainHome)wls:/offline/accessdomain>- ドメインを更新します:
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> - ドメインを閉じます:
closeDomain()
wls:/offline>プロンプトで、次のアップグレード後のステップを実行します:domainHomeを設定します:
例:domainHome='/u01/oracle/user_projects/domains/%DOMAIN_UID%'domainHome='/u01/oracle/user_projects/domains/accessdomain'RCUPREFIXおよびRCU_SCHEMA_PWDパスワードを設定します:wlsRuntimeUser='%RCUPREFIX%_WLS_RUNTIME'
例:schemaPassword='%RCU_SCHEMA_PWD%'wlsRuntimeUser='OAMK8S_WLS_RUNTIME'schemaPassword='<password>'- ドメインを読み取ります:
readDomain(domainHome) - 次のディレクトリを変更します。
cd('/JdbcSystemResource/WLSRuntimeSchemaDataSource/JdbcResource/WLSRuntimeSchemaDataSource/JdbcDriverParams/NO_NAME_0') CONNECTION_STRINGを設定します:
例:dbUrl="jdbc:oracle:thin:@%CONNECTION_STRING%"dbUrl="jdbc:oracle:thin:@mydatabasehost.example.com:1521/orcl.example.com"- 次を実行して、ドメインを更新します:
cmo.setUrl(dbUrl)cmo.setDriverName('oracle.jdbc.OracleDriver')set('PasswordEncrypted', schemaPassword)cd('Properties/NO_NAME_0/Property/user')cmo.setValue(wlsRuntimeUser)cd('/')
出力は画面に返されず、そのままプロンプトに戻ります。updateDomain() - ドメインを閉じて終了します:
closeDomain()exit()
domain-upgradeポッドを終了します:exit