Creating Templates By Using the Domain Template Builder

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

Creating Domain Templates by Using the Domain Template Builder

The following topics describe how to create a domain template:

Create a New Template

The Create a New Template window is displayed when you start the Domain Template Builder as described in Starting the Domain Template Builder.

Table 2-1 describes the options that this window provides.

Table 2-1 Directories and Files in the Installation-Level Patch Directory 
Choose this option . . .
When you want to . . .
Create a Domain Template
Create a template that defines the full set of resources within a domain, including infrastructure components, applications, services, security options, and general environment and operating system parameters.
You can the template that you create, as the basis for creating a domain by using the Configuration Wizard, WLST, or the unpack command.
Create an Extension Template
Create a template that defines applications and services that can be used to extend existing domains.
You can import applications and services stored in extension templates into an existing domain by using the Configuration Wizard. For more information, see Creating Extension Templates by Using the Domain Template Builder

Select Create a Domain Template and click Next.

The Select a Template Domain Source window is displayed.

 


Select a Template Domain Source

The Select a Template Domain Source window prompts you to choose the domain or domain template from which you want to create a domain template.

To select an existing domain as the source for the new template:

  1. Select the Select a Domain tab.
  2. Navigate to the directory of the domain from which you want to create a domain template. Valid domain directories are indicated by the Domain directory folder icon icon.
  3. Click Next.
  4. The Domain Template Builder verifies that the directory you selected contains a valid domain.

    Note: If the directory does not contain a valid domain, an error message is displayed.

    The Describe the Template window is displayed.

To select a domain template as the source for the new template:

  1. Select the Select a Template tab.
  2. From the list of templates displayed in the Templates pane, select a template.
  3. The templates displayed for selection are located in the directory specified in the Locate Additional Templates pane. If you want to change the directory, click Browse, and then navigate to the appropriate directory or enter the path manually.

  4. Click Next.
  5. The Describe the Template window is displayed.

 


Describe the Template

The Describe the Template window prompts you to provide a description for the template.

Note: This description will be displayed in the Select a Template pane of the Select a Template Domain Source window.

Table 2-2 describes the fields in the Describe the Template window.

Note: Fields marked with an asterisk are required.
Table 2-2 Describe the Template 
Field
Description
*Name
Enter a valid name for the domain template. The name must be a string of characters, and can include spaces.
Author
Enter the name of the author of the template. The name must be a string of characters, and can include spaces.
Category
Enter the name of the category in which you want this template to be displayed. The name must be a string of characters, and can include spaces.
Description
Enter a description of the domain template. The name must be a string of characters, and can include spaces.

 


Add or Omit Applications

The Add or Omit Applications window is displayed only if applications are included in the template or domain selected in Select a Template Domain Source.

The Add or Omit Applications window allows you to do the following tasks:

By default, the Domain Template Builder includes applications from the domain or template you specified as the source for the template that you are creating. For example:

Note: When you create or extend a clustered domain (by using the Configuration Wizard or WLST) based on a template that contains applications with application-scoped JDBC or JMS resources, you may need to perform certain additional steps after creating or extending the domain. These steps are necessary to ensure that the application and its application-scoped resources are targeted and deployed properly. For more information about targeting and deploying application-scoped modules, see Deploying Applications and Modules with weblogic.deployer.

To add applications in (or omit them from) the template:

  1. In the Applications pane, review the list of applications to be included in your template. By default, all the applications are selected.
  2. The applications displayed reside in the directory specified in the Current Application Path field. The applications are copied into your template from this location.

  3. To change the relative path of the directory into which an application will be imported, do the following:
    1. Select the application in the Applications pane.
    2. In the Imported Application Path field, enter the relative path you want to use after the application is imported into your template.
    3. Note: Some of the applications listed in the Applications pane may be included with the WebLogic products. You cannot change the relative paths for these applications. When you select these applications in the Applications pane, the Imported Application Path field is replaced by an Internal Application Path. Because these files are installed on your system during your product installation, they are not copied into the template at template creation time. When you create a domain by using this template, this path will point to the application files located in your product installation directory.
  4. Deselect the check box for any application that you do not want to include in the template.
  5. Click Next.
  6. The Add Files window is displayed.

 


Add Files

By default, the Domain Template Builder includes files from the domain or template you specified as the source for the new template.

You may also need to include other files from your domain or file system that are required by the applications.

The Add Files window lets you to review, add, or remove files in the template.

After adding and removing files as necessary, click Next.

The Add SQL Scripts window is displayed.

 


Add SQL Scripts

You can add your own SQL scripts to the new template, so that the scripts are available when you create a domain based on the template.

Note: SQL scripts that are included with the product do not need to be added to the template.

The Add SQL Scripts window prompts you to add SQL scripts for each database that you expect to be used with the domains created from this template. You can also specify the order in which the scripts are executed. When you create a domain based on this template, the databases and associated SQL scripts that you include are displayed in the Run Database Scripts window of the Configuration Wizard.

Note: If you use a template as basis for the new template, SQL files that are included in the source template are displayed in the Selected Database Scripts pane, organized by database type.

To add SQL scripts to the template:

  1. In the Database Type and Version pane, select a database from the Type drop-down list.
  2. Select the database version from the Version drop-down list or enter a version number directly in the field.
  3. Click Add SQL File.
  4. The Open dialog box is displayed.

  5. Navigate to the directory that contains the SQL scripts for the selected database.
  6. Select the SQL files to be added, and click Add SQL File(s).
  7. The SQL files that you added are displayed in the Selected SQL Files pane. The Selected Database Scripts pane displays a tree-view of all the databases and associated SQL scripts included in the template.

    You can change the order in which the SQL files are executed by using the Up and Down arrow icons. The specified sequence is reflected in the Selected Database Scripts pane.

  8. Repeat steps 1 through 6 for each database for which you want to include SQL files.
  9. Click Next.

To remove SQL scripts from the template:

  1. From the Type drop-down list in the Database Type and Version pane, select the database for which you want to remove SQL scripts.
  2. Select the database version from the Version drop-down list or enter a version number directly in the field.
  3. The SQL scripts for the selected database displayed in the Selected Database Scripts pane are listed in the Selected SQL Files pane.

  4. In the Selected SQL Files pane, select the SQL file to be removed and click Remove SQL File.
  5. Repeat steps 1 through 3 for each SQL script that you want to remove.
  6. Click Next.
  7. The Configure the Administration Server window is displayed.

    Note: If you are creating an extension template, the next window that is displayed is Security Configuration Options. For more information, see Configuring Security Options.

 


Configure the Administration Server

In every domain, one server must be designated as the administration server: the central point from which the whole domain is managed.

You can access the administrator server by using the URL protocol://listen-address:listen-port. The protocol can be any of the following: t3, t3s, http, https.

You can define the listen-address and listen-port for the administration server in the Configure the Administration Server window of the Domain Template Builder.

For information about the fields of the Configure the Administration Server window, see “Configuring the Administration Server” in Creating WebLogic Domains by Using the Configuration Wizard.

After configuring the administration server, click Next.

The Configure Administrator Username and Password window is displayed.

 


Configure Administrator Username and Password

When you create a domain template, the administrator username and password from the original domain or template are included in your new template. You can modify this username and password if required.

In addition, you can provide extra security for application resources using the following security features:

To modify the administrator username and password:

  1. Specify a valid username in the Username field by clicking within the field and modifying the string displayed there. This name is used to boot the Administration Server and connect to it.
  2. Do not use commas or any characters in the following comma-separated list: \t, < >, #, |, &, ?, ( ), { }. User names are case sensitive.

  3. Specify a valid password in the User password field by clicking within the field and modifying the string displayed there. A valid password must contain at least 8 case-sensitive characters. The password value is encrypted.
  4. Note: Do not use the password=weblogic in a production environment.
  5. Reenter the password in the Confirm user password field.
  6. Optionally, enter a login description for this username.
  7. If you want to configure additional users, groups, and global roles, select Yes at the bottom of the window, and click Next. The Configure Users, Groups, and Global Roles window is displayed.
  8. If you do not want to configure additional users, groups, and global roles, select No, and click Next. The Specify Start Menu Entries window is displayed.

 


Configure Users, Groups, and Global Roles

The Configure Users, Groups and Global Roles window is displayed in the Domain Template Builder in the following circumstances:

Users, groups, and global roles are defined as follows:

The Configure Users, Groups and Global Roles window prompts you to define users, groups, and roles for authentication purposes. You must define at least one user.

Note: Depending on the template or domain selected, one or more users, groups, or roles may be defined already. In addition, WebLogic Server defines a default set of groups and roles. For a list of the default groups and roles defined in WebLogic Server, see Users, Groups, and Security Roles in Securing WebLogic Resources Using Roles and Policies.

To configure users, groups, and global roles:

  1. Select the User tab and review the current user configuration. Add or change entries as required for your domain. To delete a user, click in any of the fields of the relevant row, and click Delete.
  2. Select the Group tab and review the current group configuration. Add or change the entries required for your domain. To delete a group, click in any of the fields of the relevant row, and click Delete.
  3. Select the Role tab and review the current role configuration. The predefined list of WebLogic Server global security roles is displayed. Add or change the entries required for your domain by using the guidelines provided in Table 2-3. To delete a role, click in any of its fields of the relevant row, and click Delete.
WARNING: Do not make the default global security roles for administrative and server resources more restrictive. If you eliminate any existing security roles, you risk degrading WebLogic Server operation. You can, however, make the default security roles more inclusive (for example, by adding new security roles).
Table 2-3 Configure Users, Groups and Global Roles
Field
Description
Name*
Enter a valid name for the role. Do not use blank spaces, commas, hyphens, or any characters in the following comma-separated list: \t, < >, #, |, &, ~, ?, ( ), { }. Security role names are case sensitive.
The default value in this field is new_Role_n, where n specifies a numeric value that is used to differentiate among all default role names; the value of n for the first role is 1. The value is incremented by 1 for each role that is added.
Description
Enter a description of the role to be used for informational purposes only

When you finish updating your settings, click Next.

The Assign Users to Groups window is displayed.

 


Assign Users to Groups

The Assign Users to Groups window prompts you to assign users to groups. It is recommended that you add users to groups, because by managing groups you can manage multiple users more efficiently.

  1. In the Group pane, select the group to which you want to assign users.
  2. The current assignments for the selected group are displayed in the left pane.

  3. In the left pane, do one of the following:
    • To assign a user to the selected group, select the check box for the user.
    • To remove a user from the selected group, clear the check box for the user.
    • To select all users in the list, click Select All. To deselect all users in the list, click Unselect All.

      The list of groups associated with each user is updated to reflect the changes.

  4. Repeat steps 1 and 2 for each user that you want to assign to a group. You can assign a user to more than one group.
  5. Click Next.
  6. The Assign Groups to Groups window is displayed.

 


Assign Groups to Groups

The Assign Groups to Groups window prompts you to designate one group as a subgroup of another, as a means of refining management of security for your domain.

Note: You should not assign groups recursively. For example, do not assign groupA as a subgroup of groupB and groupB as a subgroup of groupA.
  1. In the Group pane, select the group to which you want to assign a subgroup.
  2. The current assignments for the selected group are displayed in the left pane.

  3. In the left pane, do one of the following:
    • To assign a group, as a subgroup, to the selected group, select the check box for the group.
    • To remove a subgroup from the selected group, deselect the check box for the group.
    • To select all groups in the list, click Select All. To unselect all groups in the list, click Unselect All.

      The list of subgroups associated with each group is updated to reflect your changes.

  4. Repeat steps 1 and 2 for each group that you want to designate a subgroup. You can make a group a subgroup of more than one group.
  5. Click Next.
  6. The Assign Users and Group to Global Roles window is displayed.

 


Assign Users and Groups to Global Roles

The Assign Users and Groups to Global Roles window prompts you to assign users and groups to the global security roles defined by WebLogic Server. For a list of the default roles and the privileges that users or groups in these security roles are granted, see Default Global Roles in Securing WebLogic Resources Using Roles and Policies.

Note: You must assign one or more users or groups (containing one or more users) to the administrator role to ensure that there is at least one user who can boot WebLogic Server.
  1. In the Role pane, select the global role to which you want to assign users and groups.
  2. The current assignments for the selected role are displayed in the left pane.

  3. In the left pane, do one of the following:
    • To assign a user or group to the selected role, select the associated check box.
    • To remove a user or group from the selected role, deselect the associated check box.
    • To select all users and groups in the list, click Select All. To unselect all users and groups in the list, click Unselect All.

      The Role list corresponding to each user and group is updated to reflect the global roles to which the user and group are assigned.

  4. Repeat steps 1 and 2 for each user or group that you want to assign to a global role. You can assign a user or group to more than one global role.
  5. Click Next.
  6. The Specify Start Menu Entries window displayed.

    Note: If you are creating an extension template, the next window that is displayed is Prepare Scripts and Files with Replacement Variables. For more information, see Prepare Scripts and Files with Replacement Variables.

 


Specify Start Menu Entries

The Specify Start Menu Entries window prompts you to create items to be added to the Windows Start menu.

The next step depends on the source for the new template that you are creating.

Add, modify, or delete entries as required by your domain, by using the guidelines provided in Table 2-4.

Table 2-4 Specify Start Menu Entries
Field
Description
Shortcut link name
Enter a valid name for the shortcut to be displayed in the Start menu. The name must be a string of characters and it may include the space character.
Program
Specify the program to be run when the shortcut is selected. A list of the programs defined by the template source is shown in the drop-down list. To use a predefined program, select it from the drop-down list.
To specify an alternate program, enter the relative path to it in this field. To ensure that the template is portable, you can use variables such as $USER_INSTALL_DIR$ and $DOMAIN_DIRECTORY$ to specify your program path. For example: $USER_INSTALL_DIR$\server\bin\installNodeMgrSvc.cmd.

Note: Do not specify any executable or script that does not reside in the BEA_HOME directory.

Argument
Enter any parameter that you want to pass to the shortcut program.
Working directory
Enter the path of the directory from which the shortcut will be executed. If you have selected a program from the drop-down list in the Program field, this field is not available.

Note: By default, the working directory is the directory that contains the executable or script. In most cases, you do not need this field.

Description
Enter a description for the shortcut.

To delete an entry, click the tab for the Start menu entry, and click Delete.

When you finish updating your settings, click Next.

The Prepare Scripts and Files with Replacement Variables window is displayed.

 


Prepare Scripts and Files with Replacement Variables

When you are creating a template, you want the scripts and files that you are packaging with your template to be free of local domain environment settings and ready for use by the Configuration Wizard. The Domain Template Builder automatically updates any standard scripts included in a template, such as start scripts, by replacing hard-coded values for various domain environment settings with replacement variables. The Configuration Wizard can later replace these variables with new hard-coded values during the configuration of a new domain.

The Prepare Scripts and Files with Replacement Variables window allows you to replace hard-coded strings with replacement variables in files that have not been updated by the Domain Template Builder.

Note: The check boxes of files that were automatically updated by the Domain Template Builder are selected.

To insert replacement variables into your files:

  1. Open the file in one of the following ways:
    • Double-click the appropriate filename in the Select File list
    • Select the appropriate filename in the list and click Edit
    • The Instructions pane is replaced by an Edit File pane, in which the file is displayed. An editing toolbar is provided at the top of the Edit File pane.

  2. To insert a replacement variable:
    1. Select the string to be replaced.
    2. Click the right mouse button; a list of replacement variables is displayed.
    3. Select the required variable.
    4. The replacement variable replaces the selected string. The Configuration Wizard later substitutes literal strings for the replacement variables to set up a specific WebLogic domain. For definitions of the available replacement variables, see Replacement Variable Definitions.

  3. Repeat steps 1 and 2 for each string for which you want to substitute a variable.
  4. Review the changes and click Save to preserve your changes, or Revert to replace the current version of the file with the last version saved. If you edited the file since the last time you saved it, you are prompted to confirm the revert operation.
  5. Note: You can also click Reset in the Select File pane to revert to the saved version of the file.
  6. If you saved the edited file, select the check box next to the filename in the Select File pane.
  7. Repeat steps 1 through 5 for each file in which you want to insert replacement variables.
  8. Click Next.
  9. The Review the Domain Template window is displayed.

Replacement Variable Definitions

The following table defines the replacement variables most commonly used in files.

Table 2-5 List of Replacement Variables
Variable
Definition
ADMIN_SERVER_URL
URL specifying the listen address (host name or IP address) and port number of the Administration Server for the domain.
APPLICATIONS_DIRECTORY
Directory containing the applications required by the domain. By default, the pathname for this directory is BEA_HOME\user_projects\applications\domain.
BEAHOME
Directory in which the products associated with the domain are installed. On a Windows system, the default path for this directory is C:\bea.
DOCSWEBROOT
The URL specifying the location of the product documentation on the Internet.
DOMAIN_HOME
Directory in which the domain resides.
DOMAIN_NAME
Name of the domain.
DOMAIN_USER
Administration username required to start the server.
JAVA_HOME
Location of the JDK used to start WebLogic Server.
JAVA_VENDOR
Vendor of the JVM, for example, Oracle, HP, IBM, and Sun.
JAVA_VM
Mode in which you want the JVM to run, such as -jrockit, -server, -hotspot.
LISTEN_PORT
Port to be used to listen for regular, non-secure requests (via protocols such as HTTP and T3). The default value is 7001.
PRODUCTION_MODE
Mode in which the server is started. If this variable is set to true, the server starts in production mode; if set to false, the server starts in development mode.
SAMPLES_HOME
Directory containing the samples provided with your product installation. By default, the pathname for this directory is BEA_HOME\wlserver_10.0\samples.
SERVER_HOST
Name or address of the machine hosting the server.
SERVER_NAME
Name of the server to be started.
SERVER_PORT
Port to be used to listen for regular, non-secure requests (via protocols such as HTTP and T3). The default value is 7001.
SSL_PORT
Port to be used to listen for secure requests (via protocols such as HTTPS and T3S). The default value is 7002.
STARTMODE
Mode in which the server is started: development or production.
USERDOMAIN_HOME
Directory containing the user domains created with the Configuration Wizard. By default, the path for this directory is BEA_HOME\user_projects\domains.

 


Review the Domain Template

The Review WebLogic Domain Template window allows you to review the settings for the new template before it is created.

  1. Select an item in the Template Summary pane on the left and review the associated details in the Details pane on the right. If you need to change any settings that you defined in previous windows, select Previous to return to the required configuration window.
  2. Note: You can limit the type of information displayed in the Template Summary window by using the View drop-down list.
  3. Click Next.
  4. The Create a Template window is displayed.

 


Create a Template

The Create a Template window prompts you to specify the name and directory for the domain template, and launch the process that creates it.

  1. Specify a name for the template JAR file in the Template jar name field.
  2. Make sure that the Template location field contains the name of the directory in which you want the template to reside.
  3. You can change the location either by clicking Browse and navigating to the appropriate directory or by entering the path manually.

    The template directory can be located anywhere in your system. By default, it resides in BEA_HOME\user_templates, where BEA_HOME is the directory that contains the product installation (by default, on Windows, this directory is c:\bea).

  4. After verifying the information displayed in the window, click Create.
  5. The Creating Template window displays status messages during the template creation process. The Domain Template Builder generates a JAR file that contains all the components required to generate a new domain, including the template settings that you provided.

  6. Click Done in the Creating Template window.

The files included in a template vary, depending on the domain or template on which the template is based. For example, if you specify any Start menu entries in the Specify Start Menu Entries window, a startmenu.xml file that contains the specified entries is included in the template. When you create a domain by using this template, Start menu entries are created by using the values specified in this file. For more information, see “Files Typically Included in a Template” in Domain Template Reference.


  Back to Top       Previous  Next