Pages

Thursday, September 19, 2013

Weblogic : Migrating Web logic Managed Nodes from One Physical machine to another

There are couple of things that we need to manage when we are dealing with the Migration of Managed Nodes.

When Ever We migrate a Weblogic domain, the files that are available by default are

All files and directories in the source domain are included, leaving these:
Temporary files that are created when you start a server
The servers directory
Files in the security directory that are created automatically when you create the domain, such as DefaultAuthenticatorInit.ldift and XACMLRoleMapperInit.ldift

The most important thing is that if you configure any of the user,groups or roles using the Weblogic admin console , they are stored inside the ldap and are not available when migrating.
We first need to export the data and them import it for the new Domain on other Machine.

When We migrate a Managed Node , we have
  • All files in the root directory with the following extensions: .cmd, .sh, .xml, .properties, and.ini.
  • Any files with the.pem extension defined in the SSL configuration for your domain
  • bin directory
  • lib directory
  • All files and subdirectories in the config directory
  • The following files and directories are not included in a managed server template by default:
  • Applications and certain application initialization files
  • Temporary files that are created when you start a server
  • The servers directory
  • Files in the security directory that are created automatically when you create the domain, such as DefaultAuthenticatorInit.ldift and XACMLRoleMapperInit.ldift.

Now for creating a template for the managed nodes , we need to pass 'managed=true' element like
[root@vx111a bin]# ./pack.sh -domain=/root/Oracle/Middleware/user_projects/domains/base_domain -template=/root/Oracle/Middleware/user_projects/domains/managerd_domain.jar -template_name="my Domain Template" -log=/root/Oracle/Middleware/user_projects/domains/domain-pack.log -managed=true
<< read domain from "/root/Oracle/Middleware/user_projects/domains/base_domain"
>> succeed: read domain from "/root/Oracle/Middleware/user_projects/domains/base_domain"
<< set config option Managed to "true"
>> succeed: set config option Managed to "true"
<< write template to "/root/Oracle/Middleware/user_projects/domains/managerd_domain.jar"
....................................................................................................
>> succeed: write template to "/root/Oracle/Middleware/user_projects/domains/managerd_domain.jar"
<< close template
>> succeed: close template

and the unpack goes in this way,
[root@vx111a bin]# ./unpack.sh -template=/root/Oracle/Middleware/user_projects/domains/managerd_domain.jar -domain=/root/Oracle/Middleware/user_projects/domains/managed_domain -user_name="weblogic" -password="weblogic1" -server_start_mode="dev" -log=/root/Oracle/Middleware/user_projects/domains/domain-pack1.log
Warning: -server_start_mode for a managed template is ignored
Warning: -user_name for a managed template is ignored
Warning: -password for a managed template is ignored
<< read template from "/root/Oracle/Middleware/user_projects/domains/managerd_domain.jar"
>> succeed: read template from "/root/Oracle/Middleware/user_projects/domains/managerd_domain.jar"
<< set config option DomainName to "base_domain"
>> succeed: set config option DomainName to "base_domain"
<< write Domain to "/root/Oracle/Middleware/user_projects/domains/managed_domain"
...............................................................................................
>> succeed: write Domain to "/root/Oracle/Middleware/user_projects/domains/managed_domain"
<< close template
>> succeed: close template

Note : Be care full with the staged application location , since application files will not be included with the pack command when we are creating a template for the Managed node. This can cause issues when we are using a extenal_stage location. We need to make sure that new domain and managed node we are creating has access permissions to the external Stage location

More To Come , Happy Learning