Creating Templates and Domains Using the pack and unpack Commands

     Previous  Next    Open TOC in new window  Open Index in new window  View as PDF - New Window  Get Adobe Reader - New Window
Content starts here

pack and unpack Command Descriptions

The following sections describe the pack and unpack commands:

 


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.

When you create this type of template . . .
The following occurs . . .
Domain
All files and directories in the source domain are included, with the following exceptions:
  • 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.

Note: If you configured additional security data, such as for users, groups, or roles, through the WebLogic Server Administration Console or other online tools, the security data is stored in the LDAP server and is not included in the template. You must first export the data and then import it into the target domain.

Managed Server (using the -managed=true option)
The following files and directories are included by default:
  • 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.

Note: The config.xml file of the domain from which you are creating your template must contain Managed Server definitions that specify the IP address and port for the target remote machine. The Managed Server template that you create from that domain can only be used, with the unpack command, on the specified remote machines to create Managed Server domain directories for the Managed Servers defined in the config.xml file.

Syntax

pack -domain=domain -template=template -template_name="template_name"
[-template_author="author"][-template_desc="description"]
[-managed={true|false}][-log=log_file] [-log_priority=log_priority]

Parameter Descriptions

The following table describes the parameters that can be used with the pack command.

Table 2-1 Parameters for pack Command 
Parameter
Description
The following parameters are required:
-domain=domain
The full or relative path to the domain from which the template is to be created.
-template=template
The full or relative path and filename of the template to be created. The template filename must include the .jar extension.
-template_name="template_name"
Descriptive name for the template. Quotes are required only if the value for this parameter contains spaces.
The following parameters are optional:
-template_author="author"
The name of the author of the template. Quotes are required only if the value for this parameter contains spaces.
-template_desc="description"
Description of the template. Quotes are required only if the value for this parameter contains spaces.
-managed={true|false}
Specifies whether the template is to be used to create Managed Servers on remote machines. The default is false.
When this parameter is set to true, a Managed Server template is created that contains a minimal set of files, including SerializedSystemIni.dat, config.xml, and nm_password.properties. It also includes a domain.properties file that is unique to the Managed Server template.
Applications and certain application initialization files are not included.
The resulting template can be used to create Managed Servers on remote machines.
-log=log_file
Name of the log file.
-log_priority=log_priority
The priority setting for the log file. Use a log4j priority string. Valid log4j priority strings are debug, info, warn, error, fatal. The priority string values correspond to the levels defined in the Level class. For more information, see http://logging.apache.org/log4j/docs/api/org/apache/log4j/Level.html.

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 directory C:\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"

Related Topics

 


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:

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.

For more information about using the pack and unpack commands to create a Managed Server domain directory, see Creating and Starting a Managed Server on a Remote Machine: Main Steps.

Syntax

unpack -template=template -domain=domain [-user_name=username]
[-password=password] [-app_dir=application_directory]
[-java_home=java_home_directory] [-server_start_mode={dev|prod}]
[-log=log_file] [-log_priority=log_priority]

Parameter Descriptions

The following table describes the parameters that can be used with the unpack command.

Table 2-2 Parameters for unpack Command 
Parameter
Description
The following parameters are required:
-template=template
The full or relative path and filename of the template being used to create the domain.
-domain=domain
The full or relative path to the domain to be created.
The following parameters are optional:
-user_name=username
-password=password
The username and password for the default administrator as currently defined in the template. This username/password combination is used to boot the Administration Server and connect to it. If you specify a new password for the default administrator, the password will be reset to the value specified.

Note: If a password for the default administrator is not defined in the template, you must specify one.

If no administrative users are defined in the template, you can create a new default administrator by specifying the -user_name and -password parameters.
If a default administrator and password are currently defined in the template, you can add a new administrative user by specifying the -user_name and -password parameters.
A valid username cannot include commas, tabs, or any characters in the following list: < > # | & ? ( ) { }. Usernames are case sensitive.
A valid password consists of a string of at least 8 case-sensitive characters. The unpack command encrypts the password value.

Note: These parameters are not applicable if you are creating a domain using a Managed Server template.

-app_dir=application_directory
The full path to the directory used to store the applications defined in the template.

Note: This parameter is only applicable if the template supports a separate applications directory.

-java_home=java_home_directory
The full path to the Java Home directory. When set, this identifies the default JVM used by the Administration Server for the domain.

Note: This parameter is not applicable if you are creating a domain using a Managed Server template.

-server_start_mode={dev|prod}
The start mode for the Administration Server: development or production.

Note: This parameter is not applicable if you are creating a domain using a Managed Server template.

-log=log_file
Name of the log file.
-log_priority=log_priority
The priority setting for the log file. Use a log4j priority string. Valid log4j priority strings are debug, info, warn, error, fatal. The priority string values correspond to the levels defined in the Level class. For more information, see http://logging.apache.org/log4j/docs/api/org/apache/log4j/Level.html.

Example

Executing 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 directory C:\bea\user_projects\domains.

unpack -template=C:\bea\user_templates\mydomain.jar -domain=C:\bea\user_projects\domains\my_new_domain

Related Topics


  Back to Top       Previous  Next