Cross Cluster Replication
ご覧のページは、お客様の利便性のために一部機械翻訳されています。また、ドキュメントは頻繁に更新が加えられており、翻訳は未完成の部分が含まれることをご了承ください。最新情報は都度公開されておりますため、必ず英語版をご参照ください。翻訳に問題がある場合は、 こちら までご連絡ください。

CCRの構成:設定リファレンス

CCR構成プロセスを支援するために、ここでは本ガイドの段階的な手順に従った設定例を示します。 これらの構成は可能な限り一般的なものになっていますが、環境に合わせてパスやポートなどを調整する必要があります。 さらに、インストールを完了するには特定の手順を手動で実行する必要があるため、これらの手順は段階的な手順に代わるものではありません。

以下の構成は、インストールでX-Pack Securityを介した暗号化通信(TLS/SSL)とユーザー認証を有効にすることを前提としています。 詳細については、 Elasticsearch のセキュリティ保護 を参照してください。

ヒント

.config ファイル によって提供される構成値は、ファイルが単一のノードに展開されるとすぐに DXP クラスター全体に伝播されます。 しかし、各クラスタノードには同一の構成を用意することが最善の方法です。

リモートDXPクラスターノードの設定

これらの構成ファイルは[Remote Liferay Home]/osgi/configsにデプロイされます。

Elasticsearch の構成

リモートDXPクラスターには、ElasticsearchConfiguration.configファイルが必要です。

ファイル名:com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config

Liferay DXP 7.3ファイルの内容:

productionModeEnabled="true"
remoteClusterConnectionId="remote"
logExceptionsOnly="false"

Liferay DXP 7.1/7.2のファイル内容です。

clusterName="LiferayElasticsearchCluster_LEADER"
operationMode="REMOTE"
transportAddresses=["localhost:9300"]
logExceptionsOnly="false"

Liferay DXP 7.1/7.2では、個別の XPackSecurityConfiguration.config ファイルが必要です。

ファイル名:com.liferay.portal.search.elasticsearch7.configuration.XPackSecurityConfiguration.config

Liferay DXP 7.1/7.2のファイル内容です。

certificateFormat="PKCS#12"
sslKeystorePath="/PATH/TO/elastic-nodes.p12"
sslKeystorePassword="liferay"
sslTruststorePath="/PATH/TO/elastic-nodes.p12"
sslTruststorePassword="liferay"
requiresAuthentication=B"true"
username="elastic"
password="liferay"
transportSSLVerificationMode="certificate"
transportSSLEnabled=B"true"
ヒント

Liferay DXP 7.3では、X-Packセキュリティ設定ファイルは必要ありません。 セキュリティは各接続の .config ファイルで構成されます。 この値は、すべてのLiferayノードで同一でなければなりません。

Elasticsearch接続設定

[DXP 7.3のみ】リモート接続ファイル名です。 com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConnectionConfiguration-remote.configです。

ファイルの内容:

active="true"
connectionId="remote"
networkHostAddresses=["https://localhost:9200"]
username="elastic"
password="liferay"
authenticationEnabled=B"true"
httpSSLEnabled=B"true"
truststorePassword="liferay"
truststorePath="/PATH/to/elastic-nodes.p12"
truststoreType="pkcs12"
ヒント

Liferay DXP 7.1/7.2 では、 ElasticsearchConfiguration.config および XPackSecurityConfiguration.config ファイルを使用してリモート接続を構成しました。

[DXP 7.3 only] 読み取り専用の接続ファイル名です。 com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConnectionConfiguration-ccr.configとなります。

Liferay DXP 7.3のファイルの内容:

active="true"
connectionId="ccr"
networkHostAddresses=["https://localhost:9201"]
username="elastic"
password="liferay"
authenticationEnabled=B"true"
httpSSLEnabled=B"true"
truststorePassword="liferay"
truststorePath="/PATH/to/elastic-nodes.p12"
truststoreType="pkcs12"

[DXP 7.1/7.2 only] 読み取り専用の接続ファイル名です。 com.liferay.portal.search.elasticsearch.cross.cluster.replication.internal.configuration.ElasticsearchConnectionConfiguration-ccr.configとなります。

Liferay DXP 7.1/7.2のファイル内容です。

clusterName="LiferayElasticsearchCluster_FOLLOWER"
connectionId="ccr"
username="elastic"
password="liferay"
authenticationEnabled=B"true"
transportSSLEnabled=B"true"
networkHostAddress="https://localhost:9201"
transportAddresses=["localhost:9301"]
sslTruststorePassword="liferay"
sslTruststorePath="/PATH/TO/elastic-nodes.p12"
certificateFormat="pkcs12"
sslKeystorePassword="liferay"
sslKeystorePath="/PATH/TO/elastic-nodes.p12"

ローカルDXPクラスターノードの構成

これらの構成ファイルは[Local Liferay Home]/osgi/configsにデプロイされます。

リモートDXPノードに提供したローカルDXPノードに同一のElasticsearch 7構成(接続構成ファイルを含む)を提供します。

ローカルDXPクラスターノードCCRモジュールの構成

任意のノード(リモートデータセンターにあるノードも含む)のシステム設定UIからLESクラスター横断設定アプリケーションを構成します。 LPKGがデプロイされている場合、設定エントリーは[システム設定]→[検索機能]→[クラスター横断レプリケーション]にあります。

次の値を設定します。

  • [Read from Local Clusters]チェックボックスをオンにする
  • [Local Cluster Configurations]プロパティに値localhost:9080,ccrを設定する

システム設定からCCRを設定します。

重要

ここでリモート データ センターの値を決して設定しないでください (例では、 localhost:8080,remoteになります)。 これを設定すると、同じ名前のリーダーインデックスがすでに存在するリモートクラスタにフォロワーインデックスが作成されます。

リーダーElasticsearchクラスターノードの構成

場所:ES_LEADER_HOME/config

ファイル名:elasticsearch.yml

ファイルの内容:

cluster.name: LiferayElasticsearchCluster_LEADER
node.name: es-leader-node-1

http.port: 9200
transport.port: 9300

xpack.security.enabled: true

### TLS/SSL settings for Transport layer
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.keystore.path: certs/elastic-nodes.p12
xpack.security.transport.ssl.keystore.password: liferay
xpack.security.transport.ssl.truststore.path: certs/elastic-nodes.p12
xpack.security.transport.ssl.truststore.password: liferay
xpack.security.transport.ssl.verification_mode: certificate

## TLS/SSL settings for HTTP layer
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: certs/elastic-nodes.p12
xpack.security.http.ssl.keystore.password: liferay
xpack.security.http.ssl.truststore.path: certs/elastic-nodes.p12
xpack.security.http.ssl.truststore.password: liferay

# For Kibana
xpack.monitoring.collection.enabled: true

フォロワーElasticsearchクラスターノードの構成

場所:ES_FOLLOWER_HOME/config

ファイル名:elasticsearch.yml

ファイルの内容:

cluster.name: LiferayElasticsearchCluster_FOLLOWER
node.name: es-follower-node-1

http.port: 9201
transport.port: 9301

xpack.security.enabled: true

### TLS/SSL settings for Transport layer
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.keystore.path: certs/elastic-nodes.p12
xpack.security.transport.ssl.keystore.password: liferay
xpack.security.transport.ssl.truststore.path: certs/elastic-nodes.p12
xpack.security.transport.ssl.truststore.password: liferay
xpack.security.transport.ssl.verification_mode: certificate

## TLS/SSL settings for HTTP layer
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.keystore.path: certs/elastic-nodes.p12
xpack.security.http.ssl.keystore.password: liferay
xpack.security.http.ssl.truststore.path: certs/elastic-nodes.p12
xpack.security.http.ssl.truststore.password: liferay

# For Kibana
xpack.monitoring.collection.enabled: true