4 Configuring Resource Group Templates
Note:
WebLogic Server Multitenant domain partitions, resource groups, resource group templates, virtual targets, and Resource Consumption Management are deprecated in WebLogic Server 12.2.1.4.0 and will be removed in the next release.This chapter includes the following sections:
About Resource Group Templates
A resource group template is a named, domain-level collection of deployable resources intended to be used as a pattern by multiple resource groups. Each resource group that refers to (references) a given template will have its own runtime copies of the resources defined in the template.
A resource group template is a convenient way to define and replicate resources for multiple tenants. Resource group templates make it very easy to deploy the same collection of applications and resources to multiple domain partitions. Some of the information about such resources is the same across all domain partitions, while some of it, such as the attributes of a Java Message Service (JMS) queue or of a database connection, varies from one partition to another.
You can create a resource group template in two ways:
-
Create a new resource group template. This creates the basic structure for the resource group template. You must then edit this resource group template as needed.
-
If you are using the Oracle WebLogic Server Administration Console, then you can clone (copy) an existing resource group template. The configuration is copied from the template to the new resource group template. You must then edit and override values from the resource group template as needed.
For more information about resource group templates, see the following topics:
What Is the Difference Between a Resource Group Template and a Resource Group?
One major difference between resource group templates and resource groups is that resource group templates do not have targets. Because resource group templates are intended to be used only as a pattern by multiple resource groups, possibly in many partitions, any target-specific information will most likely be unique to the resource group.
Therefore:
-
If you deploy applications to the resource group template, then you cannot start the applications until the resource group template is referenced by a resource group.
-
You cannot start or stop a resource group template.
What Is in a Resource Group Template?
Resource group templates are based on the ResourceGroupTemplateMBean
and can include the following resources:
-
General (name)
-
Deployments
-
Services
-
Java Database Connectivity (JDBC)
-
Messaging
-
Mail sessions
-
Persistent stores
-
Foreign Java Naming and Directory (JNDI) providers
-
OSGi frameworks
-
Diagnostics
-
-
Notes
Resource Group Templates and Overrides
Overriding resources lets you customize resources at the partition level.
You override resource settings that are derived from a resource group template as follows:
-
Create the resource group template.
-
Deploy applications to the resource group template as needed.
-
Define services in the resource group template as needed.
-
Create a partition and then create a resource group that references the resource group template.
-
Override the values from the resource group template in the resource group.
You can override resource definitions in partitions using override configuration MBeans, resource deployment plans, and partition-specific application deployment plans. For more information about resource overrides, see Configuring Resource Overrides. For information about application overrides, see Deploying Applications to Partition Resource Groups.
Resource Group Template Example
Assume that you have a SaaS environment, and that you want to run an instance of a specific business application in three different partitions. This business application requires a pluggable database, which means you need one pluggable database per partition because each application instance needs its own data isolated from the other application instances.
Assume further that the configuration for the pluggable databases will be identical for the three partitions, with the exception of the database name, user name, and password. For these values, plan to use the values from Table 4-1.
Table 4-1 Example Pluggable Databases
PDB Name | User name/Password | For Use by |
---|---|---|
|
pdbuser1/pdbuser1 |
Partition1 |
|
pdbuser2/pdbuser2 |
Partition2 |
|
pdbuser3/pdbuser3 |
Partition3 |
To configure your resource group template, follow these steps:
Creating Resource Group Templates: Main Steps and WLST Examples
Creating a new resource group template provides only its basic structure. After you create a resource group template, you must configure its resources.
To create a new resource group template:
-
Go to Domain > Environment > Resource Group Templates.
-
Create a new resource group template. The name must be unique in the domain.
These tasks are described in Create resource group templates in Administering Oracle WebLogic Server with Fusion Middleware Control.
For information about configuring resource group templates, see Configuring Resource Group Templates: Main Steps and WLST Examples.
Creating Resource Groups: WLST Example
The example does the following:
# Create Pep partition resource group, and resource group template edit() startEdit() wls:/base_domain/edit/ !> domain=getMBean('/') wls:/base_domain/edit/ !> peppart=domain.createPartition('Pep') wls:/base_domain/edit/ !> vt=domain.createVirtualTarget('VirtualTarget-0') wls:/base_domain/edit/ !> vt.setHostNames(jarray.array([String('localhost')],String)) wls:/base_domain/edit/ !> vt.setUriPrefix('/foo') wls:/base_domain/edit/ !> peppart.addAvailableTarget(vt) wls:/base_domain/edit/ !> peprg=peppart.createResourceGroup('TestRG') wls:/base_domain/edit/ !> peprg.addTarget(vt) wls:/base_domain/edit/ !> peprgt=domain.createResourceGroupTemplate('TestRGT') wls:/base_domain/edit/ !> peprg.setResourceGroupTemplate(peprgt) wls:/base_domain/edit/ !> activate() wls:/base_domain/edit/ !> startPartitionWait(peppart)
Configuring Resource Group Templates: Main Steps and WLST Examples
The initial resource group template configuration is a basic skeleton that you must configure before you can use it. The tasks may include configuring JDBC data sources, JMS servers and resources, foreign JNDI providers, and so forth.
For detailed information about configuring resource group templates, see the following tasks:
Configuring Resource Group Template Deployment Settings
To view and define resource group template deployment settings:
These tasks are described in Configure resource group template deployments in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring Resource Group Template Services Settings
This section includes the following tasks:
Configuring Resource Group Template JDBC Settings
To view configuration settings for the JDBC system resources that have been created in this resource group template:
See Configuring JDBC.
Configuring Resource Group Template JMS settings
This section includes the following tasks:
Configuring JMS Server Settings
To view configuration settings for the JMS servers that have been created for this resource group template:
These tasks are described in WebLogic Server Messaging in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring SAF Agent Settings
To view configuration settings for the store-and-forward (SAF) agents that have been created for this resource group template:
These tasks are described in Configure SAF Agent Settings in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring JMS Resource Settings
To monitor the resource settings for a resource group template:
These tasks are described in Configure SAF Agent Settings in Administering Oracle WebLogic Server with Fusion Middleware Control.
For information about configuring existing JMS resources, see Configuring Messaging.
Configuring JMS Module Settings
To configure the JMS modules for a resource group template:
These tasks are described in Configure JMS module settings in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring Messaging Bridges
To configure the messaging bridge settings for a resource group template:
These tasks are described in Configure messaging bridges in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring JMS Bridge Destinations
To configure the JMS bridge destination settings for a resource group template:
These tasks are described in Configure JMS bridge destinations in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring Path Services
To configure the path services settings for a resource group template:
These tasks are described in Configure path services in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring Resource Group Mail Session Settings
To view configuration settings for the mail sessions that have been created in this resource group template:
These tasks are described in WebLogic Server Mail Sessions in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring Resource Group Persistent Store Settings
To view configuration settings for the persistent stores that have been created in this resource group template:
These tasks are described in WebLogic Server Persistent Stores in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring Resource Group Foreign JNDI Provider Settings
To view configuration settings for the foreign JNDI providers that have been created in this resource group template:
These tasks are described in WebLogic Server Foreign JNDI Providers in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring Resource Group Diagnostic System Module Settings
To view configuration settings for the diagnostic system modules that have been created in this resource group template:
These tasks are described in WebLogic Server Diagnostics in Administering Oracle WebLogic Server with Fusion Middleware Control.
Configuring Resource Group Template Notes
To create notes for a resource group template:
- Select the resource group that you want to configure.
- Go to Notes.
- Enter your notes.
- Save your changes.
Configuring Resource Group Template: WLST Example
The example does the following:
# Create Pep partition resource group, and resource group template edit() startEdit() wls:/base_domain/edit/ !> domain=getMBean('/') wls:/base_domain/edit/ !> peppart=domain.createPartition('Pep') wls:/base_domain/edit/ !> vt=domain.createVirtualTarget('VirtualTarget-0') wls:/base_domain/edit/ !> vt.setHostNames(jarray.array([String('localhost')],String)) wls:/base_domain/edit/ !> vt.setUriPrefix('/foo') wls:/base_domain/edit/ !> peppart.addAvailableTarget(vt) wls:/base_domain/edit/ !> peprg=peppart.createResourceGroup('TestRG') wls:/base_domain/edit/ !> peprg.addTarget(vt) wls:/base_domain/edit/ !> peprgt=domain.createResourceGroupTemplate('TestRGT') wls:/base_domain/edit/ !> deploy(appName='MySimpleEJB', path='c:/webservices/MySimpleEjb.jar', resourceGroupTemplate='TestRGT') wls:/base_domain/edit/ !> peprg.setResourceGroupTemplate(peprgt) wls:/base_domain/edit/ !> activate() wls:/base_domain/edit/ !> startPartitionWait(peppart)
Deleting Resource Group Templates: Main Steps and WLST Examples
Deleting a resource group template permanently removes it from the domain's configuration. When you delete a resource group template, all of the applications deployed to the resource group template are undeployed. You cannot delete a resource group template that is being referenced by one or more resource groups. You must first remove the references to the resource group template before you can delete it.
-
Select the referencing resource groups of the resource group template that you want to delete.
-
Delete the resource groups.
-
Delete the resource group template.
Deleting Resource Group Templates: WLST Example
The example does the following:
# Create Pep partition resource group, and resource group template edit() startEdit() wls:/base_domain/edit/ !> domain=getMBean('/') wls:/base_domain/edit/ !> peppart=domain.createPartition('Pep') wls:/base_domain/edit/ !> vt=domain.createVirtualTarget('VirtualTarget-0') wls:/base_domain/edit/ !> vt.setHostNames(jarray.array([String('localhost')],String)) wls:/base_domain/edit/ !> vt.setUriPrefix('/foo') wls:/base_domain/edit/ !> peppart.addAvailableTarget(vt) wls:/base_domain/edit/ !> peprg=peppart.createResourceGroup('TestRG') wls:/base_domain/edit/ !> peprg.addTarget(vt) wls:/base_domain/edit/ !> peprgt=domain.createResourceGroupTemplate('TestRGT') wls:/base_domain/edit/ !> peprg.setResourceGroupTemplate(peprgt) wls:/base_domain/edit/ !> peprg.unSet('ResourceGroupTemplate') wls:/base_domain/edit/ !> domain.destroyResourceGroupTemplate(peprgt) wls:/base_domain/edit/ !> activate() wls:/base_domain/edit/ !> startPartitionWait(peppart)