How to Pack and Unpack the Domain in weblogic

pack and unpack of weblogic domain

While setting up the distributed WebLogic domain infrastructure,   You might have wondered,(as I did)

"how am going to get the another unix machine into my domain and register it or create the managed server in it ?"

Installing the WebLogic and re-creating the domain on the second box/node is not the solution. it would create two individual/identical domains. That's it.!

If you have that question unanswered yet, This post will help you.

This post also helps to those who would like to expand/extend the cluster members (or) nodes in the cluster.

In General, this domain expanding tasks are being done by the scripts named "pack and unpack" it would be available in the "$WLS_HOME/common/bin" location

WLS_HOME  is an environment variable maps to your "wlserver<version>" directory ( this directory is auto created after every successful WebLogic installation)

In my case its /opt/middleware/bea10.3/wlserver_10.3/ , Please refer your directory structure to find the WLS_HOME (or) find in the setDomainEnv.sh (or) Env variables.

To know your WLS_HOME Please refer your WebLogic installation directory structure  (or) find in the setDomainEnv.sh (or) Env variables.

My Domain Setup

mwi_infra

Please refer the preceding domain setup illustration

Now I am going to add two more members in my cluster mwi_ms5 and mwi_ms6  by adding one more machine/unix box named mwilinuxvm03 in my cluster

mwi_new_infra

In the new domain setup illustration, you could see a new box named mwilinuxvm03 with new servers mwi_ms_5 and mwi_ms_6

how to do that?

  1. Install the Java and WebLogic binaries in the new box mwilinuxvm03 ( you could also copy the filesystem from the previous box and achieve the zip distribution like setup )

2. After successful WebLogic installation, you will be having the WLS_HOME on the new Linux server

( You can optionally go to WebLogic console and create new machine and these new servers and do the mapping before doing the next step)

3.  Time to pack the Domain ( from any of the existing boxes vm01 -or- vm02 )

/opt/middleware/bea10.3/wlserver_10.3/common/bin/pack.sh -domain=/opt/middleware/domains/mwi_domain/ -template=/tmp/mwidomain.jar -template_name=remote_managed -managed=true
<< read domain from "/opt/middleware/domains/mwi_domain/"
>> succeed: read domain from "/opt/middleware/domains/mwi_domain"
<< set config option Managed to "true"
>> succeed: set config option Managed to "true"
<< write template to "/tmp/mwidomain.jar"

Copy the mwidomain.jar file to the new server

I have copied the template file mwidomain.jar to the new server have it in the /tmp directory

4. Now  Unpack the copied mwidomain.jar file in the new server

/opt/middleware/bea10.3/wlserver_10.3/common/bin/unpack.sh -domain=/opt/middleware/domains/mwi_domain/ -template=/tmp/mwidomain.jar
<< read template from "/tmp/mwidomain.jar"
>> succeed: read template from "/tmp/mwidomain.jar"
<< set config option DomainName to "mwi_domain"
>> succeed: set config option DomainName to "mwi_domain"
<< write Domain to "/opt/middleware/domains/mwi_domain/"
...............................................................................................
>> succeed: write Domain to "/opt/weblogic/domains/mwi_domain/"
<< close template
>> succeed: close template

If you have not done the managed server and machine creation yet , you can do that in the console and continue with the regular steps like nodemanager configuration etc.

Note*: As I want to cover only the PACK and UNPACK. I am leaving rest of the cluster expansion tasks

Please let me know if you have any questions in the comment. I would be happy to help.

Hope it helps.

Thanks,

A K S A R A V