Clone WebSphere

, , 6 Comments

#1 – Create deployment manager on the target machine

  1. /usr/IBM/WebSphere/AppServer/bin/manageprofiles.sh -create -profileName Dmgr01 -templatePath /usr/IBM/WebSphere/AppServer/profileTemplates/management -serverType DEPLOYMENT_MANAGER -nodeName wstestapp-dm -cellName WC_comm01_cell -hostName localhost
  2. Review log file, /usr/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/AboutThisProfile.txt
  3. Make note of the “Managment SOAP connector port” as it’ll be used to federate, synchronize and change the node.
Application server environment to create: Management
Location: /usr/IBM/WebSphere/AppServer/profiles/Dmgr01
Disk space required: 30 MB
Profile name: Dmgr01
Make this profile the default: True
Node name: wstestapp-dm
Cell name: WC_comm01_cell
Host name: wsdevapp
Enable administrative security (recommended): False
Administrative console port: 9060
Administrative console secure port: 9043
Management bootstrap port: 9809
Management SOAP connector port: 8879
Run Management as a service: False

#2 – Create the nodes you want to move over on the target machine. These nodes need to have the same name as the nodes on the source machine but do not use the same cell name.

  1. /usr/IBM/WebSphere/AppServer/bin/manageprofiles.sh -create -profileName comm01 -templatePath /usr/IBM/WebSphere/AppServer/profileTemplates/managed -nodeName wstestapp-node -cellName bogusCellName -hostName localhost
  2. Review log file, /usr/IBM/WebSphere/AppServer/profiles/comm01/logs/AboutThisProfile.txt
Application server environment to create: Custom
Location: /usr/IBM/WebSphere/AppServer/profiles/comm01
Disk space required: 10 MB
Profile name: comm01
Make this profile the default: False
Node name: wstestapp-node
Host name: wsdevapp
Federate to deployment manager: False

#3 – Start the deployment manager created in step #1 in order to federate the node created in step #2.

/usr/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/startManager.sh

#4 – Federate the node created in step #2 on the target machine.

/usr/IBM/WebSphere/AppServer/profiles/comm01/bin/addNode.sh localhost 8879

#5 – Stop the node on the target machine.

/usr/IBM/WebSphere/AppServer/profiles/comm01/bin/stopNodes.sh

#6 – Stop the deployment manager on the target machine

/usr/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/stopManager.sh

#7 – Run a backup of the deployment manager on the source machine. Ensure that you add the “-nostop” option.

/usr/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/backupConfig.sh /tmp/Dmgr01.zip -nostop

#8 – Restore the deployment manager configuration from the backup in the previous step to the target machine.

/usr/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/restoreConfig.sh /tmp/Dmgr01.zip

#9 – Edit the following files to the correct host name of the target machine.

  1. /usr/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/WC_comm01_cell/nodes/wstestapp-node/serverindex.xml
  2. /usr/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/WC_comm01_cell/nodes/wstestapp-dm/serverindex.xml
  3. /usr/IBM/WebSphere/AppServer/profiles/Dmgr01/properties/wsadmin.properties
  4. /usr/IBM/WebSphere/AppServer/profiles/comm01/properties/wsadmin.properties

#10 – Start the deployment manager on the target machine.

/usr/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/startManager.sh

#11 – Synchronize the node on the target machine.

/usr/IBM/WebSphere/AppServer/profiles/comm01/bin/syncNode.sh localhost 8879

#12 – Start the node on the target machine.

/usr/IBM/WebSphere/AppServer/profiles/comm01/bin/startNodes.sh

#13 – Start the server on the target machine.

/usr/IBM/WebSphere/AppServer/profiles/comm01/bin/startServer.sh server1

#14 – Update the database configuration.

  1. Log into the console at https://wsdevapp.lifeway.org:9043/ibm/console
  2. Go to JDBC providers → comm01 – WebSphere Commerce JDBC Provider → Data Sources → WebSphere Commerce DB2 DataSource comm01 and modify the section, “Common and required data source properties”.
  3. Verify that the “DB2_JDBC_DRIVER_PATH” is correct. Go to Environment → WebSphere variables. Select “All scopes” from the pull down menu at the top and ensure the path points to the correct directory. The difference between dev and test is that the word, “ibm” is all capitalized on dev.
  4. Test the connection by going to JDBC providers → comm01 – WebSphere Commerce JDBC Provider → Data sources and checking the box next to name, WebSphere Commerce DB2 DataSource comm01 and selecting “Test connection”.

#15 – Modify Web Server Configuration

  1. Log into the console at https://wsdevapp.lifeway.org:9043/ibm/console
  2. Go to System administration → Nodes → wstestweb.lifeway.org-node and change the host name under the entry, “Host Name” from ws
  3. Go to Environment → Virtiual host and, one-by-one, select each Virtual Host listed below. After selecting a virtual host, you’ll select Host Aliases and for each of the host names listed change the entry under “Host Name” from wstestweb to wsdevweb. Note that changes are not need for virtual host aliases default_host, admin_host or proxy_host because they use use host name, “*”.
    • Cache Monitor
    • VH_comm01
    • VH_comm01_Admin
    • VH_comm01_OrgAdmin
    • VH_comm01_Preview
    • VH_comm01_Tools

Copy the plug-in configuration file from test to dev. The name and location of the file are shown below.

/usr/IBM/WebSphere/CommerceServer70/instances/default/httpconf/keyfile.kdb

#16 – Re-generate plug-in and propagate to IHS web server, wsdevweb.lifeway.org.

  1. Log into the console at https://wsdevapp.lifeway.org:9043/ibm/console
  2. Go to Servers → Web servers and check the box next to the name, “webserver1”. Select “Generate Plug-in”.
  3. After the plug-in is generated select, “Propagate Plug-in”.

#17 – Restart web and application services.

  1. Log into wsdevweb as sysadm, switch to the root account and issue the following command(s):
      service ihs stop
    • service ihs start
  2. Log into the application server as wasadmin and restart the application and issue the following command(s):
      /usr/IBM/WebSphere/AppServer/profiles/comm01/bin/stopServer.sh server1
    • /usr/IBM/WebSphere/AppServer/profiles/comm01/bin/startServer.sh server1

#18 – Rename the application node.

Log into the application server as wasadmin and issue the following command(s):

  1. /usr/IBM/WebSphere/AppServer/profiles/comm01/bin/stopServer.sh server1
  2. /usr/IBM/WebSphere/AppServer/profiles/comm01/bin/stopNode.sh
  3. /usr/IBM/WebSphere/AppServer/profiles/comm01/bin/renameNode.sh localhost 8879 wsdevapp-node
  4. Review the log, /usr/IBM/WebSphere/AppServer/profiles/comm01/logs/renameNode.log
  5. /usr/IBM/WebSphere/AppServer/profiles/comm01/bin/syncNode.sh localhost 8879
  6. cp /usr/IBM/WebSphere/AppServer/profiles/Dmgr01/config/cells/WC_comm01_cell/nodes/wstestapp-node/node-metadata.properties /usr/IBM/WebSphere/AppServer/profiles/comm01/config/cells/WC_comm01_cell/nodes/wsdevapp-node/node-metadata.properties

#19 – Update the Commerce application.

Edit the following file(s) and rename any reference from “test” to “dev”. There are references to the application, Mule in this file as well.

  1. /usr/IBM/WebSphere/AppServer/profiles/comm01/installedApps/DefaultCell/WC_comm01.ear/Stores.war/WEB-INF/classes/Lifeway/RSConfig.properties
  2. usr/IBM/WebSphere/AppServer/profiles/comm01/installedApps/DefaultCell/WC_comm01.ear/xml/config/wc-server.xml

Update the EAR.

/usr/IBM/WebSphere/Commerce70/bin/config_ant.sh -DinstanceName=comm01

#20 – Update ActiveMQ Settings

Verify that the following directory exists and that “.jar” files required for ActiveMQ are present. Copy from test if necessary.

/usr/IBM/WebSphere/AppServer/profiles/comm01/installedConnectors/

Modify the JMS providers.

  1. Log into the console at https://wsdevapp.lifeway.org:9043/ibm/console
  2. Go to Resources → JMS → JMS providers. Select “All scopes” from the menu at the top and select ActiveMQ JMS Provider. Change the entry under, “External provider URL to tcp://activemqdev:61616.
  3. Go to Resources → Resource Adapters → ActiveMQ JMS Resource Adapter → Custom Properties. Select ServerURL from the table and change the entry under, “Value” to tcp://activemqdev:61616