在您設定次要資料中心之前,請先為叢集間的 Elasticsearch 和 Ehcache 複寫設定主要資料中心。
執行這項作業的原因和時機
Elasticsearch 和 Ehcache 內嵌於VMware Identity Manager虛擬應用裝置中。Elasticsearch 是一個用於稽核、報告和目錄同步記錄的搜尋和分析引擎。Ehcache 可提供快取功能。
請在主要資料中心叢集的所有節點中設定這些變更。
先決條件
您已在主要資料中心中設定 VMware Identity Manager叢集。
程序
- 針對複寫設定 Elasticsearch。
- 設定 Elasticsearch 外掛程式的 Java 路徑。
vi ~/bash_profile
將以下幾行新增至檔案中:
JAVA_HOME=/usr/java/jre-vmware/
export JAVA_HOME
export PATH=$PATH:$JAVA_HOME
儲存檔案。
執行下列命令:
. ~/bash_profile
- 列出並移除 Elasticsearch 外掛程式。
/opt/vmware/elasticsearch/bin/plugin -l
/opt/vmware/elasticsearch/bin/plugin -r discovery-idm
- 新增主要資料中心內所有節點的 IP 位址。
vi /opt/vmware/elasticsearch/config/elasticsearch.yml
discovery.zen.ping.unicast.hosts: [“IPaddress1”,“IPaddress2”,“IPaddress3”]
- 重新啟動 Elasticsearch 服務。
service elasticsearch restart
- 將次要資料中心叢集的負載平衡器 FQDN 新增至 /usr/local/horizon/conf/runtime-config.properties 檔案。
編輯 /usr/local/horizon/conf/runtime-config.properties 檔案。
vi /usr/local/horizon/conf/runtime-config.properties
將此行新增至檔案中:
analytics.replication.peers=https://LB_FQDN_of_second_cluster
- 針對複寫設定 Ehcache。
vi /usr/local/horizon/conf/runtime-config.properties
新增叢集中其他節點的 FQDN。請勿為您正在編輯的節點新增 FQDN。多個 FQDN 請以冒號分隔。
ehcache.replication.rmi.servers=node2FQDN:node3FQDN
例如:
ehcache.replication.rmi.servers=server2.example.com:server3.example.com
- 如果您打算設定使用內建 KDC 的 iOS 版行動 SSO 驗證,請在主要資料中心叢集的每個節點中進行下列變更。
- 開啟 runtime-config.properties 檔案進行編輯。
vi /usr/local/horizon/conf/runtime-config.properties
- 新增叢集中的所有節點並以冒號分隔。
components.kdc.servers=node1FQDN:node2FQDN:node3FQDN
備註︰
如果您使用混合 KDC 功能,則不需執行此步驟。
- 在所有節點上重新啟動 VMware Identity Manager服務。
service horizon-workspace restart
- 在第一個叢集中的所有節點上執行下列命令,以確認叢集已正確設定。
curl 'http://localhost:9200/_cluster/health?pretty'
用來確認 Elasticsearch 健全狀況的命令應該會傳回如下的結果。
{
"cluster_name" : "horizon",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 3,
"number_of_data_nodes" : 3,
"active_primary_shards" : 20,
"active_shards" : 40,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0
}
如果發生問題,請參閱疑難排解 Elasticsearch。
下一步
在次要資料中心建立叢集。從主要資料中心叢集匯出第一個 VMware Identity Manager虛擬應用裝置的 OVA 檔案,並使用此檔案在次要資料中心中部署新的虛擬應用裝置以建立節點。