Tuesday, 26 July 2011

Weblogic domain migration made easy by WLST

Huge migrations will be done in short time. This will save lot of time, which consumes for configuring each system resource, user-defined resource on the domain. The customized WebLogic domain templates can be used for the following situations:

This new feature is introduced from WebLogic 9.x onwards, we have wonderful options in WLST.
1. Default template to customized domain template
2. Existing Domain to customized domain template then domain
3. Domain Template from WebLogic 9.x to WebLogic 10.x domain and also supports this from WebLogic 10.x to WebLogic 11g migration process.
4. WebLogic Domain migrations from one machine to another


Let me explain my current experiment on Creating new WebLogic 11g Domain from existing WebLogic 9.2 domain. The basic steps I followed in offline are as :
1. creating template: readDomain() from the existing WebLogic 9.2 and create a domain template with writeTemplate().
2. configuring new domain: go to the destination machine and readTemplate(), writeDomain()
3. updating for new domain: readDomain() and then modify the ListenAddress, ListenPort, security settings, and Log details for the domain
4. after making all required changes use updateDomain()

468x60

This will reduce the pain of creating
1. DataSource
3. Multi DataSource
4. JMS module
5. Persistence store
6. Start scripts
7. Domain environment automatically updated

Configure new domain templates

A domain configured from an existing development server to new machine. all the domain files are hoped to new machine, but certain parameters dependent on the local configurations. Such as listen address for the admin server, here is the need of WLST in offline mode to rectify the current environment. readDomain() is the WLST command that gives the access to current configuration and reproduce that domain template with writeTemplate().

Source machine:

  1. readDomain('/home/domains/olddomain')  
  2. writeTemplate('/home/templatepath/olddomain.jar')  
  3. closeDomain()  
Now you can copy this template olddomain.jar file to destination machine and copy to the destination location. Execute following offline command sequence as follows:
  1. createDomain('/olddoamin/path/template.jar’,’domainPath’,’user’, ‘passwd’)  

For further updates you need to update one of the parameter that will make all the environment scripts updated for this new domain with new environment, So don't forget to update one of these following values:

  1. readTemplate('/home/templatepath/olddomain.jar')  
  2. writeDomain('/home/domains/newdomain')  
  3. closeTemplate()  
  4. readDomain('/home/domains/newdomain')  
  5. ls()  
  6. cd('Server')  
  7. ls()  
  8. cd('AdminServer')  
  9. set('ListenAddress','hostname.com')  
  10. set('ListenPort',10300# Changing Admin Server ListenPort  
  11. set('Name','newAdmin'# Changing Admin server name  
  12.   
  13. cd('/Server/newAdmin/Log/newAdmin')  
  14. set('FileName','/home/instances/newAdmin/logs/newAdmin.log')  
  15. updateDomain()  
  16. closeDomain()  Let me explain my current experiment on Creating new WebLogic 11g Domain from existing WebLogic 9.2 domain. The basic steps I followed in offline are as :
    1. creating template: readDomain() from the existing WebLogic 9.2 and create a domain template with writeTemplate().
    2. configuring new domain: go to the destination machine and readTemplate(), writeDomain()
    3. updating for new domain: readDomain() and then modify the ListenAddress, ListenPort, security settings, and Log details for the domain
    4. after making all required changes use updateDomain()

    468x60

    This will reduce the pain of creating
    1. DataSource
    3. Multi DataSource
    4. JMS module
    5. Persistence store
    6. Start scripts
    7. Domain environment automatically updated

    Configure new domain templates

    A domain configured from an existing development server to new machine. all the domain files are hoped to new machine, but certain parameters dependent on the local configurations. Such as listen address for the admin server, here is the need of WLST in offline mode to rectify the current environment. readDomain() is the WLST command that gives the access to current configuration and reproduce that domain template with writeTemplate().

    Source machine:
    1. readDomain('/home/domains/olddomain')  
    2. writeTemplate('/home/templatepath/olddomain.jar')  
    3. closeDomain()  
    Now you can copy this template olddomain.jar file to destination machine and copy to the destination location. Execute following offline command sequence as follows:
    1. createDomain('/olddoamin/path/template.jar’,’domainPath’,’user’, ‘passwd’)  

    For further updates you need to update one of the parameter that will make all the environment scripts updated for this new domain with new environment, So don't forget to update one of these following values:

    1. readTemplate('/home/templatepath/olddomain.jar')  
    2. writeDomain('/home/domains/newdomain')  
    3. closeTemplate()  
    4. readDomain('/home/domains/newdomain')  
    5. ls()  
    6. cd('Server')  
    7. ls()  
    8. cd('AdminServer')  
    9. set('ListenAddress','hostname.com')  
    10. set('ListenPort',10300# Changing Admin Server ListenPort  
    11. set('Name','newAdmin'# Changing Admin server name  
    12.   
    13. cd('/Server/newAdmin/Log/newAdmin')  
    14. set('FileName','/home/instances/newAdmin/logs/newAdmin.log')  
    15. updateDomain()  
    16. closeDomain() 

















.

No comments:

Post a Comment