引言
在本系列文章的前兩篇,我們分別介紹了開發(fā)環(huán)境從版本 7 到版本 8 的遷移和生產(chǎn)環(huán)境從版本 7 到版本 8 的遷移。本篇文章作為本系列文章的最后一篇,介紹了集群環(huán)境從版本 7 到版本 8 的遷移。集群主要起到故障轉(zhuǎn)移(failover)和負(fù)載均衡的作用。
集群遷移的大致步驟是:從版本 7 的集群環(huán)境,先遷移到版本 8 的 standalone 的環(huán)境,遷移成功后,在這個(gè) standalone 的環(huán)境上搭建集群,完成后驗(yàn)證集群能正常工作。
圖 1. 集群環(huán)境遷移計(jì)劃總覽

準(zhǔn)備測(cè)試環(huán)境
在本文中,我們從已經(jīng)遷移成功的版本 8 的 standalone 環(huán)境開始,介紹了在此基礎(chǔ)上搭建集群環(huán)境的詳細(xì)步驟。
表 1. 測(cè)試環(huán)境
操作系統(tǒng)數(shù)據(jù)庫WASWCSwindows2012DB2 v10.5 Fix Pack 5WAS 8.5.5.7Enterprise 8.0.0.0創(chuàng)建 Deployment Manager
打開 Profile Management Tool 概要文件管理工具創(chuàng)建 Deployment Manager,如
C:\IBM\WebSphere\AppServer\bin\ProfileManagement\pmt.bat。 指定要?jiǎng)?chuàng)建的環(huán)境類型為 Management。然后指定要?jiǎng)?chuàng)建的 server 類型為 Deployment manager。概要文件創(chuàng)建方式選擇 Advanced profile creation。
圖 2. 選擇要部署的應(yīng)用

然后指定概要文件的名字和位置,如 Dmgr01 和 c:\WebSphere\AppServer\Profiles\Dmgr01。進(jìn)入到下一步。
圖 3. 指定節(jié)點(diǎn)名字,主機(jī)名,單元名

圖 4. 安全

圖 5. 創(chuàng)建安全證書一

圖 6. 創(chuàng)建安全證書二

下一步指定端口值。然后進(jìn)入到下一步。
圖 7. 指定是否用 Windows service 來運(yùn)行 WebSphere Application server

聯(lián)合 WebSphere Commerce 到單元
啟動(dòng) Deployment Manager 概要文件
聯(lián)合 WebSphere Commerce 到單元
等待聯(lián)合過程成功結(jié)束。
重新配置單元(ReconfigureCell)
在創(chuàng)建 WebSphere Commerce 實(shí)例的時(shí)候,創(chuàng)建了 WebSphere Application Server 應(yīng)用服務(wù)器概要文件,如 demo,并且將 WebSphere Commerce EAR 安裝到了概要文件的服務(wù)器上(如 server1)和其它單元級(jí)別的配置對(duì)象上。
一旦 WebSphere Commerce 實(shí)例所在的節(jié)點(diǎn)聯(lián)合到了 deployment manager 的單元上,之前那些關(guān)于實(shí)例的單元級(jí)別的配置對(duì)象沒有更新到 deployment manager 的單元上,我們需要運(yùn)行如下步驟重新配置實(shí)例到新的單元上。
打開文件 [WC_installdir]/instances/[instance_nam e ]/xml/[instance_name.xml]
更新 AdminUser 和 AdminPwd 這兩個(gè)參數(shù)為 DMGR 的用戶名和密碼。
運(yùn)行如下命令:
[WC_installdir]/bin/config_ant.bat -DinstanceName=[instance_name] ReconfigureCell
重新生成 web server plugin
登陸到 WAS Network Deployment Administration Console
點(diǎn)開 Servers > Server Types > Web servers
勾選 webserver1 然后點(diǎn)擊按鈕 Generate Plug-in 來生成 plugin-cfg.xml 文件
拷貝這個(gè)更新過的 plugin-cfg.xml 文件到你的 web server
檢查 httpd.conf,如 C:\WebSphere\CommerceServer80\instances\demo\httpconf。確認(rèn) plugin-cfg.xml 的路徑是正確的
重新啟動(dòng) web server
登陸 store,store 此時(shí)能正常工作
聯(lián)合 webSphere Commerce Search 到單元
啟動(dòng) Deployment Manager 概要文件
運(yùn)行如下命令將 webSphere Commerce Search 聯(lián)合到單元
c:\WebSphere\AppServer\profiles\demo_solr\bin>addNode.bat localhost 8879 -includeapps -username configadmin -password config1mgr