外部管理サービスの構成
外部管理サービスは、Liferay Helm チャートの外部で作成、構成、管理されます。
データベース
AWS で Liferay の外部データベースを構成するには、 ポータル プロパティを使用します。 環境変数を参照して値を秘密に保つことができます。
portalProperties: |
jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.password=${env.DATABASE_PASSWORD}
jdbc.default.url=jdbc:${env.DATABASE_PROTOCOL}://${env.DATABASE_ENDPOINT}:${env.DATABASE_PORT}/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
jdbc.default.username=${env.DATABASE_USERNAME}
検索エンジン
検索エンジンを構成するには、OSGi 構成ファイルを提供する必要があります。 Elasticsearch または OpenSearchを使用する手順は次のとおりです。
Elasticsearch
Elasticsearch を使用するには、 configMap プロパティを使用して必要な OSGi 構成ファイルを追加します。
configmap:
data:
com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config: |
authenticationEnabled=B"<...>"
clusterName="<...>"
httpSSLEnabled=B"<...>"
indexNamePrefix="liferay-"
networkHostAddresses=["$[env:SEARCH_PROTOCOL]://$[env:SEARCH_ENDPOINT]"]
operationMode="REMOTE"
password="$[env:SEARCH_PASSWORD]"
username="$[env:SEARCH_USERNAME]"
customVolumeMounts:
x-search:
- mountPath: /opt/liferay/osgi/configs/com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config
name: liferay-configmap
subPath: com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config
OSGi プロパティ 内の環境変数を参照する構文 は、ポータル プロパティで使用される構文とは異なります。
OpenSearch
OpenSearch を使用するには、 configMap プロパティを使用して必要な OSGi 構成ファイルを追加します。
configmap:
data:
com.liferay.portal.search.opensearch2.configuration.OpenSearchConfiguration.config: |
remoteClusterConnectionId="REMOTE"
com.liferay.portal.search.opensearch2.configuration.OpenSearchConnectionConfiguration-REMOTE.config: |
active=B"true"
authenticationEnabled=B"true"
connectionId="REMOTE"
httpSSLEnabled=B"false"
networkHostAddresses=["https://opensearch-cluster-master:9200"]
password="OpenSearch1@"
username="admin"
customVolumeMounts:
x-opensearch:
- mountPath: /opt/liferay/osgi/configs/com.liferay.portal.search.opensearch2.configuration.OpenSearchConfiguration.config
name: liferay-configmap
subPath: com.liferay.portal.search.opensearch2.configuration.OpenSearchConfiguration.config
- mountPath: /opt/liferay/osgi/configs/com.liferay.portal.search.opensearch2.configuration.OpenSearchConnectionConfiguration-REMOTE.config
name: liferay-configmap
subPath: com.liferay.portal.search.opensearch2.configuration.OpenSearchConnectionConfiguration-REMOTE.config
次に、 依存関係を使用して、DXP で Elasticsearch コネクタ バンドルをブラックリストに登録します。
dependencies:
search:
portalBundleDenyList:
- com.liferay.portal.search.elasticsearch.cross.cluster.replication.impl
- com.liferay.portal.search.elasticsearch.monitoring.web
- com.liferay.portal.search.elasticsearch7.api
- com.liferay.portal.search.elasticsearch7.impl
- com.liferay.portal.search.learning.to.rank.api
- com.liferay.portal.search.learning.to.rank.impl
source: external
Liferay DXP イメージには OpenSearch コネクタ モジュールが含まれていません。 これらのモジュールを使用するには、それらを含む新しい Liferay Docker イメージを構築する必要があります。 Dockerイメージ作成の詳細については、「 Liferay Dockerイメージの構築」を参照してください。 AWS で使用する Liferay Docker イメージの指定の詳細については、「 AWS での Liferay の設定」を参照してください。
ファイル ストレージ
いくつかのファイル(別名 Liferay の (.object) ストレージ コネクタ。 dl.store.impl ポータル プロパティを使用してストレージ ソリューションを選択できます。 たとえば、S3をファイルストアとして使用するには
portalProperties: |
dl.store.impl=com.liferay.portal.store.s3.S3Store
Liferay S3 ファイルストレージコネクタには OSGi 構成ファイルが必要です。 configMap プロパティを使用して追加できます。
configmap:
data:
com.liferay.portal.store.s3.configuration.S3StoreConfiguration.config: |
accessKey="$[env:OBJECT_STORAGE_ACCESSKEY]"
bucketName="objectstorage"
connectionProtocol="$[env:OBJECT_STORAGE_PROTOCOL]"
s3Endpoint="$[env:OBJECT_STORAGE_ENDPOINT]"
s3PathStyle=B"true"
s3Region="$[env:OBJECT_STORAGE_REGION]"
s3StorageClass="STANDARD"
secretKey="$[env:OBJECT_STORAGE_SECRETKEY]"
customVolumeMounts:
x-object-storage-external:
- mountPath: /opt/liferay/osgi/configs/com.liferay.portal.store.s3.configuration.S3StoreConfiguration.config
name: liferay-configmap
subPath: com.liferay.portal.store.s3.configuration.S3StoreConfiguration.config
OSGi プロパティで環境変数を参照するための構文は、ポータル プロパティで使用される構文とは異なります。