前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Migrating to WebSphere 9

Migrating to WebSphere 9

作者头像
绿巨人
发布2018-05-16 17:59:43
9090
发布2018-05-16 17:59:43
举报
文章被收录于专栏:绿巨人专栏绿巨人专栏

Migrating to WebSphere 9

Make a migration plan

Requirements

  • Migrate WebSphere profiles into the new WebSphere
  • Keep profiles' locations as the original path

Prepare

  • Install the new WebSphere
  • Setup variables At first, we need to record variables related to the migration.
代码语言:javascript
复制
set WAS_HOME_Old=C:\IBM\WebSphere\AppServer
set WAS_Root_New=C:\IBM\WebSphere9
set WAS_HOME_New=%WAS_Root_New%\AppServer
set Dmgr_Profile_Path=C:\Product\profiles\xxxDmgr
set Dmgr_Profile_Name=xxxDmgr
set Prod_Cell_Name=xxxCell
set Prod_Ear=xxx.ear
set Node_Profile_Path=C:\Product\profiles\xxxNode1
set Node_Profile_Name=xxxNode1
set DmgrHost=localhost
set DmgrPort=8879
set DmgrUser=admin
set DmgrPassword=password
  • Stop all services of the old WebSphere

Migrating

Overall steps

  • Copy extension library
  • Backup source profiles
  • Migrate from source profiles
  • Move source profiles, we will create new profiles at same places
  • Create target profiles
  • Migrate to target profiles
  • Sync nodes
  • Some post steps may need

Copy extension library

Copy old WebSphere extension libraries which are used by existing servers into the new WebSphere.

代码语言:javascript
复制
echo Copy extension library
copy "%WAS_HOME_Old%\lib\ext\*.*" "%WAS_HOME_New%\lib\ext\"

Backup source profiles

代码语言:javascript
复制
pushd "%WAS_HOME_Old%\bin"

echo Create profile backup folders
mkdir %WAS_HOME_Old%\profilesBackup

echo Backup source profiles
call backupConfig.bat "%WAS_HOME_Old%\profilesBackup\MigrationBackup_%Dmgr_Profile_Name%.zip" -nostop -profileName %Dmgr_Profile_Name%
call backupConfig.bat "%WAS_HOME_Old%\profilesBackup\MigrationBackup_%Node_Profile_Name%.zip" -nostop -profileName %Node_Profile_Name%

popd

Migrate from source profiles

代码语言:javascript
复制
pushd "%WAS_HOME_New%\bin"

echo Migrate from source profiles
call WASPreUpgrade.bat "%WAS_Root_New%\WSMigration\%Node_Profile_Name%" "%WAS_HOME_Old%" -oldProfile %Node_Profile_Name% -keepDmgrEnabled false
call WASPreUpgrade.bat "%WAS_Root_New%\WSMigration\%Dmgr_Profile_Name%" "%WAS_HOME_Old%" -oldProfile %Dmgr_Profile_Name% -keepDmgrEnabled false -username %DmgrUser% -password %DmgrPassword%
popd

Move source profiles

代码语言:javascript
复制
echo Move source profiles
rename "%Dmgr_Profile_Path%" %Dmgr_Profile_Name%_Old
rename "%Node_Profile_Path%" %Node_Profile_Name%_Old

Create target profiles

代码语言:javascript
复制
pushd "%WAS_HOME_New%\bin"

echo Create target profiles
call manageprofiles.bat -create -profileName %Dmgr_Profile_Name% -profilePath "%Dmgr_Profile_Path%" -templatePath management -nodeName %Dmgr_Profile_Name%Node -cellName %Prod_Cell_Name%

call manageprofiles.bat -create -profileName %Node_Profile_Name% -profilePath "%Node_Profile_Path%" -templatePath managed -nodeName %Node_Profile_Name% -dmgrHost %DmgrHost% -dmgrPort %DmgrPort% -dmgrAdminUserName %DmgrUser% -dmgrAdminPassword %DmgrPassword%,-cellName %Prod_Cell_Name% -federateLater true

popd

Migrate to target profiles

代码语言:javascript
复制
pushd "%WAS_HOME_New%\bin"

echo Migrate to the deployment manager profile
call WASPostUpgrade.bat "%WAS_Root_New%\WSMigration\%Dmgr_Profile_Name%" -oldProfile %Dmgr_Profile_Name% -profileName %Dmgr_Profile_Name% -setPorts useOld -resolvePortConflicts incrementCurrent -includeApps true -keepAppDirectory true -keepDmgrEnabled true -clone false

call startManager.bat

echo Migrate to the node profile
call WASPostUpgrade.bat "%WAS_Root_New%\WSMigration\%Node_Profile_Name%" -oldProfile %Node_Profile_Name% -profileName %Node_Profile_Name% -setPorts useOld -resolvePortConflicts incrementCurrent -keepDmgrEnabled true -username %DmgrUser% -password %DmgrPassword% -clone false

popd

NOTE: There is another choice to use switch "-includeApps script", if in this case, we need to run the following command manually to install applications. cd /d "%WAS_Root_New%\WSMigration%Dmgr_Profile_Name%" "%WAS_HOME_New%\bin\wsadmin.bat" -f "install_%Prod_Ear%.jy" -CONNTYPE none -lang jython"

Sync nodes

代码语言:javascript
复制
pushd "%Node_Profile_Path%"\bin

rem node agent disablement reversal
if exist "%Dmgr_Profile_Path%\config\cells\%Prod_Cell_Name%\nodes\%Node_Profile_Name%\serverindex.xml_disabled" (
    echo Node agent disablement reversal
    rename "%Dmgr_Profile_Path%\config\cells\%Prod_Cell_Name%\nodes\%Node_Profile_Name%\serverindex.xml" serverindex.xml_nonagent
    rename "%Dmgr_Profile_Path%\config\cells\%Prod_Cell_Name%\nodes\%Node_Profile_Name%\serverindex.xml_disabled" serverindex.xml
)

echo Sync node
call SyncNode.bat %DmgrHost% %DmgrPort% -username %DmgrUser% -password %DmgrPassword%

echo Remove jsp built folders
for /D %%i in (%Node_Profile_Path%\installedApps\%Prod_Cell_Name%\%Prod_Ear%\*) DO (
    if exist  "%%i\WEB-INF\classes" (
        echo Clear jsp classes "%%i\WEB-INF\classes"
        del /F /S /Q "%%i\WEB-INF\classes\*"
    )
)
popd

NOTE: default node agent is disabled, we need to enable node agent. NOTE: Removing jsp cache will avoid jsp errors during application initialize.

Post steps of migration

  • Remove old Windows services of the product
  • Add new Windows services for the product
  • Reset any arguments whose values are related to WebSphere location in the WebSphere Server
  • Set JAVA_HOME if need

End

  • Uninstall the old version WebSphere
  • Remove the backup folders to save disk
代码语言:javascript
复制
%WAS_HOME_Old%\profilesBackup
%WAS_Root_New%\WSMigration
%Dmgr_Profile_Path%_Old
%Node_Profile_Path%_Old

Frequent Issues

Node agent failed to start

  • Symptom We can find following message is the node agent SystemOut.log file
代码语言:javascript
复制
com.ibm.ws.naming.distcos.NameSpaceConfigurationException: Missing host name info in bootstrap address of server "nodeagent" in node "<Node Name>".
  • Cause Node agent is disabled default.
  • Solution Enable node agent and sync node If there is a serverindex.xml_disabled file in the deployment manager configuration, remove serverindex.xml and rename serverindex.xml_disabled as serverindex.xml. Run SyncNode.bat from the node profile bin folder.
代码语言:javascript
复制
echo node agent disablement reversal
if exist "%Dmgr_Profile_Path%\config\cells\%Prod_Cell_Name%\nodes\%Node_Profile_Name%\serverindex.xml_disabled" (
    echo Node agent disablement reversal
    rename "%Dmgr_Profile_Path%\config\cells\%Prod_Cell_Name%\nodes\%Node_Profile_Name%\serverindex.xml" serverindex.xml_nonagent
    rename "%Dmgr_Profile_Path%\config\cells\%Prod_Cell_Name%\nodes\%Node_Profile_Name%\serverindex.xml_disabled" serverindex.xml
)

pushd "%Node_Profile_Path%"\bin
echo Sync node
call SyncNode.bat %DmgrHost% %DmgrPort% -username %DmgrUser% -password %DmgrPassword%
popd

References

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2017-06-13 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Migrating to WebSphere 9
    • Make a migration plan
      • Requirements
      • Prepare
    • Migrating
      • Overall steps
      • Copy extension library
      • Backup source profiles
      • Migrate from source profiles
      • Move source profiles
      • Create target profiles
      • Migrate to target profiles
      • Sync nodes
      • Post steps of migration
    • End
      • Frequent Issues
        • Node agent failed to start
      • References
      领券
      问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档