pack
and unpack
commands. The pack
and unpack
commands provide a simple, one-step method for creating domains and templates from the command line. They do not, however, allow you to customize the contents of your domain or template in the same way as the other tools.The command is residding at wlserver/common/bin
Although the
pack
command does not allow you to customize the contents of your template in the same way as the Domain Template Builder, it is a useful tool for quickly creating the following:- A domain template that contains a snapshot of an entire working domain that has been customized through the Administration Console, Configuration Wizard, or WebLogic Scripting Tool (WLST). This template can then be used to create a domain using
unpack
, the Configuration Wizard, or WebLogic Scripting Tool (WLST) Offline. - A Managed Server template that contains a subset of the files in a domain that are required to create a Managed Server domain directory hierarchy on a remote machine. You can then use
unpack
to create the Managed Server domain directory on the remote machine.
- Domain template—defines the full set of resources within a domain, including infrastructure components, applications, services, security options, and general environment and operating system options. Using the
pack
command, you can create a domain template from an existing domain. A domain template is used to create a new domain. - Managed Server template—defines the subset of resources within a domain that are required to create a Managed Server domain directory on a remote machine. You create a Managed Server template using the
pack
command, with the-managed=true
option. Subsequently, when you use the Managed Server template with theunpack
command, the Managed Server domain directory that is created contains sufficient bootstrap information to start the Managed Server on the remote machine. You can start the Managed Server on the remote machine in either of two ways: using Node Manager, or using customized start scripts created when you unpacked the template on the remote machine.
pack
The
pack
command creates a template archive (.jar
) file that contains a snapshot of either an entire domain or a subset of a domain. You can use a template that contains a subset of a domain to create a Managed Server domain directory hierarchy on a remote machine.The following table describes the files and directories that are included in both domain and Managed Server templates.
| |||
|
Example
Executing the following command using a domain named
mydomain
in the directory C:\bea\user_projects\domains
creates a template file named mydomain.jar
in the directoryC:\bea\user_templates
. The name of the template is specified as My WebLogic Domain
.pack -domain=C:\bea\user_projects\domains\mydomain
-template=C:\bea\user_templates\mydomain.jar -template_name="My WebLogic Domain"
unpack
Creates a full domain or a subset of a domain used for a Managed Server domain directory on a remote machine. You may use
unpack
only with a template compatible with your current installation. The template can be any of the following:- A domain template provided by BEA and packaged with your current installation
- A domain template created using the Domain Template Builder or WLST Offline
- A domain template created using the
pack
command - A Managed Server template created using the
pack
command. A Managed Server template, by default, contains only the files necessary for creating a Managed Server domain directory.
When you use the
unpack
command with a domain template, it creates a domain containing all of the application and resource files defined in the template. It also creates necessary start scripts, and certain security and configuration files.When you use the
unpack
command with a Managed Server template, it creates a Managed Server domain directory that includes the following:An entry for the Managed Server domain directory is also created in the
NM_HOME
/nodemanager.domains
file, where NM_HOME
designates the Node Manager installation directory for the product installation on the remote machine. By default, this directory is located in WL_HOME
/common/nodemanager
, for example, C:\bea\weblogic92\common\nodemanager\nodemanager.domains
.Note: | By default, application files are not included in a Managed Server template created using the pack command. If an application in the domain from which you created a Managed Server template was deployed using external_stage mode, the Managed Server domain directory that you create with the unpack command will not contain any of the external_staged applications. Before you start the Managed Server, you will need to make sure that it has access to the externally staged application files. For more information, see Controlling Deployment File Copying with Staging Modes in Deploying Applications to WebLogic Server.ExampleExecuting the following command using a template named mydomain.jar in the directory C:\bea\user_templates creates a domain named my_new_domain in the directoryC:\bea\user_projects\domains .unpack -template=C:\bea\user_templates\mydomain.jar -domain=C:\bea\user_projects\domains\my_new_domain Use pack to Create a Managed Server Template
|