このドキュメントでは、WLSおよびFMW/JRFインフラストラクチャ・ドメインをv14.1.2.0にアップグレードするためのガイドラインを示します。
デフォルトでは、バージョン14.1.2.0 WLSおよびFMW/JRFインフラストラクチャ・ドメイン「本番モード」は「保護された本番モード」に設定され、デフォルトのセキュリティ構成はよりセキュアで、セキュアでない構成は警告として記録され、デフォルトの認可およびロール・マッピング・ポリシーはより制限されます。
セキュアな本番モードの重要な変更は次のとおりです:
プレーンHTTPリスニング・ポートは無効です。 プレーンHTTPリスニング・ポートを使用するアプリケーション・コード、ユーティリティまたはイングレスを変更する必要があります。
SSLリスニング・ポートは、ドメイン内のすべてのサーバーで有効にする必要があります。 各サーバーには、デフォルト・チャネルまたはカスタム・ネットワーク・チャネルのいずれかで、少なくとも1つのSSLリスニング・ポートが設定されている必要があります。 デモSSL証明書は本番環境では使用しないでください。すべてのサーバー・インスタンスで有効なSSL証明書を使用してSSLリスニング・ポートを設定する必要があります。
デモSSL証明書は以前のリリースから完全に変更されています。使用する場合は特別な考慮事項があります。 詳細については、「v14.1.2.0.0以降でのデモSSL証明書の使用」を参照してください。
保護された本番モードの詳細は、「保護された本番モード」のドキュメントを参照してください。
ノート: ドメインが本番モードでない場合、どのセキュリティ変更も適用されません。
一般に、KubernetesでWLSおよびFMW/JRFインフラストラクチャ・ドメインをアップグレードするプロセスは、オンプレミスのドメインをアップグレードするプロセスと似ています。 詳しくは、「Fusion Middlewareアップグレード・ガイド」をお読みください。
アップグレードの前に、次のことを行う必要があります:
JRF
の場合:
serverStartPolicy
(あるいはその両方)にパッチを適用して、ドメインをNever
に停止します。 例えば:
$ kubectl -n sample-domain1-ns patch domain sample-domain1 --type=json -p='[ {"op": "replace", "path": "/spec/serverStartPolicy", "value": "Never"}]'
ドメインが永続ボリューム上にある場合、WebLogicには、WebLogicドメインのバージョン・アップグレードを実行するための2つのユーティリティが用意されています: FMW JRFデータベース・スキーマをアップグレードするためのアップグレード・アシスタントと、ドメイン構成をアップグレードするための再構成ウィザード。 これらのユーティリティを実行する場合は、既存のドメイン・ホーム・ディレクトリにアクセスする必要があります。 一般的なKubernetes環境にはグラフィカル・インタフェースがないため、コマンドライン・オプションを指定してこれらのユーティリティを実行する必要があります。
ドメインでModel in Imageが使用されている場合は、モデルの更新時にドメインが再構築されるため、詳細は「アップグレードのユースケース」を参照してください。
オペレータは、ウォレット・ファイルを抽出してKubernetes walletFileSecret
に格納するためのヘルパー・スクリプト「OPSSウォレット・ユーティリティ」を提供します。 また、ウォレット・ファイルは、Kubernetesの外部で安全にバックアップされたロケーションに保存する必要があります。 たとえば、次のコマンドは、sample-ns
ネームスペースのsample-domain1
ドメインのOPSSウォレットを/tmp
ディレクトリのewallet.p12
という名前のファイルに保存し、sample-domain1-opss-walletfile-secret
という名前のウォレット・シークレットにも格納します。
$ opss-wallet.sh -n sample-ns -d sample-domain1 -s -r -wf /tmp/ewallet.p12 -ws sample-domain1-opss-walletfile-secret
永続ボリューム上のドメインの場合、14.1.2.0 WebLogic Serverバージョン・ポッドを使用して、共有ボリューム上のドメイン・ホームにアクセスする必要があります。 「PVおよびPVCヘルパー・スクリプト」を使用して実行中のポッドを起動できます。
たとえば、
$ ./pv-pvc-helper.sh -n sample-domain1-ns -c sample-domain1-pvc-rwm1 -m /share -i wls14120:fmw
ポッドがデプロイされたら、ポッドのターミナル・セッションにkubectl -n sample-domain1-ns exec -it pvhelper -- /bin/sh'
できます。
Upgrade Assistantは、JRFデータベース内のスキーマをアップグレードするためのものです。 スキーマをアップグレードする必要があるかどうかを検出し、スキーマをアップグレードして、システム所有のスキーマ・バージョン表をアップグレードします。
WebLogic Serverポッドをまだデプロイしていない場合は、「サーバー・ポッドのデプロイ」を参照してください。
pvhelper
ポッドから、すべてのコマンドライン・オプションを検出します:
$ cd $ORACLE_HOME/oracle_common/upgrade/bin
$ ./ua -help
このコンテンツを含むresponse.txt
という名前のファイルを作成し、<TODO:
を環境に一致するように変更します。
# This is a response file for the Fusion Middleware Upgrade Assistant.
# Individual component upgrades are performed in the order they are described here.
# Each upgrade is introduced by a section header containing the name of the
# component and name of the upgrade plugin. The form of the section header is
# [ComponentName.PluginName]
# These names can be found in the Upgrade Descriptor files for the components.
# Individual input lines consist of a name, an equal sign, and a value.
# The name is in two parts separated by a period. The first part is the "name"
# attribute from the Descriptor File XML tag by which the plugin refers to the value.
# The second part of the name identifies a field within that value. Some input
# types have only one field, while other types can have half a dozen. Do not
# intermix input lines that apply to different XML tags.
[GENERAL]
# This is the file format version number. Do not change the next line.
fileFormatVersion = 3
# The next section contains information for accessing a WebLogic Server domain.
[UAWLSINTERNAL.UAWLS]
# The following number uniquely identifies this instance of an
# upgrade plugin. Do not change it.
pluginInstance = 1
# Specifies the WebLogic Server domain directory:
#UASVR.path = /share/domains/sample-domain1
UASVR.path = <TODO: provides the complete domain home path>
# The next section contains the information for performing a schema
# upgrade on Oracle Platform Security Services, as described in the Upgrade
# Descriptor file located at
# /u01/oracle/oracle_common/plugins/upgrade/Opss.xml
# Do not change the next line.
[OPSS.OPSS_SCHEMA_PLUGIN]
# The following number uniquely identifies this instance of an
# upgrade plugin. Do not change it.
pluginInstance = 10
# The next few lines describe a database connection.
# "Specify the database containing the OPSS schema."
# Specifies the type of database. Supported types for this product are
# Oracle Database, Oracle Database enabled for edition-based redefinition, Microsoft SQL Server, IBM DB2
OPSS.databaseType = Oracle Database
# Specifies the database connection string for the DBA user.
# The format depends upon the database type.
#OPSS.databaseConnectionString = //nuc:1521/orclpdb1
OPSS.databaseConnectionString = <TODO: provides the connection string>
# Specifies the database connection string for the user schema.
# The format depends upon the database type.
#OPSS.schemaConnectionString = //nuc:1521/orclpdb1
OPSS.schemaConnectionString = <TODO: provides the connection string>
# Specifies the name of the schema or database user
#OPSS.schemaUserName = FMWTEST_OPSS
OPSS.schemaUserName = <TODO: provides the schema name rcuprefix_OPSS >
# Specifies the password for the schema, in encrypted form.
# To specify a different password in cleartext, use the "cleartextSchemaPassword" keyword instead:
OPSS.cleartextSchemaPassword = <TODO: provides the clear text password>
# encrypted password can be generated with command line option -createResponse
#OPSS.encryptedSchemaPassword = 0551CF2EACFC4FE7BCB1F860FCF68E13AA6E61A724E7CFC09E
# Specifies the name of the database administrator account.
OPSS.dbaUserName = <TODO: provide dba user name, e.g. sys as sysdba>
# Specifies the password for the database administrator account, in encrypted form.
# To specify a different password in cleartext, use the "cleartextDbaPassword" keyword
# instead:
OPSS.cleartextDbaPassword = <TODO: provides clear text dba password>
#OPSS.encryptedDbaPassword = 057B3698F71FB2EE583D32EF36234174DCC2C7276FC11F77E7
# The next section contains the information for performing a schema
# upgrade on Oracle Metadata Services, as described in the Upgrade
# Descriptor file located at
# /u01/oracle/oracle_common/plugins/upgrade/mds.xml
# Do not change the next line.
[MDS.SCHEMA_UPGRADE]
pluginInstance = 11
MDS.databaseConnectionString = <TODO: provides the connection string>
MDS.schemaConnectionString = <TODO: provides the connection string>
MDS.schemaUserName = <TODO: provides the schema name rcuprefix_MDS >
MDS.cleartextSchemaPassword = <TODO: provides the clear text password>
MDS.dbaUserName = <TODO: provide dba user name, e.g. sys as sysdba>
MDS.cleartextDbaPassword = <TODO: provides clear text dba password>
# The next section contains the information for performing a schema
# upgrade on Oracle Audit Services, as described in the Upgrade
# Descriptor file located at
# /u01/oracle/oracle_common/plugins/upgrade/audit.xml
# Do not change the next line.
[IAU.AUDIT_SCHEMA_PLUGIN]
pluginInstance = 6
IAU.databaseType = Oracle Database
IAU.databaseConnectionString = <TODO: provides the connection string>
IAU.schemaConnectionString = <TODO: provides the connection string>
IAU.schemaUserName = <TODO: provides the schema name rcuprefix_IAU >
IAU.cleartextSchemaPassword = <TODO: provides the clear text password>
IAU.dbaUserName = <TODO: provide dba user name, e.g. sys as sysdba>
IAU.cleartextDbaPassword = <TODO: provides clear text dba password>
# The next section contains the information for performing a schema
# upgrade on Common Infrastructure Services, as described in the Upgrade
# Descriptor file located at
# /u01/oracle/oracle_common/plugins/upgrade/cie.xml
# Do not change the next line.
[FMWCONFIG.CIE_SCHEMA_PLUGIN]
pluginInstance = 4
STB.databaseType = Oracle Database
STB.databaseConnectionString = <TODO: provides the connection string>
STB.schemaConnectionString = <TODO: provides the connection string>
STB.schemaUserName = <TODO: provides the schema name rcuprefix_STB >
STB.cleartextSchemaPassword = <TODO: provides the clear text password>
STB.dbaUserName = <TODO: provide dba user name, e.g. sys as sysdba>
STB.cleartextDbaPassword = <TODO: provides clear text dba password>
# This section is not needed for pure JRF domain.
# The next section contains the information for performing a schema
# upgrade on Oracle WebLogicServer, as described in the Upgrade
# Descriptor file located at
# /u01/oracle/oracle_common/plugins/upgrade/wlsservices.xml
# Do not change the next line.
#[WLS.WLS]
#pluginInstance = 7
#WLS.databaseType = Oracle Database
#WLS.databaseConnectionString =
#WLS.schemaConnectionString =
#WLS.schemaUserName =
#WLS.encryptedSchemaPassword = 05FEC474FC653B49B15ED79A53565A8B00F49ADADA72D30816
#WLS.dbaUserName =
# WLS.cleartextDbaPassword =
#WLS.encryptedDbaPassword = 0543C93F9A28FBAFBF3FCC49E78EB2C6B3AA02F53098BB322C
レスポンス・ファイルをポッドにコピーします。
$ kubectl -n sample-domain1-ns cp response.txt pvhelper:/tmp
アップグレード・アシスタントのレディネス・チェックを実行して、入力パラメータとスキーマをアップグレードする必要があるかどうかを確認します。
$ ./ua -readiness -response /tmp/response.txt -logDir /tmp
出力をチェックして、エラーがあるかどうかを確認します。
Oracle Fusion Middleware Upgrade Assistant 14.1.2.0.0
Log file is located at: /tmp/ua2023-10-04-17-23-32PM.log
Reading installer inventory, this will take a few moments...
...completed reading installer inventory.
Using response file /tmp/response.txt for input
Oracle Metadata Services schema readiness check is in progress
Oracle Audit Services schema readiness check is in progress
Oracle Platform Security Services schema readiness check is in progress
Common Infrastructure Services schema readiness check is in progress
Common Infrastructure Services schema readiness check finished with status: ready for upgrade
Oracle Metadata Services schema readiness check finished with status: ready for upgrade
Oracle Audit Services schema readiness check finished with status: ready for upgrade
Oracle Platform Security Services schema readiness check finished with status: ready for upgrade
Readiness Check Report File: /tmp/readiness2023-10-04-17-24-55PM.txt
Upgrade readiness check completed successfully.
UPGAST-00281: Upgrade is being skipped because the -readiness flag is set
Actual upgrades are not done when the -readiness command line option is set.
If you want to perform an actual upgrade remove the -readiness flag from the command line. If you intended to perform just the readiness phase, no action is necessary.
エラーがなく、アップグレードする準備ができている場合は、-readiness
フラグを指定せずにコマンドを再度実行します。
$ ./ua -response /tmp/response.txt -logDir /tmp
出力を再度確認します。
Oracle Fusion Middleware Upgrade Assistant 14.1.2.0.0
Log file is located at: /u01/oracle/oracle_common/upgrade/logs/ua2023-10-05-14-03-18PM.log
Reading installer inventory, this will take a few moments...
...completed reading installer inventory.
Using response file /tmp/response.txt for input
Oracle Platform Security Services schema examine is in progress
Oracle Metadata Services schema examine is in progress
Oracle Audit Services schema examine is in progress
Common Infrastructure Services schema examine is in progress
Common Infrastructure Services schema examine finished with status: ready for upgrade
Oracle Platform Security Services schema examine finished with status: ready for upgrade
Oracle Audit Services schema examine finished with status: ready for upgrade
Oracle Metadata Services schema examine finished with status: ready for upgrade
Schema Version Registry saved to: /u01/oracle/oracle_common/upgrade/logs/ua2023-10-05-14-03-18PM.xml
Oracle Platform Security Services schema upgrade is in progress
Oracle Audit Services schema upgrade is in progress
Oracle Metadata Services schema upgrade is in progress
Common Infrastructure Services schema upgrade is in progress
Common Infrastructure Services schema upgrade finished with status: succeeded
Oracle Audit Services schema upgrade finished with status: succeeded
Oracle Platform Security Services schema upgrade finished with status: succeeded
Oracle Metadata Services schema upgrade finished with status: succeeded
エラーがある場合は、エラーを修正するか、Oracle Supportに連絡してください。
再構成ウィザードにより、ドメイン構成が14.1.2.0バージョンにアップグレードされます。
WebLogic Serverポッドをまだデプロイしていない場合は、「サーバー・ポッドのデプロイ」を参照してください。
pvhelper
ポッドから、次のWLSTコマンドを使用して、ドメインを14.1.2.0バージョンに再構成します。
$ /u01/oracle/oracle_common/bin/wlst.sh
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
wls:/offline> readDomainForUpgrade('<your domain home directory path>')
wls:/offline> updateDomain()
wls:/offline> closeDomain()
エラーがある場合は、エラーを修正するか、Oracle Supportに連絡してください。
WebLogicドメイン・タイプ(WLS
またはJRF
)およびドメイン・ホーム・ソース・タイプ(Domain on PVまたはModel in Image)に応じて、次のユースケース・シナリオを考えてみます。
serverStartPolicy
にパッチを適用してIfNeeded
にパッチを適用してドメインを再起動します。 たとえば、kubectl -n sample-domain1-ns patch domain sample-domain1 --type=json -p='[ {"op": "replace", "path": "/spec/serverStartPolicy", "value": "Never"}, {"op": "replace", "path":"/spec/image", "value":"<WebLogic 14120 base image>"]'
serverStartPolicy
にパッチを適用してIfNeeded
にパッチを適用してドメインを再起動します。 たとえば、kubectl -n sample-domain1-ns patch domain sample-domain1 --type=json -p='[ {"op": "replace", "path": "/spec/serverStartPolicy", "value": "Never"}, {"op": "replace", "path":"/spec/image", "value":"<Fusion Middleware Infrastructure 14120 image>"]'
既存のドメイン | アップグレード処理 |
---|---|
ドメインはすでに保護された本番モードを使用しています | WebLogic 14120ベース・イメージを使用するようにドメイン・リソースを更新し、ドメインを再デプロイします。 |
ドメインは保護された本番モードを使用していませんが、保護された本番モードを使用するように切り替える準備ができています | 保護された本番モードを有効にします。 「サンプルWDT YAML」を参照して、WebLogic 14120ベース・イメージを使用するようにドメイン・リソースを更新し、ドメインを再デプロイします。 |
ドメインは保護された本番モードを使用していませんが、セキュアな本番モードを使用するように切り替える準備ができていません | WebLogic 14120ベース・イメージを使用するようにドメイン・リソースを更新し、ドメインを再デプロイします。オペレータは保護された本番モードを自動的に無効化しますが、保護された本番モードの利点はドメインに追加されません。 |
ドメインは保護された本番モードを使用していないため、最初からドメインを再構築する必要があります | 最初にドメインを削除し、セキュアな本番モードを有効にします。 「サンプルWDT YAML」を参照して、WebLogic 14120ベース・イメージを使用するようにドメイン・リソースYAMLを更新し、ドメインをデプロイします。 |
kubectl -n sample-domain1-ns patch domain sample-domain1 --type=json -p='[ {"op": "replace", "path": "/spec/serverStartPolicy", "value": "Never"}, {"op": "replace", "path":"/spec/image", "value":"<WebLogic 14120 base image>"]'
Model in Imageを使用するFMW/JRFドメインは、WebLogic Kubernetes Operator 4.1以降非推奨になりました。 FMW v14.1.2.0にアップグレードする前に、ドメイン・ホームを永続ボリューム上のドメインに移動することをお薦めします。 詳細については、「永続ボリューム上のドメイン」を参照してください。
# Change type to PersistentVolume
domainHomeSourceType: PersistentVolume
image: <Fusion Middleware Infrastructure 14120 base image>
...
serverPod:
...
# specify the volume and volume mount information
volumes:
- name: weblogic-domain-storage-volume
persistentVolumeClaim:
claimName: sample-domain1-pvc-rwm1
volumeMounts:
- mountPath: /share
name: weblogic-domain-storage-volume
# specify a new configuration section, remove the old configuration section.
configuration:
# secrets that are referenced by model yaml macros
# sample-domain1-rcu-access is used for JRF domains
secrets: [ sample-domain1-rcu-access ]
initializeDomainOnPV:
persistentVolumeClaim:
metadata:
name: sample-domain1-pvc-rwm1
spec:
storageClassName: my-storage-class
resources:
requests:
storage: 10Gi
domain:
createIfNotExists: Domain
domainCreationImages:
- image: 'myaux:v6'
domainType: JRF
domainCreationConfigMap: sample-domain1-wdt-config-map
opss:
# Make sure you have already saved the wallet file secret. This allows the domain to use
# an existing JRF database schemas.
walletFileSecret: sample-domain1-opss-walletfile-secret
walletPasswordSecret: sample-domain1-opss-wallet-password-secret
既存のドメインを14.1.2.0にアップグレードし、既存のドメインで保護本番モードが有効になっていない場合、オペレータはデフォルトで「無効化」保護本番モードになります。 この動作をオーバーライドする場合は、明示的に有効にする必要があります。 オプションで、既存のドメインを削除し、オペレータにドメインを完全に再構築させることができ、デフォルトで保護された本番モードが有効になります。明示的に有効にする必要はありません。
次に、保護された本番モードおよびSSLを設定するためのWDTモデルのコード・スニペットを示します。
topology:
# Production mode must be true for secured production mode
#
ProductionModeEnabled: true
SecurityConfiguration:
# If you are updating an existing, pre 14.1.2.0 domain that does not have secure mode enabled,
# and want to use secured production mode, make sure you enable secure mode; otherwise the
# operator will disable it by default.
#
#
SecureMode:
SecureModeEnabled: true
#
# Make sure SSL is set up in all servers and server templates.
#
Server:
"admin-server":
CustomTrustKeyStoreFileName: 'wlsdeploy/servers/admin-server/trust-keystore.jks'
CustomIdentityKeyStoreFileName: 'wlsdeploy/servers/admin-server/identity-keystore.jks'
KeyStores: CustomIdentityAndCustomTrust
CustomIdentityKeyStoreType: JKS
CustomTrustKeyStoreType: JKS
CustomIdentityKeyStorePassPhraseEncrypted:
CustomTrustKeyStorePassPhraseEncrypted:
SSL:
ListenPort: 7002
Enabled : true
ServerPrivateKeyAlias: adminkey
ServerPrivateKeyPassPhraseEncrypted:
ServerTemplate:
"cluster-1-template":
CustomTrustKeyStoreFileName: 'wlsdeploy/servers/managed-server/trust-keystore.jks'
CustomIdentityKeyStoreFileName: 'wlsdeploy/servers/managed-server/identity-keystore.jks'
KeyStores: CustomIdentityAndCustomTrust
CustomIdentityKeyStoreType: JKS
CustomTrustKeyStoreType: JKS
CustomIdentityKeyStorePassPhraseEncrypted:
CustomTrustKeyStorePassPhraseEncrypted:
SSL:
ListenPort: 7102
Enabled : true
ServerPrivateKeyAlias: mykey
ServerPrivateKeyPassPhraseEncrypted: